git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 25, 2020, 05:59 UTC
Message-ID
<20200925055954.1111389-1-gitster@pobox.com>

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(-)
-- 
2.28.0-718-gd8d5e3da39
Next: Junio C Hamano
Message 1 of 13 in “Clean-up around get_x_ish()”
  1. 0/4 Clean-up around get_x_ish()Junio C Hamano, Sep 25, 2020
  2. 4/4 sequencer: stop abbreviating stopped-sha fileJunio C Hamano, Sep 25, 2020
  3. 3/4 t1506: rev-parse A..B and A...BJunio C Hamano, Sep 25, 2020
  4. 2/4 blame: validate and peel the object names on the ignore listJunio C Hamano, Sep 25, 2020
  5. René ScharfeSep 26, 2020
  6. Junio C HamanoSep 26, 2020
  7. Junio C HamanoSep 26, 2020
  8. Barret RhodenSep 28, 2020
  9. René ScharfeOct 11, 2020
  10. Junio C HamanoOct 12, 2020
  11. Barret RhodenOct 12, 2020
  12. René ScharfeOct 13, 2020
  13. 1/4 t8013: minimum preparatory clean-upJunio C Hamano, Sep 25, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.