-
-
Notifications
You must be signed in to change notification settings - Fork 90
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 reword
on a public commit loses the message edits, wrong hint in error message
#515
Comments
git reword
on a public commit loses the message edits, wrong hintgit reword
on a public commit loses the message edits, wrong hint in error message
The editor message is similarly lost if you try to |
Hi @ilyagr. Thanks for this report. I've opened #518 to fix the incorrect option name. As for losing the message edits, I think the |
Thanks for reporting. Besides better reword commit message recovery, it would probably be best to verify the rebase plan before prompting the user for a commit message. Currently, we only verify the rebase plan as part of trying to execute it. The best approach is probably either
|
Description of the bug
git reword
.Expected behavior
You get an error message telling you to use the
--force-rewrite
option.Actual behavior
The editor opens, lets you edit the commit message. After saving the message, you get an error message and the edits are lost.
Moreover, the message tells you to use an
--force
option, which doesn't exist.The exact error I got:
Version of
rustc
No response
Automated bug report
Software version
git-branchless 0.4.0 (v0.3.6-nixos.0-494-gedb6e91)
Operating system
Linux 5.10.120-16471-g167ad2e5dcba
Command-line
Environment variables
Git version
Hooks
Show 6 hooks
Hook
post-commit
Hook
post-merge
Hook
post-rewrite
Hook
post-checkout
Hook
pre-auto-gc
Hook
reference-transaction
Events
Show 5 events
Event ID: 238, transaction ID: 991 (message: hide)
ObsoleteEvent { timestamp: 1661646039.3376951, event_tx_id: EventTransactionId(991), commit_oid: NonZeroOid(901f990cf5816bbe8519ac98a913be2a520f5d05) }
ObsoleteEvent { timestamp: 1661646039.3376951, event_tx_id: EventTransactionId(991), commit_oid: NonZeroOid(b0eb5dcfd556018e5db3ea0725e8530e0eb730dd) }
ObsoleteEvent { timestamp: 1661646039.3376951, event_tx_id: EventTransactionId(991), commit_oid: NonZeroOid(84ad5109376996ac9a3a28a01ed042c3978c8fad) }
ObsoleteEvent { timestamp: 1661646039.3376951, event_tx_id: EventTransactionId(991), commit_oid: NonZeroOid(7244e1081ab525dc9d2be9d9391518b89dae94d8) }
ObsoleteEvent { timestamp: 1661646039.3376951, event_tx_id: EventTransactionId(991), commit_oid: NonZeroOid(f9689c1f2db03870e4fe43079bcdb28dd565d85c) }
ObsoleteEvent { timestamp: 1661646039.3376951, event_tx_id: EventTransactionId(991), commit_oid: NonZeroOid(85b3f46b9855600799f3ac8749d688f02bef2320) }
ObsoleteEvent { timestamp: 1661646039.3376951, event_tx_id: EventTransactionId(991), commit_oid: NonZeroOid(d1905c643e774abe7029c9c3a35c2ffd156d66a0) }
ObsoleteEvent { timestamp: 1661646039.3376951, event_tx_id: EventTransactionId(991), commit_oid: NonZeroOid(9a41b9d96fda8de3bcc5cca6f7c27ebb2c13ead3) }
ObsoleteEvent { timestamp: 1661646039.3376951, event_tx_id: EventTransactionId(991), commit_oid: NonZeroOid(a90236a1e3b9f2a9f38624d4a56899bb29a85fa9) }
Event ID: 234, transaction ID: 987 (message: move)
RefUpdateEvent { timestamp: 1661646003.0112278, event_tx_id: EventTransactionId(987), ref_name: "refs/heads/redacted-ref-8", old_oid: 7842f3b4245efb9441dccfcacd4b409cc51e3f1e, new_oid: 461c683c214fd023e66caaa8f0ca79df47e7b69c, message: None }
RewriteEvent { timestamp: 1661646003.1750474, event_tx_id: EventTransactionId(987), old_commit_oid: 7842f3b4245efb9441dccfcacd4b409cc51e3f1e, new_commit_oid: 461c683c214fd023e66caaa8f0ca79df47e7b69c }
WorkingCopySnapshot { timestamp: 1661646003.2148836, event_tx_id: EventTransactionId(987), head_oid: 51298b485b9737a7d121d3febef3d9961a267d9e, commit_oid: NonZeroOid(fff1dcfc54ead137818ad556a8c0c52963fb2f8a), ref_name: None }
RefUpdateEvent { timestamp: 1661646003.2996902, event_tx_id: EventTransactionId(987), ref_name: "HEAD", old_oid: 51298b485b9737a7d121d3febef3d9961a267d9e, new_oid: 51298b485b9737a7d121d3febef3d9961a267d9e, message: None }
Event ID: 233, transaction ID: 966 (message: pushf)
RefUpdateEvent { timestamp: 1661645611.1930046, event_tx_id: EventTransactionId(966), ref_name: "refs/remotes/origin/main", old_oid: 0000000000000000000000000000000000000000, new_oid: 51298b485b9737a7d121d3febef3d9961a267d9e, message: None }
Event ID: 231, transaction ID: 964 (message: revise)
RefUpdateEvent { timestamp: 1661645605.2085924, event_tx_id: EventTransactionId(964), ref_name: "refs/heads/redacted-ref-9", old_oid: a90236a1e3b9f2a9f38624d4a56899bb29a85fa9, new_oid: 51298b485b9737a7d121d3febef3d9961a267d9e, message: None }
RefUpdateEvent { timestamp: 1661645605.2085924, event_tx_id: EventTransactionId(964), ref_name: "HEAD", old_oid: a90236a1e3b9f2a9f38624d4a56899bb29a85fa9, new_oid: 51298b485b9737a7d121d3febef3d9961a267d9e, message: None }
Event ID: 230, transaction ID: 960 (message: rebase)
RefUpdateEvent { timestamp: 1661645570.2667537, event_tx_id: EventTransactionId(960), ref_name: "refs/heads/redacted-ref-9", old_oid: 0000000000000000000000000000000000000000, new_oid: a90236a1e3b9f2a9f38624d4a56899bb29a85fa9, message: None }
Version of
git-branchless
No response
Version of
git
No response
The text was updated successfully, but these errors were encountered: