diff options
author | Junio C Hamano <junkio@cox.net> | 2005-08-10 00:10:18 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-08-10 00:10:18 -0700 |
commit | f69714c38c6f3296a4bfba0d057e0f1605373f49 (patch) | |
tree | 2d850f14f62d33ed514e2b197b63fe459ff20d37 /rev-list.c | |
parent | Merge with master. (diff) | |
parent | Skip merges in format-patch. (diff) | |
download | tgif-f69714c38c6f3296a4bfba0d057e0f1605373f49.tar.xz |
Merge with master.
This merges commit
c35a7b8d806317dc1762e36561cbd31c2530dd9c
from master into our head commit
edee414c3e5a546aae3dd1529f397df949713305
Sincerely,
jit-merge command.
Diffstat (limited to 'rev-list.c')
-rw-r--r-- | rev-list.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/rev-list.c b/rev-list.c index fae30a2b68..ce5b8b2ad5 100644 --- a/rev-list.c +++ b/rev-list.c @@ -15,12 +15,15 @@ static const char rev_list_usage[] = " --max-count=nr\n" " --max-age=epoch\n" " --min-age=epoch\n" + " --parents\n" " --bisect\n" " --objects\n" " --unpacked\n" " --header\n" " --pretty\n" - " --merge-order [ --show-breaks ]"; + " --no-merges\n" + " --merge-order [ --show-breaks ]\n" + " --topo-order"; static int unpacked = 0; static int bisect_list = 0; @@ -39,6 +42,7 @@ static int merge_order = 0; static int show_breaks = 0; static int stop_traversal = 0; static int topo_order = 0; +static int no_merges = 0; static void show_commit(struct commit *commit) { @@ -59,7 +63,11 @@ static void show_commit(struct commit *commit) parents = parents->next; } } - putchar('\n'); + if (commit_format == CMIT_FMT_ONELINE) + putchar(' '); + else + putchar('\n'); + if (verbose_header) { static char pretty_header[16384]; pretty_print_commit(commit_format, commit->buffer, ~0, pretty_header, sizeof(pretty_header)); @@ -82,6 +90,8 @@ static int filter_commit(struct commit * commit) } if (max_count != -1 && !max_count--) return STOP; + if (no_merges && (commit->parents && commit->parents->next)) + return CONTINUE; return DO; } @@ -497,7 +507,14 @@ int main(int argc, char **argv) commit_format = get_commit_format(arg+8); verbose_header = 1; hdr_termination = '\n'; - prefix = "commit "; + if (commit_format == CMIT_FMT_ONELINE) + prefix = ""; + else + prefix = "commit "; + continue; + } + if (!strncmp(arg, "--no-merges", 11)) { + no_merges = 1; continue; } if (!strcmp(arg, "--parents")) { |