summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-01-23 09:06:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-06-01 00:02:59 (GMT)
commit680955702990c1d4bfb3c6feed6ae9c6cb5c3c07 (patch)
tree44ee65b637c621cafc717ef76f1c196bcf28f17c /commit.h
parent292687003abcfb68d296c57d7e812b0469f74647 (diff)
downloadgit-680955702990c1d4bfb3c6feed6ae9c6cb5c3c07.zip
git-680955702990c1d4bfb3c6feed6ae9c6cb5c3c07.tar.gz
git-680955702990c1d4bfb3c6feed6ae9c6cb5c3c07.tar.bz2
replace_object: add mechanism to replace objects found in "refs/replace/"
The code implementing this mechanism has been copied more-or-less from the commit graft code. This mechanism is used in "read_sha1_file". sha1 passed to this function that match a ref name in "refs/replace/" are replaced by the sha1 that has been read in the ref. We "die" if the replacement recursion depth is too high or if we can't read the replacement object. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index f3eaf1d..a8bdd09 100644
--- a/commit.h
+++ b/commit.h
@@ -124,6 +124,8 @@ struct commit_graft *read_graft_line(char *buf, int len);
int register_commit_graft(struct commit_graft *, int);
struct commit_graft *lookup_commit_graft(const unsigned char *sha1);
+const unsigned char *lookup_replace_object(const unsigned char *sha1);
+
extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *rev2, int cleanup);
extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos, int cleanup);
extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);