git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: "Josh Boyer" <jwboyer@gmail.com>
Cc: git@vger.kernel.org, <davidk@lysator.liu.se>
Subject: [PATCH/POLL] git-format-patch: the default suffix is now .patch, not .txt
Date: Wed, 17 Jan 2007 16:06:28 -0800	[thread overview]
Message-ID: <7vd55dp5a3.fsf_-_@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7vsle9p8pg.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Wed, 17 Jan 2007 14:52:27 -0800")

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 <junkio@cox.net> writes:

  > "Josh Boyer" <jwboyer@gmail.com> writes:
  >
  >> On 1/17/07, Junio C Hamano <junkio@cox.net> wrote:
  >>
  >>> Two minor objections to changing the default are: (1) it's a
  >>> change and any change is bad ;-) and (2) the reason I changed it
  >>> to .txt before submitting the original format-patch to Linus was
  >>> because Emacs wanted to go into its "diff" mode when files are
  >>> named with .patch suffix, which had two annoyances (read-only by
  >>> default, and editing patch tried to automatically recount diff
  >>> and its recounting screwed up in some cases I do not remember
  >>> the details about).
  >>
  >> Well there's your problem.  You're using Emacs.  ;)
  >
  > Fair enough.  Its probably that there is something wrong in the
  > way I am using Emacs diff/patch editing mode.  Even if the
  > problem I had were because of bugs in Emacs, the users of git
  > should not have to suffer from "unusual" suffixes to work them
  > around.
  >
  > So that lifts one of the objections.  What should be done to the
  > other one --- time for a quick poll?

 Documentation/git-format-patch.txt                 |   15 +++++++--------
 .../howto/rebase-from-internal-branch.txt          |    2 +-
 builtin-log.c                                      |    2 +-
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index c0ffe99..49f51bb 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -79,9 +79,9 @@ OPTIONS
 	provide a new patch series.
 
 --suffix=.<sfx>::
-	Instead of using `.txt` as the suffix for generated
+	Instead of using `.patch` as the suffix for generated
 	filenames, use specifed suffix.  A common alternative is
-	`--suffix=.patch`.
+	`--suffix=.txt`.
 +
 Note that you would need to include the leading dot `.` if you
 want a filename like `0001-description-of-my-change.patch`, and
@@ -91,15 +91,14 @@ not add any suffix.
 CONFIGURATION
 -------------
 You can specify extra mail header lines to be added to each
-message in the repository configuration as follows:
+message in the repository configuration.  Also you can specify
+the default suffix different from the built-in one:
 
+------------
 [format]
         headers = "Organization: git-foo\n"
-
-You can specify default suffix used:
-
-[format]
-        suffix = .patch
+        suffix = .txt
+------------
 
 
 EXAMPLES
diff --git a/Documentation/howto/rebase-from-internal-branch.txt b/Documentation/howto/rebase-from-internal-branch.txt
index fcd64e9..3b3a5c2 100644
--- a/Documentation/howto/rebase-from-internal-branch.txt
+++ b/Documentation/howto/rebase-from-internal-branch.txt
@@ -106,7 +106,7 @@ prepare #2 and #3 for e-mail submission.
 
     $ git format-patch master^^ master
 
-This creates two files, 0001-XXXX.txt and 0002-XXXX.txt.  Send
+This creates two files, 0001-XXXX.patch and 0002-XXXX.patch.  Send
 them out "To: " your project maintainer and "Cc: " your mailing
 list.  You could use contributed script git-send-email if
 your host has necessary perl modules for this, but your usual
diff --git a/builtin-log.c b/builtin-log.c
index 930cc04..f3cff13 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -197,7 +197,7 @@ static int istitlechar(char c)
 
 static char *extra_headers = NULL;
 static int extra_headers_size = 0;
