git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Cc: Jeff King <peff@peff.net>,
	Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] update-index: add --swap to swap index and worktree content
Date: Wed, 17 Aug 2011 11:26:26 -0700	[thread overview]
Message-ID: <7vr54jevxp.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAOeW2eFx-ETS+1a5b2bUXeT8JJ0WGudKGyF6mxuqyK2OM35qQA@mail.gmail.com> (Martin von Zweigbergk's message of "Wed, 17 Aug 2011 10:13:08 -0400")

Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:

> Maybe the above shows that I'm missing something. Still, would it be
> possible to achieve the use case with something like the following?
>
> git stash --keep-index

While I sense a vague aversion to committing in general in this
discussion, which I am not particularly fond of, the whole point of
"stash" is to avoid the mental burden of going over the "hump" of
committing something not ready and to replace it with a "save it as a
temporary state" that technically has the same overhead of committing but
has a lot less mental overhead. Perhaps "swapping the state of all and/or
selected paths" fits better in "stash", not "update-index"?

I dunno, but in general, a new feature to cater to _common_ end user needs
should fit in the Porcelain layer. We would be doing something wrong if we
need to teach an obscure option of lower plumbing to end users.

I personally used to feel that "ls-files -u" during a conflicted merge to
be the single sore-thumb that stuck out from this point of view, but these
days "status -s" gives the same information in a more useful way to the
end users, and I am reasonably happy with that. It may be that the end
user operation (perhaps "stash --swap", but I am not married to that) that
fits well in common workflows ends up using "update-index --swap" as an
underlying implementation detail, but I'd prefer to see how the final end
user experience using Porcelain would look like first.

  parent reply	other threads:[~2011-08-17 18:26 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 [this message]
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=7vr54jevxp.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=martin.von.zweigbergk@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).