@matheusbsbs / matheus-bagliano / commits / 917a8f891f
Fork 0

git-format-patch: the default suffix is now .patch, not .txt

Editors often give easier handling of patch files if the filename ends with .patch, so use it instead of .txt. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Jan 17, 2007 at 15:03 UTC 917a8f891f1ceeb48609f99ba3b32e022ac766f9
3 files changed +9 -10
Documentation/git-format-patch.txt
+7 -8
@@ -81,9 +81,9 @@ OPTIONS
81 provide a new patch series.
82
83 --suffix=.<sfx>::
84 - Instead of using `.txt` as the suffix for generated
84 + Instead of using `.patch` as the suffix for generated
85 filenames, use specifed suffix. A common alternative is
86 - `--suffix=.patch`.
86 + `--suffix=.txt`.
87 +
88 Note that you would need to include the leading dot `.` if you
89 want a filename like `0001-description-of-my-change.patch`, and
@@ -93,15 +93,14 @@ not add any suffix.
93 CONFIGURATION
94 -------------
95 You can specify extra mail header lines to be added to each
96 -message in the repository configuration as follows:
96 +message in the repository configuration. Also you can specify
97 +the default suffix different from the built-in one:
98
99 +------------
100 [format]
101 headers = "Organization: git-foo\n"
100 -
101 -You can specify default suffix used:
102 -
103 -[format]
104 - suffix = .patch
102 + suffix = .txt
103 +------------
104
105
106 EXAMPLES
Documentation/howto/rebase-from-internal-branch.txt
+1 -1
@@ -106,7 +106,7 @@ prepare #2 and #3 for e-mail submission.
106
107 $ git format-patch master^^ master
108
109 -This creates two files, 0001-XXXX.txt and 0002-XXXX.txt. Send
109 +This creates two files, 0001-XXXX.patch and 0002-XXXX.patch. Send
110 them out "To: " your project maintainer and "Cc: " your mailing
111 list. You could use contributed script git-send-email if
112 your host has necessary perl modules for this, but your usual
builtin-log.c
+1 -1
@@ -197,7 +197,7 @@ static int istitlechar(char c)
197
198 static char *extra_headers = NULL;
199 static int extra_headers_size = 0;
200 -static const char *fmt_patch_suffix = ".txt";
200 +static const char *fmt_patch_suffix = ".patch";
201
202 static int git_format_config(const char *var, const char *value)
203 {