summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-21 02:51:10 -0700
committerJunio C Hamano <junkio@cox.net>2005-08-22 18:34:10 -0700
commitf76412ed6dbf2f9863115ee38f4198368dbaf7b1 (patch)
tree49eb364c591e842ff81e206911cb96d4e566ee2b /commit.h
parent4f7599ac2543e1d59f2b2b865ecff272ae5f4ea5 (diff)
downloadgit-f76412ed6dbf2f9863115ee38f4198368dbaf7b1.tar.gz
[PATCH] Add 'git show-branch'.
The 'git show-branches' command turns out to be reasonably useful, but painfully slow. So rewrite it in C, using ideas from merge-base while enhancing it a bit more. - Unlike show-branches, it can take --heads (show me all my heads), --tags (show me all my tags), or --all (both). - It can take --more=<number> to show beyond the merge-base. - It shows the short name for each commit in the extended SHA1 syntax. - It can find merge-base for more than two heads. Examples: $ git show-branch --more=6 HEAD is almost the same as "git log --pretty=oneline --max-count=6". $ git show-branch --merge-base master mhf misc finds the merge base of the three given heads. $ git show-branch master mhf misc shows logs from the top of these three branch heads, up to their common ancestor commit is shown. $ git show-branch --all --more=10 is poor-man's gitk, showing all the tags and heads, and going back 10 commits beyond the merge base of those refs. Signed-off-by: Junio C Hamano <junkio@cox.net>
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 5d179d4dc8..9dda2f045f 100644
--- a/commit.h
+++ b/commit.h
@@ -21,6 +21,8 @@ extern const char *commit_type;
struct commit *lookup_commit(const unsigned char *sha1);
struct commit *lookup_commit_reference(const unsigned char *sha1);
+struct commit *lookup_commit_reference_gently(const unsigned char *sha1,
+ int quiet);
int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size);