All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: Dimitar Bonev <dsbonev@gmail.com>
Cc: <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
	<jrnieder@gmail.com>
Subject: Re: Add porcelain command to revert a single staged file to its HEAD state while preserving its staged state
Date: Mon, 6 May 2013 11:51:55 +0200	[thread overview]
Message-ID: <87r4hkigg4.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <CADeMBopBvCmb4cz8p8vf-jXaOhfzP3GZKF94Efgsh-NOBs+d3Q@mail.gmail.com> (Dimitar Bonev's message of "Sun, 5 May 2013 01:46:28 +0300")

Dimitar Bonev <dsbonev@gmail.com> writes:

> One more argument against the suggestion of doing a commit ahead of
> time is that I like to think in separation to reduce complexity - in
> particular I like to think only for the working dir and index states,
> commits - I treat them as finished work. If I have to amend a commit,
> it is about fixing a mistake - adding/removing a wrong file, fixing a
> typo, that sort of things and not for actual work to be done.

Aside from what's been said already, there's a fundamental problem with
your approach: it doesn't scale in any direction.  You cannot use it if
you want to do the same dance with more than one version "set aside",
because the index gives you exactly one more storage area.  And it does
not generalize in any useful way, whereas using temporary commits is
useful also if you want to briefly leave a branch with unfinished work
to do something else.  Furthermore, knowing how to work with temporary
commits (in the plural), and clean them up using 'rebase -i', *is* a
part of "work to be done" in most git workflows.  Namely, it is used to
reshape your branch from a "how did I hack this up" angle into a "how do
I explain this to others" angle.

So I hope I'm not misconstruing what Junio and Jonathan said, but I
think you can sum up our position as: your proposal is a very specific
solution to a very narrow problem -- that is only needed because your
environment (PowerShell) is arguably broken.  All the while, there are
several existing solutions that we consider more natural, and that
generalize to other use-cases.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2013-05-06  9:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-04  7:34 Add porcelain command to revert a single staged file to its HEAD state while preserving its staged state Dimitar Bonev
2013-05-04  8:58 ` Thomas Rast
2013-05-04 11:13   ` Dimitar Bonev
2013-05-04 18:48     ` Jonathan Nieder
2013-05-04 19:56   ` Junio C Hamano
2013-05-04 20:01     ` Junio C Hamano
2013-05-04 22:46       ` Dimitar Bonev
2013-05-06  9:51         ` Thomas Rast [this message]
2013-05-06 14:52         ` Junio C Hamano
2013-05-07 20:39           ` Dimitar Bonev

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=87r4hkigg4.fsf@linux-k42r.v.cablecom.net \
    --to=trast@inf.ethz.ch \
    --cc=dsbonev@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@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.