mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Devin Rhode <>
Subject: Planting new `update-ref refs/heads/new-branch` lines in git-rebase-todo adds semi to end of branch names
Date: Fri, 11 Nov 2022 11:09:33 -0500	[thread overview]
Message-ID: <> (raw)

What did you do before the bug happened? (Steps to reproduce your issue)

1. Run `git rebase -i next` with `--update-refs` or the git config
setting `rebase.updateRefs = true`
2. Given `git-rebase-todo`:
pick fjr23j3 foo bar
pick j3j413 bar bar

3. Add a new update-ref line like so.
pick fjr23j3 foo bar
update-ref refs/heads/devin/foo/bar/bar/bar/branch-new-name;

pick j3j413 bar bar
`devin/foo/bar/bar/bar/branch-new-name` branch name does not already exist.
The intention here is to create a new branch name at this point in the
history (to create a stacked PR).

3. Complete rebase, see this output:
Successfully rebased and updated
Updated the following refs with --update-refs:
        refs/heads/devin/edit-step-1-copy  // <-- no semi
        refs/heads/devin/edit-step-2-copy  // <-- no semi
        refs/heads/devin/refactor-foolytics;    // <-- Trailing semi
        refs/heads/devin/foo-821-analytics-for-checkout;  // <-- Trailing semi
$ git branch
* devin/foo-821-analytics-for-checkout
+ devin/foo-828-add-sentry-to-tutorialfoocom

5. After rebasing, paste a series of git push commands into vscode's
integrated terminal:
git push origin --force-with-lease
git push origin --force-with-lease
I wasn't paying perfect attention to the semicolon at the end of these
git push lines.
Some may have included a semi, some not.

I think at some point, I converted a series of `git push` commands
BACK into `update-ref` commands, because I did a weird rebase thing
and the `update-ref` lines didn't appear on the next rebase.

This is probably an error on my part, but `update-ref` lines added to
`git-rebase-todo` should fail if they end with a semicolon, and the
user should be forced to remove them.

[System Info]
git version:
git version 2.38.1
cpu: arm64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:46
PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T8101 arm64
compiler info: clang: 14.0.0 (clang-1400.0.29.102)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh

Using arm-native macOS terminal
zsh --version:
zsh 5.8.1 (x86_64-apple-darwin21.0)

[Enabled Hooks]

                 reply	other threads:[~2022-11-11 16:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).