Skip to content

some parse_revision_opt() bugfixes

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2revision: avoid reporting known options as unknown on errorrevision.c t/t4201-shortlog.sh+10 -10 replies
2/2revision: handle argv movement in parse_revision_opt()revision.c t/t4201-shortlog.sh+6 -13 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] some parse_revision_opt() bugfixes
Quoted 7 lines · Jeff King
Quoted 2 lines

I have bisected this to cd439487 (revision: manage memory ownership of argv in setup_revisions(), 2025-09-19).

Yep, definitely my fault. I don't have time to do a full write-up now, but the most direct solution is:
[...]
But I think instead doing this:

I ended up reversing my decision there, for reasons that are explained in the second commit. But the good news is that doing so also revealed a related bug that predates even cd439487.

So here are the fixes. I apologize in advance for the length of the second commit message. At least I feel good about my decision to go to bed before writing it. ;)

[1/2]: revision: avoid reporting known options as unknown on error [2/2]: revision: handle argv movement in parse_revision_opt()

 revision.c          |  7 +++++--
 t/t4201-shortlog.sh | 11 +++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

-Peff