summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2023-08-30 08:43:33 +0200
committerJunio C Hamano <gitster@pobox.com>2023-08-31 15:02:21 -0700
commite0d7db7423a91673c001aaa5e580c815ce2f7f92 (patch)
tree7faa26e68b1ac6271f837180c7cd989378599e40 /builtin/commit.c
parent5dc72c0fbcbccf7dbb42e470e55dafbd2afdf343 (diff)
format-patch: --rfc honors what --subject-prefix sets
Rather than replacing the configured subject prefix (either through the git config or command line) entirely with "RFC PATCH", this change prepends RFC to whatever subject prefix was already in use. This is useful, for example, when a user is working on a repository that has a subject prefix considered to disambiguate patches: git config format.subjectPrefix 'PATCH my-project' Prior to this change, formatting patches with --rfc would lose the 'my-project' information. The data flow for the subject-prefix was that rev.subject_prefix were to be kept the authoritative version of the subject prefix even while parsing command line options, and sprefix variable was used as a temporary area to futz with it. Now, the parsing code has been refactored to build the subject prefix into the sprefix variable and assigns its value at the end to rev.subject_prefix, which makes the flow easier to grasp. Signed-off-by: Drew DeVault <sir@cmpwn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions