summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 35ef3a4)
raw | patch | inline | side by side (parent: 35ef3a4)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 8 Sep 2005 19:15:52 +0000 (12:15 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 8 Sep 2005 19:15:52 +0000 (12:15 -0700) |
This would make things easier to use for Octopus.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-show-branch.txt | patch | blob | history | |
show-branch.c | patch | blob | history |
index c947fcedae81003e532204299cbaa0aa5f91a287..cc7da3087351af96e932138931d4a008799c4a4a 100644 (file)
--merge-base::
Instead of showing the commit list, just act like the
- 'git-merge-base' command except that it can accept more
- than two heads.
+ 'git-merge-base -a' command, except that it can accept
+ more than two heads.
OUTPUT
diff --git a/show-branch.c b/show-branch.c
index 8b37aebb019ef91d773f12e2bf4c25eafcd9d355..ccb0c73bf991bf6faeb8de25d0c0c176c8a5b9e1 100644 (file)
--- a/show-branch.c
+++ b/show-branch.c
#include "refs.h"
static const char show_branch_usage[] =
-"git-show-branch [--all] [--heads] [--tags] [--more=count] [<refs>...]";
+"git-show-branch [--all] [--heads] [--tags] [--more=count] [--merge-base] [<refs>...]";
#define UNINTERESTING 01
{
int all_mask = ((1u << (REV_SHIFT + num_rev)) - 1);
int all_revs = all_mask & ~((1u << REV_SHIFT) - 1);
+ int exit_status = 1;
while (seen) {
struct commit *commit = pop_one_commit(&seen);
if (!(flags & UNINTERESTING) &&
((flags & all_revs) == all_revs)) {
puts(sha1_to_hex(commit->object.sha1));
- return 0;
+ exit_status = 0;
+ commit->object.flags |= UNINTERESTING;
}
}
- return 1;
+ return exit_status;
}
int main(int ac, char **av)