diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-03-21 14:18:55 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-03-21 14:18:55 -0700 |
commit | 15108de2fa0cd8f002a0551d14c84505a853071c (patch) | |
tree | ffdbcfd36b7f18eba44b8733c4df582303433000 /Documentation/config | |
parent | e25cabbf6b34e4a6e903d65102d87055cc994778 (diff) | |
parent | ab89575387c02ea024163256826ad1c6dd2e4247 (diff) | |
download | git-15108de2fa0cd8f002a0551d14c84505a853071c.tar.gz |
Merge branch 'jk/format-patch-ignore-noprefix'
"git format-patch" honors the src/dst prefixes set to nonstandard
values with configuration variables like "diff.noprefix", causing
receiving end of the patch that expects the standard -p1 format to
break. Teach "format-patch" to ignore end-user configuration and
always use the standard prefixes.
This is a backward compatibility breaking change.
* jk/format-patch-ignore-noprefix:
rebase: prefer --default-prefix to --{src,dst}-prefix for format-patch
format-patch: add format.noprefix option
format-patch: do not respect diff.noprefix
diff: add --default-prefix option
t4013: add tests for diff prefix options
diff: factor out src/dst prefix setup
Diffstat (limited to 'Documentation/config')
-rw-r--r-- | Documentation/config/format.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/config/format.txt b/Documentation/config/format.txt index 73678d88a1..8cf6f00d93 100644 --- a/Documentation/config/format.txt +++ b/Documentation/config/format.txt @@ -144,3 +144,10 @@ will only show notes from `refs/notes/bar`. format.mboxrd:: A boolean value which enables the robust "mboxrd" format when `--stdout` is in use to escape "^>+From " lines. + +format.noprefix:: + If set, do not show any source or destination prefix in patches. + This is equivalent to the `diff.noprefix` option used by `git + diff` (but which is not respected by `format-patch`). Note that + by setting this, the receiver of any patches you generate will + have to apply them using the `-p0` option. |