{"thread":{"id":"58788","subject":"Planting new `update-ref refs/heads/new-branch` lines in git-rebase-todo adds semi to end of branch names","startedAt":"2022-11-11T16:09:49Z","lastAt":"2022-11-11T16:09:49Z","messageCount":1,"participants":["Devin Rhode"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"467148","messageId":"CAG8sxgmHg0CmD9T01NYUmOC7k7fPSwHjwD7rKXOgyBnVQw6v7Q@mail.gmail.com","threadId":"58788","inReplyTo":null,"subject":"Planting new `update-ref refs/heads/new-branch` lines in git-rebase-todo adds semi to end of branch names","fromName":"Devin Rhode","fromEmail":"devinrhode2@gmail.com","sentAt":"2022-11-11T16:09:33Z","receivedAt":"2022-11-11T16:09:49Z","isPatch":false,"sender":{"key":"devinrhode2@gmail.com","avatar":null},"body":"What did you do before the bug happened? (Steps to reproduce your issue)\n\n1. Run `git rebase -i next` with `--update-refs` or the git config\nsetting `rebase.updateRefs = true`\n2. Given `git-rebase-todo`:\n```\npick fjr23j3 foo bar\npick j3j413 bar bar\n```\n\n3. Add a new update-ref line like so.\n```\npick fjr23j3 foo bar\nupdate-ref refs/heads/devin/foo/bar/bar/bar/branch-new-name;\n\npick j3j413 bar bar\n```\n`devin/foo/bar/bar/bar/branch-new-name` branch name does not already exist.\nThe intention here is to create a new branch name at this point in the\nhistory (to create a stacked PR).\n\n3. Complete rebase, see this output:\n```\nSuccessfully rebased and updated\nrefs/heads/devin/foo-821-analytics-for-checkout.\nUpdated the following refs with --update-refs:\n        refs/heads/devin/edit-step-1-copy  // <-- no semi\n        refs/heads/devin/edit-step-2-copy  // <-- no semi\n        refs/heads/devin/refactor-foolytics;    // <-- Trailing semi\n        refs/heads/devin/foo-821-analytics-for-checkout;  // <-- Trailing semi\n```\n4.\n$ git branch\n  devin/edit-step-1-copy\n  devin/edit-step-2-copy\n  devin/refactor-foolytics;\n  devin/rename-logAnalyticsEvents;\n  devin/foo-731-add-segment-tracking-to-tutorialfoocom\n  devin/foo-736-lock-checkout-behind-a-query-param\n  devin/foo-779-add-segment-events-for-all-clicksuser\n  devin/foo-779-add-segment-events-for-all-clicksuser;\n  devin/foo-808-button-to-re-try-failed-checkout\n  devin/foo-808-button-to-re-try-failed-checkout;\n* devin/foo-821-analytics-for-checkout\n  devin/foo-821-analytics-for-checkout;\n+ devin/foo-828-add-sentry-to-tutorialfoocom\n  devin/sort-tailwind-classes\n  fix/crashing-on-falsy-amazonProductID\n  main\n  refactor-foolytics\n\n5. After rebasing, paste a series of git push commands into vscode's\nintegrated terminal:\n```\ngit push origin --force-with-lease\ndevin/edit-step-1-copy:refs/heads/devin/edit-step-1-copy;\ngit push origin --force-with-lease\ndevin/edit-step-2-copy:refs/heads/devin/edit-step-2-copy;\n```\nI wasn't paying perfect attention to the semicolon at the end of these\ngit push lines.\nSome may have included a semi, some not.\n\nI think at some point, I converted a series of `git push` commands\nBACK into `update-ref` commands, because I did a weird rebase thing\nand the `update-ref` lines didn't appear on the next rebase.\n\nThis is probably an error on my part, but `update-ref` lines added to\n`git-rebase-todo` should fail if they end with a semicolon, and the\nuser should be forced to remove them.\n\n[System Info]\ngit version:\ngit version 2.38.1\ncpu: arm64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: Darwin 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:46\nPDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T8101 arm64\ncompiler info: clang: 14.0.0 (clang-1400.0.29.102)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /bin/zsh\n\n[Environment]\nUsing arm-native macOS terminal\nzsh --version:\nzsh 5.8.1 (x86_64-apple-darwin21.0)\n\n[Enabled Hooks]\n(none)\n"}]}