Re: [PATCH 0/2] Support `git reset --stdin`

2016-10-11 Thread Junio C Hamano
Jeff King writes: > Anyway, the existence of this discussion is probably a good argument in > favor of Dscho's patch. I was mostly curious how close our plumbing > tools could come. Sure, in 100% agreement.

Re: [PATCH 0/2] Support `git reset --stdin`

2016-10-11 Thread Jeff King
On Tue, Oct 11, 2016 at 02:36:31PM -0700, Junio C Hamano wrote: > > True. I'd have done something more like: > > > > git ls-tree -r $paths | git update-index --index-info > > > > but there are some corner cases around deleting paths from the index. > > Ah, I would think read-tree has the exact

Re: [PATCH 0/2] Support `git reset --stdin`

2016-10-11 Thread Junio C Hamano
Jeff King writes: >> If read-tree had pathspec support (i.e. "read these and only these >> paths given from the command line into the index from a given >> tree-ish"), that would have been the most natural place to extend >> with "oh, by the way, instead of the command line, you can feed the >> p

Re: [PATCH 0/2] Support `git reset --stdin`

2016-10-11 Thread Jeff King
On Tue, Oct 11, 2016 at 12:27:21PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Is git-reset the right layer to add scripting features? I thought we > > usually pushed people doing mass index manipulation to use update-index > > or read-tree. Is there something that reset makes easy th

Re: [PATCH 0/2] Support `git reset --stdin`

2016-10-11 Thread Junio C Hamano
Jeff King writes: > Is git-reset the right layer to add scripting features? I thought we > usually pushed people doing mass index manipulation to use update-index > or read-tree. Is there something that reset makes easy that is hard with > those tools (I could imagine "--hard", but I see it is no

Re: [PATCH 0/2] Support `git reset --stdin`

2016-10-11 Thread Jeff King
On Tue, Oct 11, 2016 at 06:08:56PM +0200, Johannes Schindelin wrote: > This feature was missing, and made it cumbersome for third-party > tools to reset a lot of paths in one go. > > Support for --stdin has been added, following builtin/checkout-index.c's > example. Is git-reset the right layer

[PATCH 0/2] Support `git reset --stdin`

2016-10-11 Thread Johannes Schindelin
This feature was missing, and made it cumbersome for third-party tools to reset a lot of paths in one go. Support for --stdin has been added, following builtin/checkout-index.c's example. Johannes Schindelin (2): reset: fix usage reset: support the --stdin option Documentation/git-reset.tx