-static const char *fmt_patch_suffix = ".txt";
+static const char *fmt_patch_suffix = ".patch";
 
 static int git_format_config(const char *var, const char *value)
 {
-- 
1.5.0.rc1.gde38

  parent reply	other threads:[~2007-01-18  0:06 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-17 13:10 [RFC] Add a suffix option to git-format-patch Josh Boyer
2007-01-17 13:49 ` Johannes Schindelin
2007-01-17 14:50   ` Josh Boyer
2007-01-17 16:39   ` Horst H. von Brand
2007-01-17 19:18   ` [PATCH] Introduce 'git-format-patch --suffix=patch' Junio C Hamano
2007-01-17 19:20     ` Andy Whitcroft
2007-01-17 19:27       ` Junio C Hamano
2007-01-17 19:51         ` Brian Gernhardt
2007-01-17 19:57           ` Junio C Hamano
2007-01-17 20:08             ` Brian Gernhardt
2007-01-17 20:22     ` [PATCH] Make format-patch --suffix="" not add any suffix Brian Gernhardt
2007-01-18  1:11     ` [PATCH] Introduce 'git-format-patch --suffix=patch' Johannes Schindelin
2007-01-17 15:43 ` [RFC] Add a suffix option to git-format-patch David Kågedal
2007-01-17 16:57   ` Andreas Ericsson
2007-01-17 17:05     ` Johannes Schindelin
2007-01-17 17:33   ` Junio C Hamano
2007-01-17 18:15     ` David Kågedal
2007-01-17 20:18     ` Josh Boyer
2007-01-17 20:20       ` Josh Boyer
     [not found]       ` <7vsle9p8pg.fsf@assigned-by-dhcp.cox.net>
2007-01-18  0:06         ` Junio C Hamano [this message]
2007-01-18  1:06           ` [PATCH/POLL] git-format-patch: the default suffix is now .patch, not .txt Johannes Schindelin
2007-01-18  7:59           ` Alex Riesen
2007-01-18  8:06             ` Shawn O. Pearce
2007-01-18  8:18               ` Alex Riesen
2007-01-18  9:10                 ` Junio C Hamano
2007-01-18  9:21                   ` Alex Riesen
2007-01-18  8:43             ` Junio C Hamano
2007-01-18  9:35               ` Alex Riesen
2007-01-18 11:52                 ` Josh Boyer
2007-01-18 13:33                   ` Johannes Schindelin
2007-01-18 13:46                     ` Alex Riesen
2007-01-18 13:40                   ` Alex Riesen
2007-01-18 14:10                     ` Andreas Ericsson
2007-01-18 14:15                       ` Johannes Schindelin
2007-01-18 14:41                       ` Alex Riesen
2007-01-18 14:49                         ` Johannes Schindelin
2007-01-18 14:53                           ` Alex Riesen
2007-01-18 15:16                             ` Johannes Schindelin
2007-01-18 15:37                               ` Alex Riesen
2007-01-18 15:42                                 ` Josh Boyer
2007-01-18 20:03                                   ` Johannes Schindelin
2007-01-18 20:12                                     ` Josh Boyer
2007-01-18 15:26                         ` Shawn O. Pearce
2007-01-18 15:52                           ` Alex Riesen
2007-01-18 19:29                             ` Steven Grimm
2007-01-18 19:57                               ` Johannes Schindelin
2007-01-18 16:09                           ` Johannes Sixt
2007-01-19 10:11                         ` Jakub Narebski
2007-01-18 15:42                     ` Shawn O. Pearce
2007-01-18 16:05                       ` Alex Riesen
2007-01-18 16:29                       ` Andreas Ericsson
2007-01-18 16:51                         ` Shawn O. Pearce
2007-01-18 17:03                           ` Andreas Ericsson
2007-01-18 19:30                           ` Martin Langhoff
2007-01-18 19:19                         ` Martin Langhoff
2007-01-18 12:40               ` Andreas Ericsson
2007-01-18 15:10                 ` Lukas Sandström
2007-01-18 15:29                 ` Brian Gernhardt
2007-01-18  9:57             ` Alexandre Julliard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vd55dp5a3.fsf_-_@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=davidk@lysator.liu.se \
    --cc=git@vger.kernel.org \
    --cc=jwboyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).