All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] update-index: add --swap to swap index and worktree content
Date: Wed, 17 Aug 2011 21:01:35 -0400	[thread overview]
Message-ID: <CAOeW2eG5LsNLCpdXvphRqkDZZMTRrHiA1-82ckkfWntKvQ7XFg@mail.gmail.com> (raw)
In-Reply-To: <20110817194621.GA352@sigill.intra.peff.net>

On Wed, Aug 17, 2011 at 3:46 PM, Jeff King <peff@peff.net> wrote:
> On Wed, Aug 17, 2011 at 10:13:08AM -0400, Martin von Zweigbergk wrote:
>
>> >> 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:
>>
>> Maybe a stupid question, but "update-index --swap" would swap all
>> files, right? So what "other files from the index" would there be?
>
> Hmm. I hadn't really considered swapping everything.

Ah, then I see where the misunderstanding lay. I didn't read the
patch; maybe it would have been clear if I did (and understood it).

> I suppose that
> would work, though I do worry about getting into a confused state when
> you have swapped one or more files individually, and then want to swap
> the rest out for testing.

I have a feeling that I would get confused if I started swapping more
than one individual file, so to me it feels like it's more the
possibility of swapping individual files that could cause confusion,
whether or not it is possible to swap all.

I think stashing the work tree feels more right, though. All you
really want is to get the work tree version out of the way for a
while, you don't really want it in the index.

Martin

      reply	other threads:[~2011-08-18  1:01 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
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 [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:
  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=CAOeW2eG5LsNLCpdXvphRqkDZZMTRrHiA1-82ckkfWntKvQ7XFg@mail.gmail.com \
    --to=martin.von.zweigbergk@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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.