Staging
v0.5.2
https://github.com/git/git
Revision 62e4f26f3d55bd66989d9b953988de18ba393417 authored by Jakub Narebski on 07 January 2007, 01:52:23 UTC, committed by Junio C Hamano on 07 January 2007, 06:52:49 UTC
$from_id, $to_id variables should be local per PATCH.

Fix error in git_patchset_body for file creation (deletion) patches,
where instead of /dev/null as from-file (to-file) diff header line, it
had link to previous file with current file name.  This error occured
only if there was another patch before file creation (deletion) patch.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent fffe694
Raw File
Tip revision: 62e4f26f3d55bd66989d9b953988de18ba393417 authored by Jakub Narebski on 07 January 2007, 01:52:23 UTC
gitweb: Fix error in git_patchest_body for file creation/deletion patch
Tip revision: 62e4f26
tree-walk.h
#ifndef TREE_WALK_H
#define TREE_WALK_H

struct tree_desc {
	const void *buf;
	unsigned long size;
};

struct name_entry {
	const unsigned char *sha1;
	const char *path;
	unsigned int mode;
	int pathlen;
};

void update_tree_entry(struct tree_desc *);
const unsigned char *tree_entry_extract(struct tree_desc *, const char **, unsigned int *);

/* Helper function that does both of the above and returns true for success */
int tree_entry(struct tree_desc *, struct name_entry *);

void *fill_tree_descriptor(struct tree_desc *desc, const unsigned char *sha1);

typedef void (*traverse_callback_t)(int n, unsigned long mask, struct name_entry *entry, const char *base);

void traverse_trees(int n, struct tree_desc *t, const char *base, traverse_callback_t callback);

int get_tree_entry(const unsigned char *, const char *, unsigned char *, unsigned *);

#endif
back to top