mbox series

[0/4] Clean-up around get_x_ish()

Message ID 20200925055954.1111389-1-gitster@pobox.com (mailing list archive)
Headers show
Series Clean-up around get_x_ish() | expand

Message

Junio C Hamano Sept. 25, 2020, 5:59 a.m. UTC
Here is to clean some code I noticed while auditing the use of
get_committish() and get_treeish() API functions.

The main topic is to tighten error checking of "blame --ignore-rev"
and "blame --ignore-revs-list" arguments, which were not checked all
that much.  We make sure the ignore revs are committish objects, and
also peel tags pointing at commits down to commits before using them.
The breakage in the original is demonstrated by the tests added and/or
tweaked in the second patch.

The last two patches are icing on the cake.

Junio C Hamano (4):
  t8013: minimum preparatory clean-up
  blame: validate and peel the object names on the ignore list
  t1506: rev-parse A..B and A...B
  sequencer: stop abbreviating stopped-sha file

 builtin/blame.c                | 27 +++++++++++++--
 oidset.c                       |  9 ++++-
 oidset.h                       |  9 +++++
 sequencer.c                    | 11 +++---
 t/t1506-rev-parse-diagnosis.sh | 18 ++++++++++
 t/t8013-blame-ignore-revs.sh   | 61 ++++++++++++++++++++++------------
 6 files changed, 105 insertions(+), 30 deletions(-)