mirror of
https://github.com/git/git.git
synced 2026-03-13 18:33:25 +01:00
Revert "git-gui: Don't create empty (same tree as parent) commits."
This reverts commit 51bd9d7b8c.
It introduced a git invocation that involves ^{tree}. It seems that MSYS's
wish does some quoting for Bourne shells, in particular, escape the first
'{', but then it uses cmd.exe to run the command, which does not remove
the backslash, so that the resulting ref expression ends up in git's guts
as unrecognizable garbage.
This commit is contained in:
@@ -1269,24 +1269,6 @@ proc commit_committree {fd_wt curHEAD msg} {
|
||||
return
|
||||
}
|
||||
|
||||
# -- Verify this wasn't an empty change.
|
||||
#
|
||||
if {$commit_type eq {normal}} {
|
||||
set old_tree [git rev-parse "$PARENT^{tree}"]
|
||||
if {$tree_id eq $old_tree} {
|
||||
info_popup {No changes to commit.
|
||||
|
||||
No files were modified by this commit and it
|
||||
was not a merge commit.
|
||||
|
||||
A rescan will be automatically started now.
|
||||
}
|
||||
unlock_index
|
||||
rescan {set ui_status_value {No changes to commit.}}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
# -- Build the message.
|
||||
#
|
||||
set msg_p [gitdir COMMIT_EDITMSG]
|
||||
|
||||
Reference in New Issue
Block a user