Re: [PATCH 2/2] commit-template: distinguish status information unconditionally
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 1, 2017, 17:21 UTC
- Message-ID
- <xmqqvancnkd9.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <87mv8oe5zc.fsf@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 33 quoted lines
> Just as someone reading this from the sidelines, very nice to have
> someone working this part of the UI, but it would be much easier to
> review if you included before/after examples of changes, e.g. (for this
> hypothetical change):
>
>
> Before we'd say:
>
> # Please enter the commit message for your changes. Lines starting
> # with '#' will be ignored, and an empty message aborts the commit.
> #
> # Date: <date>
> #
> # On branch master
> # Your branch is up-to-date with 'origin/master'.
>
> Now:
>
> # Please enter the commit message for your changes. Lines starting
> # with '#' will be ignored, and an empty message aborts the commit.
> #
> # Date: <date>
> #
> # On branch master
> # Your current branch is up-to-date with 'origin/master'.
>
> And as a word-diff:
>
> [...]
> # Your {+current+} branch is up-to-date with 'origin/master'.
>
> Or something like that, much easier to read something like that than
> read the code and mentally glue together what it's going to change.I think you gave an example that is different from what was done on purpose, so that Kaartic can respond with "I see what you mean; what I did is different from your example but this.", but it seems that the attempt failed X-<.
I do not think the patch changes the output in a situation where the above "Before" would be shown. Instead, when the extra "Date: <date>" (or "Author: <author>") is not shown, the Before picture would look like:
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch masterand the update makes it look like:
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch masterHope that helps.