Re: [PATCH] log: if --decorate is not given, default to --decorate=auto
From: Junio C Hamano <hidden>
Date: 2017-03-21 18:27:55
Alex Henrie [off-list ref] 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 sake of user friendliness, I'd like to change the default from log.decorate=no to log.decorate=auto. Signed-off-by: Alex Henrie <redacted>
I guess this is an analog of making color.ui default to "auto" we did earlier. After having shipped with a more conservative default while letting willing users experiment/experience to help us get the kinks out of the "auto" setting, it probably is about time to flip the default.
quoted hunk
diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 48b55bfd2..3aa8daba3 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh@@ -520,7 +520,7 @@ test_expect_success 'log --graph with merge' ' ' 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 >expect.full &&
This ensures that an explicit --no-decorate from the command line does give "none" output, which we failed to do so far, and is a good change. Don't we also need a _new_ test to ensure that "auto" kicks in without any explicit request? Knowing the implementation that pager-in-use triggers the "auto" behaviour, perhaps testing the output from "git -p log" would be sufficient?