Re: [PATCH 1/3] ls-tree: make optional

2018-07-06 Thread Junio C Hamano
Joshua Nelson writes: > On 07/06/2018 01:01 PM, Junio C Hamano wrote: >> Elijah Newren writes: >> I'd prefer *not* to have such a DWIM in a command like ls-tree, aka plumbing commands, where predictability is worth 1000 times more than ease of typing. >>> >>> Fair enough.

Re: [PATCH 1/3] ls-tree: make optional

2018-07-06 Thread Joshua Nelson
On 07/06/2018 01:01 PM, Junio C Hamano wrote: > Elijah Newren writes: > >>> I'd prefer *not* to have such a DWIM in a command like ls-tree, aka >>> plumbing commands, where predictability is worth 1000 times more >>> than ease of typing. >> >> Fair enough. However, what if no or are

Re: [PATCH 1/3] ls-tree: make optional

2018-07-06 Thread Junio C Hamano
Elijah Newren writes: >> I'd prefer *not* to have such a DWIM in a command like ls-tree, aka >> plumbing commands, where predictability is worth 1000 times more >> than ease of typing. > > Fair enough. However, what if no or are specified, > though -- would you be okay with the HEAD being

Re: [PATCH 1/3] ls-tree: make optional

2018-07-04 Thread Eric Sunshine
On Tue, Jul 3, 2018 at 7:15 PM Joshua Nelson wrote: > On 07/03/2018 03:15 AM, Eric Sunshine wrote: > >> + /* taken from checkout.c; > >> +* we have a simpler case because we never create a branch > >> */ > > > > However, this comment doesn't belong in the code, as

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Joshua Nelson
On 07/03/2018 03:15 AM, Eric Sunshine wrote: > Thanks for contributing to Git. As this seems to be your first > submission to the project, don't be alarmed by the extent and nature > of the review comments. They are intended to help you polish the > submission, and are not meant with ill-intent.

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Joshua Nelson
Agreed, ls-tree when called with no arguments was the main use case I wrote this for; the rest was mostly because other commands allow greater ambiguity and I wanted to make the syntax consistent. I don't mind doing this for rev-list as well if that's a useful feature. On 07/03/2018 06:55 PM,

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Elijah Newren
On Tue, Jul 3, 2018 at 3:05 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> On Mon, Jul 2, 2018 at 8:58 PM, Joshua Nelson wrote: >>> use syntax similar to `git-checkout` to make optional for >>> `ls-tree`. if is omitted, default to HEAD. infer arguments as >>> follows: >>> >>> 1. if

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Junio C Hamano
Elijah Newren writes: > On Mon, Jul 2, 2018 at 8:58 PM, Joshua Nelson wrote: >> use syntax similar to `git-checkout` to make optional for >> `ls-tree`. if is omitted, default to HEAD. infer arguments as >> follows: >> >> 1. if args start with -- >> assume to be HEAD >> 2. if exactly

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Eric Sunshine
Thanks for contributing to Git. As this seems to be your first submission to the project, don't be alarmed by the extent and nature of the review comments. They are intended to help you polish the submission, and are not meant with ill-intent. On Mon, Jul 2, 2018 at 11:58 PM Joshua Nelson wrote:

Re: [PATCH 1/3] ls-tree: make optional

2018-07-03 Thread Elijah Newren
On Mon, Jul 2, 2018 at 8:58 PM, Joshua Nelson wrote: > use syntax similar to `git-checkout` to make optional for > `ls-tree`. if is omitted, default to HEAD. infer arguments as > follows: > > 1. if args start with -- > assume to be HEAD > 2. if exactly one arg precedes --, treat the

[PATCH 1/3] ls-tree: make optional

2018-07-02 Thread Joshua Nelson
use syntax similar to `git-checkout` to make optional for `ls-tree`. if is omitted, default to HEAD. infer arguments as follows: 1. if args start with -- assume to be HEAD 2. if exactly one arg precedes --, treat the argument as 3. if more than one arg precedes --, exit with an error