Skip to content

rebase: ignore non-branch update-refs

[email protected] git 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest1 patch 0 repliesNew
  2. v21 patch 1 replySuperseded
  3. v11 patch 9 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1rebase: ignore non-branch update-refssequencer.c t/t3404-rebase-interactive.sh+25 -10 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/1] rebase: ignore non-branch update-refs

From: Abhinav Gupta <[email protected]>

Updated per suggestion to merge the conditionals.

Quoted 10 lines · Phillip
Quoted 5 lines · Junio C Hamano

Your long topic branch may have local unannotated tags that point into the middle of it, marking strategic points in the topic.

With this change, the command no longer moves them when it rebases the entire topic. Isn't it a regression?

sequencer.c:todo_list_add_update_ref_commands() calls load_branch_decorations() so it does not update tags and the patch is correct.

That's right, the documented contract is that only branches are updated. Without '%d' triggering a load_ref_decorations, load_branch_decorations would be called and only branch refs would be added to the rebase todo list.

Quoted 3 lines · Phillip

Looking at make_script_with_merges() it also calls load_branch_decorations() so we should probably add something like the diff below.

Thinking out loud:
Instead of caller-side filtering, another option might be
to replace load_branch_decorations with a branch-specialized iterator that relies on load_ref_decorations and silently skips non-branch decorations. That's a more invasive change, though.

Thanks!

Abhinav Gupta (1):
rebase: ignore non-branch update-refs

 sequencer.c                   |  8 +++++++-
 t/t3404-rebase-interactive.sh | 18 ++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

base-commit: 94f057755b7941b321fd11fec1b2e3ca5313a4e0

Signature · 1 line
2.54.0