Skip to content

show-branch --reflog fixes

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Revert "refs: allow @{n} to work with n-sized reflog"refs.c t/t1508-at-combinations.sh t/t3202-show-branch.sh+50 -510 replies
2/3get_oid_basic(): special-case ref@{n} for oldest reflog entryobject-name.c refs.c t/t1508-at-combinations.sh+11 -21 reply
3/3read_ref_at(): special-case ref@{0} for an empty reflogrefs.c refs.h t/t1508-at-combinations.sh +1 more+32 -46 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/3] show-branch --reflog fixes
Quoted 4 lines · Jeff King

If none of this makes sense, it is because I am only now untangling what is going on with 6436a20284. ;) I will try to polish my proposed patches and hopefully that will explain it a bit more clearly (I may not get to it until tomorrow though).

OK, so here's what I came up with. One thing I did not realize, as I was writing my patches directly atop 6436a20284, is that we actually fixed the reflog message bug back in f2463490c4 (show-branch: show reflog message, 2021-12-02). And several tests have been added since then.

So I gave up on trying to build on top of the source of the bug, and just rebased onto the tip of master. It should apply to recent "maint" as well, I'd think.

[1/3]: Revert "refs: allow @{n} to work with n-sized reflog" [2/3]: get_oid_basic(): special-case ref@{n} for oldest reflog entry [3/3]: read_ref_at(): special-case ref@{0} for an empty reflog

 object-name.c          |  9 ++++++
 refs.c                 | 65 +++++++++++++++++++-----------------------
 refs.h                 | 15 +++++++++-
 t/t3202-show-branch.sh | 49 +++++++++++++++++++++----------
 4 files changed, 87 insertions(+), 51 deletions(-)