Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/2] git-gui: remove .git/CHERRY_PICK_HEAD after committing

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:30

Beat Bolli [off-list ref] writes:
quoted hunk
Adding __git_ps1() to one's bash prompt displays various repo status
info after each command. After committing a git cherry-pick -n using
git-gui, the prompt still contains the "|CHERRY-PICKING" flag.

Delete the file causing this flag when cleaning up.

Signed-off-by: Beat Bolli <redacted>
---
 git-gui/lib/commit.tcl |    1 +
 1 file changed, 1 insertion(+)
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl
index 78c5eeb..864b687 100644
--- a/git-gui/lib/commit.tcl
+++ b/git-gui/lib/commit.tcl
@@ -409,6 +409,7 @@ A rescan will be automatically started now.
 	catch {file delete [gitdir MERGE_MSG]}
 	catch {file delete [gitdir SQUASH_MSG]}
 	catch {file delete [gitdir GITGUI_MSG]}
+	catch {file delete [gitdir CHERRY_PICK_HEAD]}
 
 	# -- Let rerere do its thing.
 	#
It makes me wonder if the above sequence of file delete should all
be removed and use "git commit" instead of "git commit-tree" in the
implementation of this Tcl procedure instead.

Pat?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help