-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git move
not working as expected: deletes branches, doesn't rebase anything
#911
Comments
I guess this was an artifact of my test commits being empty; make_commit() {
touch "$1" && git add "$1" && git commit -m "$1"
}
git init --initial-branch master
make_commit A
make_commit B
git branch feature
make_commit F
git checkout feature
make_commit C
git checkout -b feature-a
make_commit D
git checkout -b feature-b feature
make_commit E
git checkout feature
git branchless init --main-branch master In this case, git log --graph --all --format=%s%d
# * D (feature-a)
# | * E (feature-b)
# |/
# * C (HEAD -> feature)
# * F (master)
# * B
# * A So I will close this. I ran into this problem while trying to minimize a different problem with |
FWIW, I tried the original example with |
Under
You saw this behavior because it modeled the first situation, and that's why toggling |
I came across this issue after encountering surprising behaviour in |
Description of the bug
I learned about
git-branchless move
from this @arxanas SO answer, but it's not working as expected.Create empty repo, initialize as in example above
Verify repo state:
Run suggested
git move
command:Expected behavior
Subtree rooted at "C"/
feature
(including "D"/feature-a
and "E"/feature-b
) is rebased onto "F"/master
:Actual behavior
My branches have been deleted (
feature
,feature-a
,feature-b
), and nothing has been rebased or moved, from what I can tell:Version of
rustc
No response
Automated bug report
Software version
git-branchless 0.7.0 (6c6faec-modified)
Operating system
macOS 13.1 (Darwin 22.2.0)
Command-line
Environment variables
Git version
Hooks
Show 7 hooks
Hook
post-applypatch
Hook
post-checkout
Hook
post-commit
Hook
post-merge
Hook
post-rewrite
Hook
pre-auto-gc
Hook
reference-transaction
Events
Show 5 events
Event ID: 1, transaction ID: 1 (message: move)
RefUpdateEvent { timestamp: 1681996830.387656, event_tx_id: EventTransactionId(1), ref_name: ReferenceName("refs/heads/redacted-ref-0"), old_oid: a1dc7976f3acbd8daa03e26216e5c45c265083d0, new_oid: 0000000000000000000000000000000000000000, message: None }
RefUpdateEvent { timestamp: 1681996830.387656, event_tx_id: EventTransactionId(1), ref_name: ReferenceName("refs/heads/redacted-ref-1"), old_oid: 8dc5c5ea575ab652149f41f8d6576988bd08bdbb, new_oid: 0000000000000000000000000000000000000000, message: None }
RefUpdateEvent { timestamp: 1681996830.387656, event_tx_id: EventTransactionId(1), ref_name: ReferenceName("refs/heads/redacted-ref-2"), old_oid: 4e2f69c85f503655d7df4ecc9cb47f59caa07779, new_oid: 0000000000000000000000000000000000000000, message: None }
RewriteEvent { timestamp: 1681996830.57985, event_tx_id: EventTransactionId(1), old_commit_oid: 8dc5c5ea575ab652149f41f8d6576988bd08bdbb, new_commit_oid: 0000000000000000000000000000000000000000 }
RewriteEvent { timestamp: 1681996830.57985, event_tx_id: EventTransactionId(1), old_commit_oid: 4e2f69c85f503655d7df4ecc9cb47f59caa07779, new_commit_oid: 0000000000000000000000000000000000000000 }
RewriteEvent { timestamp: 1681996830.57985, event_tx_id: EventTransactionId(1), old_commit_oid: a1dc7976f3acbd8daa03e26216e5c45c265083d0, new_commit_oid: 0000000000000000000000000000000000000000 }
WorkingCopySnapshot { timestamp: 1681996830.599858, event_tx_id: EventTransactionId(1), head_oid: 8dc5c5ea575ab652149f41f8d6576988bd08bdbb, commit_oid: NonZeroOid(a33f73208bba12d31d48754228f319a376a0a4ec), ref_name: None }
RefUpdateEvent { timestamp: 1681996830.746192, event_tx_id: EventTransactionId(1), ref_name: ReferenceName("HEAD"), old_oid: 8dc5c5ea575ab652149f41f8d6576988bd08bdbb, new_oid: 8c224301419717fd8afeb72446fd5f4c1f75742c, message: None }
There are no previous available events.
There are no previous available events.
There are no previous available events.
There are no previous available events.
Version of
git-branchless
No response
Version of
git
No response
The text was updated successfully, but these errors were encountered: