Commit 8053c27
committed
breaking-changes: deprecate support for core.commentString=auto
When "core.commentString" is set to "auto" then "git commit" will
automatically select the comment character ensuring that it is not the
first character on any of the lines in the commit message. This was
introduced by commit 84c9dc2 (commit: allow core.commentChar=auto
for character auto selection, 2014-05-17) The motivation seems to be
to avoid commenting out lines from the existing message when amending
a commit that was created with a message from a file.
Unfortunately this feature does not work with:
* commit message templates that contain comments.
* prepare-commit-msg hooks that introduce comments.
* "git commit --cleanup=strip --edit -F <file>" which means that it
is incompatible with
- the "fixup" and "squash" commands of "git rebase -i" as the
comments added by those commands are then treated as part of
the commit message.
- the conflict comments added to the commit message by "git
cherry-pick", "git rebase" etc. as these comments are then
treated as part of the commit message.
It is also ignored by "git notes" when amending a note.
The issues with comments coming from a template, hook or file are a
consequence of the design of this feature and are therefore hard to
fix.
As the costs of this feature outweigh the benefits deprecate it and
remove it in Git 3.0. If someone comes up with some patches that fix
all the issues in a maintainable way then I'd be happy to see this
change reverted.
The next commit will add some advice for users on how they can update
their config settings.
Signed-off-by: Phillip Wood <[email protected]>
y Conflicts:
y Documentation/BreakingChanges.adoc
y Conflicts:
y config.c1 parent 56e9aed commit 8053c27
File tree
8 files changed
+40
-7
lines changed- Documentation
- config
- builtin
- t
8 files changed
+40
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
242 | 247 | | |
243 | 248 | | |
244 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
| 535 | + | |
535 | 536 | | |
536 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
537 | 553 | | |
538 | 554 | | |
539 | 555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
| 686 | + | |
686 | 687 | | |
687 | 688 | | |
688 | 689 | | |
| |||
720 | 721 | | |
721 | 722 | | |
722 | 723 | | |
| 724 | + | |
723 | 725 | | |
724 | 726 | | |
725 | 727 | | |
| |||
916 | 918 | | |
917 | 919 | | |
918 | 920 | | |
| 921 | + | |
919 | 922 | | |
920 | 923 | | |
| 924 | + | |
921 | 925 | | |
922 | 926 | | |
923 | 927 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1535 | 1535 | | |
1536 | 1536 | | |
1537 | 1537 | | |
1538 | | - | |
| 1538 | + | |
1539 | 1539 | | |
1540 | | - | |
| 1540 | + | |
| 1541 | + | |
1541 | 1542 | | |
1542 | 1543 | | |
1543 | 1544 | | |
| 1545 | + | |
1544 | 1546 | | |
1545 | 1547 | | |
1546 | 1548 | | |
1547 | 1549 | | |
1548 | 1550 | | |
| 1551 | + | |
1549 | 1552 | | |
| 1553 | + | |
1550 | 1554 | | |
1551 | 1555 | | |
1552 | 1556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
208 | 209 | | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
1179 | | - | |
| 1179 | + | |
1180 | 1180 | | |
1181 | 1181 | | |
1182 | 1182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
959 | | - | |
| 959 | + | |
960 | 960 | | |
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
964 | 964 | | |
965 | | - | |
| 965 | + | |
966 | 966 | | |
967 | 967 | | |
968 | 968 | | |
| |||
0 commit comments