Re: Add porcelain command to revert a single staged file to its HEAD state while preserving its staged state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dimitar Bonev <dsbonev@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]