mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <>
Cc: "brian m. carlson" <>,
	"Jeff King" <>, "Duy Nguyen" <>,
	"Σταύρος Ντέντος" <>
Subject: [PATCH 0/3] format-patch --no-clobber
Date: Fri, 22 Feb 2019 12:11:08 -0800	[thread overview]
Message-ID: <> (raw)

If you keep an output for an older iteration of the same topic in
the same directory around and use "git format-patch" to prepare a
newer iteration of the topic, those commits that happen to be at the
same position in the series that have not been retitled will get the
same filename---and the command opens them for writing without any

Existing "-o outdir" and "-v number" options are both good ways to
avoid such name collisions, and in general helps to give good ways
to compare the latest iteration with older iteration(s), but let's
see if "--no-clobber" option that forbids overwrting existing files
would also help people.

I meant to have just a single patch for this, but it ended up to be
a three-patch series.

 - Preliminary clean-up of builtin/log.c updates messages in the
   file given to die()s and error()s that begin with capital by
   downcasing them to match majority of the messages in the system.

 - When we fail to open a patchfile for writing, we immediately stop
   and report failure, but we weren't careful about the cover letter
   output, which is fixed by the second patch.

 - The last one adds an experimental "--no-clobber" option to forbid
   the command from overwriting existing output files.  This is not
   enabled by default, as suggeted by Brian Carlson in [1], at least
   for now.

Junio C Hamano (3):
  builtin/log: downcase the beginning of error messages
  format-patch: notice failure to open cover letter for writing
  format-patch: --no-clobber refrains from overwriting output files

 Documentation/git-format-patch.txt |  8 +++-
 builtin/log.c                      | 72 +++++++++++++++++++-----------
 t/            | 22 +++++++++
 3 files changed, 75 insertions(+), 27 deletions(-)

*1* <>


             reply	other threads:[~2019-02-22 20:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 20:11 Junio C Hamano [this message]
2019-02-22 20:11 ` [PATCH 1/3] builtin/log: downcase the beginning of error messages Junio C Hamano
2019-02-22 20:24   ` Eric Sunshine
2019-02-22 20:40     ` Junio C Hamano
2019-02-22 20:11 ` [PATCH 2/3] format-patch: notice failure to open cover letter for writing Junio C Hamano
2019-02-22 20:11 ` [PATCH 3/3] format-patch: --no-clobber refrains from overwriting output files Junio C Hamano
2019-02-22 20:38   ` Eric Sunshine
2019-02-23 13:34   ` Jeff King
2019-03-12 20:53     ` Ntentos Stavros

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:

  List information:

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

  git send-email \ \ \ \ \ \ \ \

* 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.
Code repositories for project(s) associated with this public inbox

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 read-only IMAP folder(s) and NNTP newsgroup(s).