git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Timur Tabi <timur@freescale.com>
Cc: <git@vger.kernel.org>
Subject: Re: How does format-patch determine the filename of the patch?
Date: Thu, 15 Oct 2009 19:48:47 +0200	[thread overview]
Message-ID: <200910151948.48539.trast@student.ethz.ch> (raw)
In-Reply-To: <ed82fe3e0910150917u72ef189epc74411e71a9cd2d4@mail.gmail.com>

Timur Tabi wrote:
> Hi.  I'm not familiar with the git source code, so forgive me if this
> is a dumb question.  I'm trying to determine the algorithm that
> git-format-patch uses to determine the name of the patch file it
> creates (e.g. "0001-this-is-my-patch-without-spaces-and-trunca.patch")
>  I'm looking at the function cmd_format_patch(), and I just don't see
> where it creates any files.  Can someone show me where this code is?

get_patch_filename() in log-tree.c, but the bulk of the work is done
in the call out to format_commit_message() [pretty.c] with the "%f"
format, which is in turn handled by format_sanitized_subject()
[pretty.c].

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2009-10-15 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-15 16:17 How does format-patch determine the filename of the patch? Timur Tabi
2009-10-15 17:48 ` Thomas Rast [this message]
2009-10-15 17:59 ` Robin Rosenberg
2009-10-29 13:05   ` Timur Tabi
2009-10-29 13:14     ` Joshua Roys

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=200910151948.48539.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=timur@freescale.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).