From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Denis Bueno <dbueno@gmail.com>
Cc: Miklos Vajna <vmiklos@frugalware.org>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: git cherry-pick before archive
Date: Fri, 11 Jul 2008 19:53:17 +0100 (BST) [thread overview]
Message-ID: <alpine.DEB.1.00.0807111950540.8950@racer> (raw)
In-Reply-To: <6dbd4d000807111149s4fb661cak9fac152864260901@mail.gmail.com>
Hi,
On Fri, 11 Jul 2008, Denis Bueno wrote:
> On Fri, Jul 11, 2008 at 14:46, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> > BTW in your case, I would suggest this:
> >
> > INDEX_FILE=.git/bla git read-tree HEAD &&
> > INDEX_FILE=.git/bla git apply --cached patchfile &&
> > INDEX_FILE=.git/bla git archive [...] &&
> > rm .git/bla
> >
> > IOW: Just use a temporary index for your work.
>
> What is the rationale? So I can relieve the assumption that the index
> is clean?
Not completely.
It will just leave the current index alone, ignoring the changes within
it. It will also avoid having to update the index several times.
IMO it is just the thing you should do here: you do not want to stage
anything for commit, so keep .git/index as-is, and use a temporary staging
area instead.
It also avoids the need to "undo" things that might not be easily undone:
if your patch contains stuff that was partly in the index, but
uncommitted, neither "git reset" nor "git revert -n" will do what you
want.
Ciao,
Dscho
next prev parent reply other threads:[~2008-07-11 18:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 15:46 git cherry-pick before archive Denis Bueno
2008-07-11 15:51 ` Johannes Schindelin
2008-07-11 16:09 ` Denis Bueno
2008-07-11 16:11 ` Miklos Vajna
2008-07-11 16:18 ` Denis Bueno
2008-07-11 18:25 ` Johannes Schindelin
2008-07-11 18:28 ` Denis Bueno
2008-07-11 18:46 ` Johannes Schindelin
2008-07-11 18:49 ` Denis Bueno
2008-07-11 18:53 ` Johannes Schindelin [this message]
2008-07-11 22:18 ` Junio C Hamano
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.00.0807111950540.8950@racer \
--to=johannes.schindelin@gmx.de \
--cc=dbueno@gmail.com \
--cc=git@vger.kernel.org \
--cc=vmiklos@frugalware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox