aboutsummaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-07-24 00:39:50 +0100
committerJunio C Hamano <gitster@pobox.com>2007-07-24 17:28:10 -0700
commit7b69b873faf3cfd592bb64a496c6982a540aa7ea (patch)
tree6142de722c399ccfbc5a61e880e129d3d01cdd05 /revision.c
parent2d8ae400d134c326f3ab0ec15ae522fb74cd0b1d (diff)
downloadgit-7b69b873faf3cfd592bb64a496c6982a540aa7ea.tar.gz
git-7b69b873faf3cfd592bb64a496c6982a540aa7ea.tar.xz
git log -g: Complain, but do not fail, when no reflogs are there
When asking "git log -g --all", clearly you want to see only those refs that do have reflogs, but you do not want it to fail, either. So instead of die()ing, complain about it, but move on to the other refs. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/revision.c b/revision.c
index 16f35c7c1..038693cab 100644
--- a/revision.c
+++ b/revision.c
@@ -118,10 +118,11 @@ static void add_pending_object_with_mode(struct rev_info *revs, struct object *o
{
if (revs->no_walk && (obj->flags & UNINTERESTING))
die("object ranges do not make sense when not walking revisions");
+ if (revs->reflog_info && obj->type == OBJ_COMMIT &&
+ add_reflog_for_walk(revs->reflog_info,
+ (struct commit *)obj, name))
+ return;
add_object_array_with_mode(obj, name, &revs->pending, mode);
- if (revs->reflog_info && obj->type == OBJ_COMMIT)
- add_reflog_for_walk(revs->reflog_info,
- (struct commit *)obj, name);
}
void add_pending_object(struct rev_info *revs, struct object *obj, const char *name)