Re: [RFC/PATCH 1/2] reset: learn to reset to tree

2012-12-05 Thread Martin von Zweigbergk
On Tue, Dec 4, 2012 at 9:46 PM, Junio C Hamano wrote: > Martin von Zweigbergk writes: > >> More importantly, when is it desirable not to delete deleted entries? > > When I am trying to check out contents of Documentation/ directory > as of an older edition because we made mistakes updating the fi

Re: [RFC/PATCH 1/2] reset: learn to reset to tree

2012-12-04 Thread Junio C Hamano
Martin von Zweigbergk writes: > More importantly, when is it desirable not to delete deleted entries? When I am trying to check out contents of Documentation/ directory as of an older edition because we made mistakes updating the files in recent versions, with "git checkout v1.9.0 Documentation/

Re: [RFC/PATCH 1/2] reset: learn to reset to tree

2012-12-04 Thread Martin von Zweigbergk
On Sat, Dec 1, 2012 at 1:24 AM, Junio C Hamano wrote: > Martin von Zweigbergk writes: > >> On Thu, Nov 29, 2012 at 2:00 PM, Martin von Zweigbergk >> wrote: >>> Slightly off topic, but another difference (or somehow another aspect >>> of the same difference?) that has tripped me up a few times is

Re: [RFC/PATCH 1/2] reset: learn to reset to tree

2012-12-01 Thread Junio C Hamano
Martin von Zweigbergk writes: > On Thu, Nov 29, 2012 at 2:00 PM, Martin von Zweigbergk > wrote: >> Slightly off topic, but another difference (or somehow another aspect >> of the same difference?) that has tripped me up a few times is that >> "git checkout $rev ." only affects added and modified

Re: [RFC/PATCH 1/2] reset: learn to reset to tree

2012-11-30 Thread Martin von Zweigbergk
On Thu, Nov 29, 2012 at 2:00 PM, Martin von Zweigbergk wrote: > Slightly off topic, but another difference (or somehow another aspect > of the same difference?) that has tripped me up a few times is that > "git checkout $rev ." only affects added and modified files (in $rev > compared to HEAD), bu

Re: [RFC/PATCH 1/2] reset: learn to reset to tree

2012-11-29 Thread Martin von Zweigbergk
On Thu, Nov 29, 2012 at 11:13 AM, Junio C Hamano wrote: > [...]These > two commands, "reset" and "checkout", share that the source we grab > the blobs out of only need to be a tree and does not have to be a > commit, and the only difference between them is where the blobs we > grabbed out of that

Re: [RFC/PATCH 1/2] reset: learn to reset to tree

2012-11-29 Thread Junio C Hamano
Martin von Zweigbergk writes: > Would the correct fix be to > first make "git reset --hard -- $path" work (*sigh*)? I have never > understood why that doesn't (shouldn't) work. What does it even mean, even when you are on an existing commit, to hard reset partially? Perhaps you looking for "git

Re: [RFC/PATCH 1/2] reset: learn to reset to tree

2012-11-29 Thread Junio C Hamano
Junio C Hamano writes: > Martin von Zweigbergk writes: > >> In cases where HEAD is not supposed to be updated, there is no reason >> that "git reset" should require a commit, a tree should be enough. So >> make "git reset $rev^{tree}" work just like "git reset $rev", except >> that the former wi

Re: [RFC/PATCH 1/2] reset: learn to reset to tree

2012-11-29 Thread Martin von Zweigbergk
On Thu, Nov 29, 2012 at 10:47 AM, Junio C Hamano wrote: > Martin von Zweigbergk writes: > >> In cases where HEAD is not supposed to be updated, there is no reason >> that "git reset" should require a commit, a tree should be enough. So >> make "git reset $rev^{tree}" work just like "git reset $re

Re: [RFC/PATCH 1/2] reset: learn to reset to tree

2012-11-29 Thread Junio C Hamano
Martin von Zweigbergk writes: > In cases where HEAD is not supposed to be updated, there is no reason > that "git reset" should require a commit, a tree should be enough. So > make "git reset $rev^{tree}" work just like "git reset $rev", except > that the former will not update HEAD (since there

[RFC/PATCH 1/2] reset: learn to reset to tree

2012-11-29 Thread Martin von Zweigbergk
In cases where HEAD is not supposed to be updated, there is no reason that "git reset" should require a commit, a tree should be enough. So make "git reset $rev^{tree}" work just like "git reset $rev", except that the former will not update HEAD (since there is no commit to point it to). Disallow