git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Pat Thoyts <patthoyts@users.sourceforge.net>
Date
Sep 17, 2012, 11:52 UTC
Message-ID
<878vc8kgsf.fsf@fox.patthoyts.tk>
In-Reply-To
<7vobm8rllv.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 32 quoted lines
>Beat Bolli <bbolli@ewanet.ch> writes:
>
>> 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 <bbolli@ewanet.ch>
>> ---
>>  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?
>

I agree - this looks like the code in contrib/examples/git-commit.sh so presumably predates the builtin 'commit' command. For now I've applied the above - but this should be changed to just call commit normally from what I can see. Thats added to my todo.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 6 in “git-gui: Fix a loose/lose mistake”
  1. 1/2 git-gui: Fix a loose/lose mistakeBeat Bolli, Aug 18, 2012
  2. 2/2 git-gui: remove .git/CHERRY_PICK_HEAD after committingBeat Bolli, Aug 18, 2012
  3. Junio C HamanoAug 18, 2012
  4. Pat ThoytsSep 17, 2012
  5. Junio C HamanoAug 18, 2012
  6. Pat ThoytsSep 17, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.