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

Re: [PATCH] Fix cg-commit -p to not touch the working tree

From
Sam Vilain <sam@vilain.net>
Date
Feb 12, 2007, 20:22 UTC
Message-ID
<45D0CC74.9020606@vilain.net>
In-Reply-To
<7v8xf4atoe.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 12 quoted lines
>> Previously, the working tree state was modified with `patch', which
>> was a fragile operation.  Do everything with `git-apply --cached
>> --index' instead.
>>     
> I do not use Cogito so I do not know what behaviour is wanted
> here, but '--cached --index' is same as saying just '--cached'
> as far as I know.  It will patch against the index and should
> not touch working tree.  If the original used 'patch' to apply,
> I suspect it wanted to touch the working tree (and possibly, it
> wanted to leave the index alone?), so --cached might be
> completely wrong thing to use here?
>   

The context is that "cg-commit -p", a kind of poor man's interactive commit that lets you preview changes that are to be committed in 'diff' form, and edit the patch to be applied. Many users expect this command to behave this way; they're quite surprised and sometimes even miffed when the changes they deleted from the patch are gone from their working copy.

Sam.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “Fix cg-commit -p to not touch the working tree”
  1. Fix cg-commit -p to not touch the working treeSam Vilain, Feb 12, 2007
  2. Junio C HamanoFeb 12, 2007
  3. Sam VilainFeb 12, 2007
  4. Junio C HamanoFeb 12, 2007

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.