aboutsummaryrefslogtreecommitdiff
path: root/builtin/rev-list.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-11 13:27:00 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-11 13:27:01 -0700
commit3ab01ac3f7681a294a09b42b9b014dc48a9aee22 (patch)
tree89d29b3f793d535a2a8c65c52b595bd0edb41daf /builtin/rev-list.c
parent51b8aecabed1363f13c990320a50e1fb2aa3f696 (diff)
parentde239446b69f3b453050af8091e07aa5433421cc (diff)
downloadgit-3ab01ac3f7681a294a09b42b9b014dc48a9aee22.tar.gz
git-3ab01ac3f7681a294a09b42b9b014dc48a9aee22.tar.xz
Merge branch 'jk/reflog-walk'
Numerous bugs in walking of reflogs via "log -g" and friends have been fixed. * jk/reflog-walk: reflog-walk: apply --since/--until to reflog dates reflog-walk: stop using fake parents rev-list: check reflog_info before showing usage get_revision_1(): replace do-while with an early return log: do not free parents when walking reflog log: clarify comment about reflog cycles revision: disallow reflog walking with revs->limited t1414: document some reflog-walk oddities
Diffstat (limited to 'builtin/rev-list.c')
-rw-r--r--builtin/rev-list.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index fee10d856..e8f504890 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -11,6 +11,7 @@
#include "graph.h"
#include "bisect.h"
#include "progress.h"
+#include "reflog-walk.h"
static const char rev_list_usage[] =
"git rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
@@ -349,7 +350,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
/* Only --header was specified */
revs.commit_format = CMIT_FMT_RAW;
- if ((!revs.commits &&
+ if ((!revs.commits && reflog_walk_empty(revs.reflog_info) &&
(!(revs.tag_objects || revs.tree_objects || revs.blob_objects) &&
!revs.pending.nr)) ||
revs.diff)