Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-24 Thread Junio C Hamano
Jeff King writes: > I see you ended up with a test that uses test_terminal, which is much > better (and your patch looks good to me). > > But I was concerned that there might be a bug in pager_in_use(), so I > dug into it a little. I think the code there is correct; it's just >

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-24 Thread Jeff King
On Thu, Mar 23, 2017 at 10:52:34AM -0600, Alex Henrie wrote: > Unfortunately, I think I found a bug. Even when using `git -p`, the > function pager_in_use() always returns false if the output is not a > TTY. So, `isatty(1) || pager_in_use()` and `color_stdout_is_tty || > (pager_in_use() &&

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-23 Thread Alex Henrie
2017-03-23 12:03 GMT-06:00 Junio C Hamano : > Alex Henrie writes: > >> Yes, that makes sense. I assume that when you talk about 'next', you >> mean 'master'? > > No, I do mean 'next'. See "A note from the maintainer" post that > are sent to the list

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-23 Thread Junio C Hamano
Alex Henrie writes: > Yes, that makes sense. I assume that when you talk about 'next', you > mean 'master'? No, I do mean 'next'. See "A note from the maintainer" post that are sent to the list every once in a while (i.e. after a new release is tagged) for the project

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-23 Thread Alex Henrie
2017-03-23 9:54 GMT-06:00 Junio C Hamano : > Alex Henrie writes: > >> 2017-03-22 10:54 GMT-06:00 Junio C Hamano : >>> Alex Henrie writes: No problem. Do I need to submit a second version of the patch with

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-23 Thread Junio C Hamano
Alex Henrie writes: > 2017-03-22 10:54 GMT-06:00 Junio C Hamano : >> Alex Henrie writes: >>> No problem. Do I need to submit a second version of the patch with a >>> test for `git -p log`? >> >> You do want to protect this

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-23 Thread Alex Henrie
2017-03-22 10:54 GMT-06:00 Junio C Hamano : > Alex Henrie writes: >> No problem. Do I need to submit a second version of the patch with a >> test for `git -p log`? > > You do want to protect this "without an option, we default to > 'auto'" feature from

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-22 Thread Junio C Hamano
Alex Henrie writes: > 2017-03-21 16:28 GMT-06:00 Junio C Hamano : >> Junio C Hamano writes: >> test_expect_success 'log.decorate configuration' ' -git log --oneline >expect.none && +git log --oneline

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-21 Thread Alex Henrie
2017-03-21 16:28 GMT-06:00 Junio C Hamano : > Junio C Hamano writes: > >>> test_expect_success 'log.decorate configuration' ' >>> -git log --oneline >expect.none && >>> +git log --oneline --no-decorate >expect.none && >>> git log --oneline

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-21 Thread Junio C Hamano
Junio C Hamano writes: >> test_expect_success 'log.decorate configuration' ' >> -git log --oneline >expect.none && >> +git log --oneline --no-decorate >expect.none && >> git log --oneline --decorate >expect.short && >> git log --oneline --decorate=full

Re: [PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-21 Thread Junio C Hamano
Alex Henrie writes: > Git's branching and merging system can be confusing, especially to new > users. When teaching people Git, I tell them to set log.decorate=auto. > This preference greatly improves the user's awareness of the local and > remote branches. So for the

[PATCH] log: if --decorate is not given, default to --decorate=auto

2017-03-20 Thread Alex Henrie
Git's branching and merging system can be confusing, especially to new users. When teaching people Git, I tell them to set log.decorate=auto. This preference greatly improves the user's awareness of the local and remote branches. So for the sake of user friendliness, I'd like to change the default