| commit | 92b7c7c9f5fde4972a653ddb90eca52c592de07e | [log] [tgz] |
|---|---|---|
| author | Ayush Chandekar <ayu.chandekar@gmail.com> | Wed Jul 16 17:13:29 2025 +0530 |
| committer | Junio C Hamano <gitster@pobox.com> | Wed Jul 16 08:34:20 2025 -0700 |
| tree | f5ec45a7b6a1c77908b8ce5c1efa65c5393d1b55 | |
| parent | e69bbfa2947ee733a2b76f1dc28ceaf415368f2a [diff] |
config: set comment_line_str to "#" when core.commentChar=auto If conflict comments already use a comment character that isn't "#", and core.commentChar is set "auto", Git will ignore these lines during the scan using ignored_log_message_bytes() and pick a new comment character based on the rest of the message. The newly chosen character may be different from the one used in the conflict comments and therefore, these are no longer treated as comments and end up in the final commit message. For example, during a rebase if the user previously set core.commentChar=% and then encounters a conflict, conflict comments like "% Conflicts:" are generated. If the user subsequently sets core.commentChar=auto before running `rebase --continue`, Git parses the "auto" setting and begins scanning. It first uses the existing 'comment_line_str' (which is '%') to detect and ignore conflict comments via ignored_log_message_bytes(). Then, Git scans the rest of the message (excluding conflict comments), sees that none of the remaining lines start with '#' and decides to set comment_line_str to '#'. Since the final commit character differs from the one used in the conflict comments, those lines are no longer considered comments and get included in the final commit message. Set 'comment_line_str' to '#' when core.commentChar is set to 'auto' to reset any previously set value. While this does not solve the issue of conflict comment inclusion and the user visible behaviour stays tha same, it standardizes the behaviour of the code by always resetting 'comment_line_str' to '#' when core.commentChar=auto is parsed. The patch text is based on Phillip Wood's message: https://lore.kernel.org/git/9e96aaab-79a2-4632-94cd-d016d4a63b30@gmail.com/ and the commit log message is wriiten by me. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com> Signed-off-by: Ayush Chandekar <ayu.chandekar@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.
Git is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2). It was originally written by Linus Torvalds with help of a group of hackers around the net.
Please read the file INSTALL for installation instructions.
Many Git online resources are accessible from https://git-scm.com/ including full documentation and Git related tools.
See Documentation/gittutorial.adoc to get started, then see Documentation/giteveryday.adoc for a useful minimum set of commands, and Documentation/git-<commandname>.adoc for documentation of each command. If git has been correctly installed, then the tutorial can also be read with man gittutorial or git help tutorial, and the documentation of each command with man git-<commandname> or git help <commandname>.
CVS users may also want to read Documentation/gitcvs-migration.adoc (man gitcvs-migration or git help cvs-migration if git is installed).
The user discussion and development of Git take place on the Git mailing list -- everyone is welcome to post bug reports, feature requests, comments and patches to git@vger.kernel.org (read Documentation/SubmittingPatches for instructions on patch submission and Documentation/CodingGuidelines).
Those wishing to help with error message, usage and informational message string translations (localization l10) should see po/README.md (a po file is a Portable Object file that holds the translations).
To subscribe to the list, send an email to git+subscribe@vger.kernel.org (see https://subspace.kernel.org/subscribing.html for details). The mailing list archives are available at https://lore.kernel.org/git/, https://marc.info/?l=git and other archival sites.
Issues which are security relevant should be disclosed privately to the Git Security mailing list git-security@googlegroups.com.
The maintainer frequently sends the “What's cooking” reports that list the current status of various development topics to the mailing list. The discussion following them give a good reference for project status, development direction and remaining tasks.
The name “git” was given by Linus Torvalds when he wrote the very first version. He described the tool as “the stupid content tracker” and the name as (depending on your mood):