All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] update-index: add --swap to swap index and worktree content
Date: Tue, 16 Aug 2011 16:01:57 -0700	[thread overview]
Message-ID: <7vzkj9eza2.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110816222212.GA19471@sigill.intra.peff.net> (Jeff King's message of "Tue, 16 Aug 2011 15:22:12 -0700")

Jeff King <peff@peff.net> writes:

>> > So the swap really functions as a toggle of "I would like to work on
>> > the index version for a minute", and then you toggle back when you're
>> > done.
>> 
>> And you have to redo what you did to the index version in the working tree
>> after the second "swap", no?
>
> No. The point is that I _already_ did it in the working tree version

But that does not change that you have to do that twice. You may already
have done so in the working tree, and then redo it in the old indexed
version again.

> while doing my s/hello/goodbye/ change (let's call this the "new
> change"). And ideally I would just use "git add -p" to stage only the
> s/word/world/ change (let's call this the "fixup"). But they're tangled
> in a single hunk, and I need some way of splitting them.

As a way to punt from making "add -e" usable, I'd think it would be a
workable q&d workaround, even though it feels wrong, and I would imagine
that normal people would probably prefer the "check out to a temporary
file to be edited" solution you wrote in your previous message.

  reply	other threads:[~2011-08-16 23:02 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 [this message]
2011-08-16 23:06           ` Jeff King
2011-08-17  2:11             ` Nguyen Thai Ngoc Duy
2011-08-17  2:17               ` Jeff King
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=7vzkj9eza2.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /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.