Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Clean up commit insertion in git-rev-list
author
Linus Torvalds
<torvalds@g5.osdl.org>
Wed, 6 Jul 2005 16:38:06 +0000
(09:38 -0700)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Wed, 6 Jul 2005 16:38:06 +0000
(09:38 -0700)
Jon wants the commits in a different order for merge-order.
rev-list.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
f755494
)
diff --git
a/rev-list.c
b/rev-list.c
index 8117caf569cb8b5275075a63506e41f0478abe08..c20fec804e1fd4f88ee03647d5e86bb1e6e06e0c 100644
(file)
--- 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;
int main(int argc, char **argv)
{
struct commit_list *list = NULL;
+ struct commit_list *(*insert)(struct commit *, struct commit_list **);
int i, limited = 0;
int i, limited = 0;
+ insert = insert_by_date;
for (i = 1 ; i < argc; i++) {
int flags;
char *arg = argv[i];
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;
}
if (!strcmp(arg, "--merge-order")) {
merge_order = 1;
+ insert = commit_list_insert;
continue;
}
if (!strcmp(arg, "--show-breaks")) {
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;
commit = get_commit_reference(arg, flags);
if (!commit)
continue;
- insert
_by_date
(commit, &list);
+ insert(commit, &list);
}
if (!merge_order) {
}
if (!merge_order) {