All of
 help / color / mirror / Atom feed
From: Junio C Hamano <>
To: Sam Vilain <>
Cc: Petr Baudis <>,
Subject: Re: [PATCH] Fix cg-commit -p to not touch the working tree
Date: Mon, 12 Feb 2007 14:01:57 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <> (Sam Vilain's message of "Tue, 13 Feb 2007 09:22:12 +1300")

Sam Vilain <> writes:

> Junio C Hamano wrote:
>>> 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.

Ah, I see that's why you do want to leave the working tree
untouched.  I think '--cached' alone is the right way to spell
it (strictly speaking, giving --index and --cached should error
out, although the current implementation does not).

      reply	other threads:[~2007-02-12 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12  3:14 Sam Vilain
2007-02-12  4:25 ` Junio C Hamano
2007-02-12 20:22   ` Sam Vilain
2007-02-12 22:01     ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: [PATCH] Fix cg-commit -p to not touch the working tree' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.