Re: [PATCH] log: diagnose empty HEAD more clearly

2015-06-05 Thread Junio C Hamano
Jeff King p...@peff.net writes: But if you are OK to eventually stop dying, I think this line of reasoning is OK. diff --git a/builtin/log.c b/builtin/log.c index 4c4e6be..3b568a1 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -148,6 +148,9 @@ static void cmd_log_init_finish(int argc,

Re: [PATCH] log: diagnose empty HEAD more clearly

2015-06-04 Thread Stefan Näwe
Am 03.06.2015 um 19:24 schrieb Junio C Hamano: Jeff King p...@peff.net writes: My concern there would be risk of regression. I.e., that we would take some case which used to error out and turn it into a silent noop. So I'd prefer to keep the behavior the same, and just modify the error code

Re: [PATCH] log: diagnose empty HEAD more clearly

2015-06-04 Thread Jeff King
On Wed, Jun 03, 2015 at 10:24:02AM -0700, Junio C Hamano wrote: Which is what led me to say Why are we defaulting to HEAD before checking if it even exists? Isn't that the root cause of this confusion? What happens if we stopped doing it? And I think the diagnose after finding that

Re: [PATCH] log: diagnose empty HEAD more clearly

2015-06-04 Thread Jeff King
On Thu, Jun 04, 2015 at 09:31:04AM +0200, Stefan Näwe wrote: + if (!rev-pending.nr !opt-def) + die(you do not have a commit yet on your branch); I am not a native english speaker but shouldn't this be: you do not have a commit on your branch yet Both are fine, as is:

[PATCH] log: diagnose empty HEAD more clearly

2015-06-03 Thread Jeff King
On Tue, Jun 02, 2015 at 11:48:30PM -0700, Junio C Hamano wrote: I am kind of surprised after reading these two threads that my take on this issue has changed over time, as my knee-jerk reaction before reading them was the opposite, something along the lines of This is only immediately after

Re: [PATCH] log: diagnose empty HEAD more clearly

2015-06-03 Thread Junio C Hamano
Jeff King p...@peff.net writes: My concern there would be risk of regression. I.e., that we would take some case which used to error out and turn it into a silent noop. So I'd prefer to keep the behavior the same, and just modify the error code path. The end result is pretty similar to the