summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-06-24 19:21:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-06-24 19:21:40 (GMT)
commitde04706e3151c6b34bc13513cf164ba37e6e95a7 (patch)
treeba29e3f95d87196a2a40c428ca6e8746a1495472 /builtin/log.c
parent8c17d5a3c0bb9962dcdd5ef199f201c48ed14798 (diff)
parent9b7a61d7dab1635607b1b5be480ac78944cafb45 (diff)
downloadgit-de04706e3151c6b34bc13513cf164ba37e6e95a7.zip
git-de04706e3151c6b34bc13513cf164ba37e6e95a7.tar.gz
git-de04706e3151c6b34bc13513cf164ba37e6e95a7.tar.bz2
Merge branch 'jc/do-not-feed-tags-to-clear-commit-marks'
"git format-patch --ignore-if-upstream A..B" did not like to be fed tags as boundary commits. * jc/do-not-feed-tags-to-clear-commit-marks: format-patch: do not feed tags to clear_commit_marks()
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/log.c b/builtin/log.c
index e67671e..8781049 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -795,7 +795,7 @@ static int reopen_stdout(struct commit *commit, const char *subject,
static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
{
struct rev_info check_rev;
- struct commit *commit;
+ struct commit *commit, *c1, *c2;
struct object *o1, *o2;
unsigned flags1, flags2;
@@ -803,9 +803,11 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
die(_("Need exactly one range."));
o1 = rev->pending.objects[0].item;
- flags1 = o1->flags;
o2 = rev->pending.objects[1].item;
+ flags1 = o1->flags;
flags2 = o2->flags;
+ c1 = lookup_commit_reference(o1->sha1);
+ c2 = lookup_commit_reference(o2->sha1);
if ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))
die(_("Not a range."));
@@ -827,10 +829,8 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
}
/* reset for next revision walk */
- clear_commit_marks((struct commit *)o1,
- SEEN | UNINTERESTING | SHOWN | ADDED);
- clear_commit_marks((struct commit *)o2,
- SEEN | UNINTERESTING | SHOWN | ADDED);
+ clear_commit_marks(c1, SEEN | UNINTERESTING | SHOWN | ADDED);
+ clear_commit_marks(c2, SEEN | UNINTERESTING | SHOWN | ADDED);
o1->flags = flags1;
o2->flags = flags2;
}