Re: [PATCH] describe --contains: default to HEAD when no commit-ish is given

2015-08-24 Thread Junio C Hamano
SZEDER Gábor writes: >> By the way, I usually prefer a fatter 'else' clause when everything >> else is equal, i.e. >> >> if (!argc) >> argv_array_push(&args, "HEAD"); /* default to HEAD */ >> else { >> while (*argv) { >> ... >>

Re: [PATCH] describe --contains: default to HEAD when no commit-ish is given

2015-08-24 Thread SZEDER Gábor
Quoting Junio C Hamano : @@ -443,10 +443,13 @@ int cmd_describe(int argc, const char **argv, const char *prefix) if (pattern) argv_array_pushf(&args, "--refs=refs/tags/%s", pattern); } - while (*argv) { -

Re: [PATCH] describe --contains: default to HEAD when no commit-ish is given

2015-08-21 Thread Junio C Hamano
SZEDER Gábor writes: > 'git describe --contains' doesn't default to HEAD when no commit is > given, and it doesn't produce any output, not even an error: > > ~/src/git ((v2.5.0))$ ./git describe --contains > ~/src/git ((v2.5.0))$ ./git describe --contains HEAD > v2.5.0^0 Good spotting. I t