diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-06 09:38:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-06 09:38:06 -0700 |
commit | 7e21c29b56f80e8fd24613207b4e0116659ad5f8 (patch) | |
tree | 19cda8d602ae3627b523477793903c3fb813e319 /rev-list.c | |
parent | f755494cec27fed8c9693bb91c26762061518b0b (diff) | |
download | git-7e21c29b56f80e8fd24613207b4e0116659ad5f8.tar.gz git-7e21c29b56f80e8fd24613207b4e0116659ad5f8.tar.xz |
Clean up commit insertion in git-rev-list
Jon wants the commits in a different order for merge-order.
Diffstat (limited to 'rev-list.c')
-rw-r--r-- | rev-list.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rev-list.c b/rev-list.c index 8117caf56..c20fec804 100644 --- a/rev-list.c +++ b/rev-list.c @@ -413,8 +413,10 @@ static struct commit *get_commit_reference(const char *name, unsigned int flags) int main(int argc, char **argv) { struct commit_list *list = NULL; + struct commit_list *(*insert)(struct commit *, struct commit_list **); int i, limited = 0; + insert = insert_by_date; for (i = 1 ; i < argc; i++) { int flags; char *arg = argv[i]; @@ -464,6 +466,7 @@ int main(int argc, char **argv) } if (!strcmp(arg, "--merge-order")) { merge_order = 1; + insert = commit_list_insert; continue; } if (!strcmp(arg, "--show-breaks")) { @@ -482,7 +485,7 @@ int main(int argc, char **argv) commit = get_commit_reference(arg, flags); if (!commit) continue; - insert_by_date(commit, &list); + insert(commit, &list); } if (!merge_order) { |