All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] update-index: add --swap to swap index and worktree content
Date: Tue, 16 Aug 2011 19:17:27 -0700	[thread overview]
Message-ID: <20110817021727.GA29585@sigill.intra.peff.net> (raw)
In-Reply-To: <CACsJy8Ad4xPz79jT3O64c3XsCeM8XETJ9bnjK0aisagrYN0CMA@mail.gmail.com>

On Wed, Aug 17, 2011 at 09:11:32AM +0700, Nguyen Thai Ngoc Duy wrote:

> I blame git for training me always do "git diff" before update index.
> But if we add "add -e", I could also make "add -e -p" work, (edit
> temporary file first, then fall back to interactive mode and let me
> review my changes).

Yeah, that would be cool. But note that "git add -e" already exists for
patch editing.

> Two reasons. I already mentioned the ability to quickly checkout index
> for a quick test (though there could be more problems down that road).

That's a good thought. However, in practice, I find I also need other
files from the index to do a successful test. So I end up just
committing what I think is right, and then afterwards do:

  GIT_EDITOR='sed -i "/^pick .*/aexec make test/"' git rebase -i

to test and fixup each commit individually.

You could probably use "checkout-index" to create a pristine workspace
to test. It's a little inefficient to write out all of the files again,
but probably the actual build and test procedure would be much more
expensive, anyway.

-Peff

  reply	other threads:[~2011-08-17  2:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 14:07 [PATCH] update-index: add --swap to swap index and worktree content Nguyễn Thái Ngọc Duy
2011-08-16 13:01 ` Michael J Gruber
2011-08-16 14:45   ` Nguyen Thai Ngoc Duy
2011-08-16 20:01 ` Junio C Hamano
2011-08-16 21:01   ` Jeff King
2011-08-16 21:56     ` Junio C Hamano
2011-08-16 22:22       ` Jeff King
2011-08-16 23:01         ` Junio C Hamano
2011-08-16 23:06           ` Jeff King
2011-08-17  2:11             ` Nguyen Thai Ngoc Duy
2011-08-17  2:17               ` Jeff King [this message]
2011-08-17 14:13                 ` Martin von Zweigbergk
2011-08-17 14:32                   ` Nguyen Thai Ngoc Duy
2011-08-17 18:26                   ` Junio C Hamano
2011-08-17 19:46                   ` Jeff King
2011-08-18  1:01                     ` Martin von Zweigbergk

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=20110817021727.GA29585@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    /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 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.