aboutsummaryrefslogtreecommitdiff
path: root/builtin-rev-parse.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-15 16:40:39 -0800
committerJunio C Hamano <gitster@pobox.com>2009-11-15 16:40:39 -0800
commit578e5efd46efdacd4b48cb2e72b007f72de3cd9b (patch)
treef57089ed999abe5815a833f90efeca5e1eb203e2 /builtin-rev-parse.c
parentb7fba061e05d16fd2c61db5c279b6ad4db98aba4 (diff)
parentad3f9a71a8200418e1da59b9712a8fde3f8c4c08 (diff)
downloadgit-578e5efd46efdacd4b48cb2e72b007f72de3cd9b.tar.xz
Merge branch 'lt/revision-bisect'
* lt/revision-bisect: Add '--bisect' revision machinery argument
Diffstat (limited to 'builtin-rev-parse.c')
-rw-r--r--builtin-rev-parse.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c
index 45bead6545..9526aafc6c 100644
--- a/builtin-rev-parse.c
+++ b/builtin-rev-parse.c
@@ -180,6 +180,12 @@ static int show_reference(const char *refname, const unsigned char *sha1, int fl
return 0;
}
+static int anti_reference(const char *refname, const unsigned char *sha1, int flag, void *cb_data)
+{
+ show_rev(REVERSED, sha1, refname);
+ return 0;
+}
+
static void show_datestring(const char *flag, const char *datestr)
{
static char buffer[100];
@@ -548,6 +554,11 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
for_each_ref(show_reference, NULL);
continue;
}
+ if (!strcmp(arg, "--bisect")) {
+ for_each_ref_in("refs/bisect/bad", show_reference, NULL);
+ for_each_ref_in("refs/bisect/good", anti_reference, NULL);
+ continue;
+ }
if (!strcmp(arg, "--branches")) {
for_each_branch_ref(show_reference, NULL);
continue;