aboutsummaryrefslogtreecommitdiff
path: root/rev-list.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-03-27 23:58:34 -0800
committerJunio C Hamano <junkio@cox.net>2006-03-28 17:29:21 -0800
commit384e99a4a99820c34fe3600b2aad3f0185dd43db (patch)
tree88ff1150dafa6732dd8a6f8a75c59976222910a6 /rev-list.c
parent9181ca2c2b1f2897baa67ff8e48b1984822115b5 (diff)
downloadgit-384e99a4a99820c34fe3600b2aad3f0185dd43db.tar.gz
git-384e99a4a99820c34fe3600b2aad3f0185dd43db.tar.xz
rev-list --boundary
With the new --boundary flag, the output from rev-list includes the UNINTERESING commits at the boundary, which are usually not shown. Their object names are prefixed with '-'. For example, with this graph: C side / A---B---D master You would get something like this: $ git rev-list --boundary --header --parents side..master D B tree D^{tree} parent B ... log message for commit D here ... \0-B A tree B^{tree} parent A ... log message for commit B here ... \0 Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'rev-list.c')
-rw-r--r--rev-list.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rev-list.c b/rev-list.c
index 0903edbcb..f3a989cce 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -7,9 +7,9 @@
#include "diff.h"
#include "revision.h"
-/* bits #0-4 in revision.h */
+/* bits #0-5 in revision.h */
-#define COUNTED (1u<<5)
+#define COUNTED (1u<<6)
static const char rev_list_usage[] =
"git-rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
@@ -51,6 +51,8 @@ static void show_commit(struct commit *commit)
printf("%lu ", commit->date);
if (commit_prefix[0])
fputs(commit_prefix, stdout);
+ if (commit->object.flags & BOUNDARY)
+ putchar('-');
fputs(sha1_to_hex(commit->object.sha1), stdout);
if (show_parents) {
struct commit_list *parents = commit->parents;