format-patch: do not feed tags to clear_commit_marks()
commit9b7a61d7dab1635607b1b5be480ac78944cafb45
authorJunio C Hamano <gitster@pobox.com>
Mon, 1 Jun 2015 17:44:21 +0000 (1 10:44 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Jun 2015 23:02:52 +0000 (1 16:02 -0700)
tree016ff072c44a56e8b5901b74bf1049372b6f1a69
parentfdf96a20acf96a6ac538df8113b2aafd6ed71d50
format-patch: do not feed tags to clear_commit_marks()

"git format-patch --ignore-if-in-upstream A..B", when either A or B
is a tag, failed miserably.

This is because the code passes the tips it used for traversal to
clear_commit_marks(), after running a temporary revision traversal
to enumerate the commits on both branches to find if they have
commits that make equivalent changes.  The revision traversal
machinery knows how to enumerate commits reachable starting from a
tag, but clear_commit_marks() wants to take nothing but a commit.

In the longer term, it might be a more correct fix to teach
clear_commit_marks() to do the same "committish to commit"
dereferencing that is done in the revision traversal machinery,
but for now this fix should suffice.

Reported-by: Bruce Korb <bruce.korb@gmail.com>
Helped-by: Christian Couder <christian.couder@gmail.com>
Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c
t/t4014-format-patch.sh