summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-05 20:52:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-05 20:52:43 (GMT)
commit995b1b1411e5ad45d100354f4a6c185fef79cbf6 (patch)
tree4a4305faaa93c1fca895a18380d61f532850f557 /sequencer.c
parentf7998d979322c439578a4334524ae2c924042705 (diff)
parente02058a72967b18bd906674de6191f42d03b0763 (diff)
downloadgit-995b1b1411e5ad45d100354f4a6c185fef79cbf6.zip
git-995b1b1411e5ad45d100354f4a6c185fef79cbf6.tar.gz
git-995b1b1411e5ad45d100354f4a6c185fef79cbf6.tar.bz2
Merge branch 'dd/rebase-merge-reserves-onto-label'
The logic to avoid duplicate label names generated by "git rebase --rebase-merges" forgot that the machinery itself uses "onto" as a label name, which must be avoided by auto-generated labels, which has been corrected. * dd/rebase-merge-reserves-onto-label: sequencer: handle rebase-merges for "onto" message
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index 115d5bd..e65076f 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -4567,10 +4567,15 @@ static int make_script_with_merges(struct pretty_print_context *pp,
strbuf_init(&state.buf, 32);
if (revs->cmdline.nr && (revs->cmdline.rev[0].flags & BOTTOM)) {
+ struct labels_entry *onto_label_entry;
struct object_id *oid = &revs->cmdline.rev[0].item->oid;
FLEX_ALLOC_STR(entry, string, "onto");
oidcpy(&entry->entry.oid, oid);
oidmap_put(&state.commit2label, entry);
+
+ FLEX_ALLOC_STR(onto_label_entry, label, "onto");
+ hashmap_entry_init(&onto_label_entry->entry, strihash("onto"));
+ hashmap_add(&state.labels, &onto_label_entry->entry);
}
/*