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] ls-tree: make optional

2018-07-03 Thread Joshua Nelson
On 07/03/2018 07:53 PM, Joshua Nelson wrote: > diff --git a/t/t3104-ls-tree-optional-args.sh > b/t/t3104-ls-tree-optional-args.sh > new file mode 100755 > index 0..e9d8389bc > --- /dev/null > +++ b/t/t3104-ls-tree-optional-args.sh > @@ -0,0 +1,63 @@ > +#!/bin/sh

[PATCH] ls-tree: make optional

2018-07-03 Thread Joshua Nelson
. If '--' is not in args: a) If args[0] is a valid object, treat it as such b) Else, assume to be HEAD In all cases, every argument besides is treated as a . Signed-off-by: Joshua Nelson --- Documentation/git-ls-tree.txt| 2 +- builtin/ls-tree.c| 40

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

2018-07-03 Thread Joshua Nelson
h ill-intent. > > On Mon, Jul 2, 2018 at 11: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: > > Nit: Capitalize first word of each sentence. >

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

2018-07-03 Thread Joshua Nelson
, Elijah Newren wrote: > 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`.

[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

[PATCH 3/3] ls-tree: add unit tests for arguments

2018-07-02 Thread Joshua Nelson
Signed-off-by: Joshua Nelson --- t/t3104-ls-tree-optional-args.sh | 43 1 file changed, 43 insertions(+) create mode 100644 t/t3104-ls-tree-optional-args.sh diff --git t/t3104-ls-tree-optional-args.sh t/t3104-ls-tree-optional-args.sh new file mode 100644 index

[PATCH 2/3] ls-tree: update usage info

2018-07-02 Thread Joshua Nelson
show [tree-ish] and [--] as optional --- builtin/ls-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git builtin/ls-tree.c builtin/ls-tree.c index 14102b052..c5649b09c 100644 --- builtin/ls-tree.c +++ builtin/ls-tree.c @@ -26,7 +26,7 @@ static int chomp_prefix; static const

Re: [Feature request] Add config option to gpgsign IFF key is present

2018-03-11 Thread Joshua Nelson
I like having machine-specific config in ~/.config/git, I think I'll do that. I didn't realize you could forward gpg-agent over a connection, I may look further into that. Thanks for the help! Joshua Nelson On Sunday, March 11, 2018 17:21:42 EDT brian m. carlson wrote: > On Sat, Mar 10, 2