From: Timur Tabi <hidden> Date: 2016-06-15 22:47:33
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?
The reason I ask is that I'm writing a script which calls
git-format-patch to create some patches for post-processing. So I
need the name of the file that git-format-patch creates so that I can
open it and examine it. I'd liked to see if there's a way to get the
name of the patch without actually creating the file.
--
Timur Tabi
Linux kernel developer at Freescale
From: Thomas Rast <hidden> Date: 2016-06-15 22:47:33
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
From: Robin Rosenberg <hidden> Date: 2016-06-15 22:47:33
torsdag 15 oktober 2009 18:17:09 skrev Timur Tabi:
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?
The reason I ask is that I'm writing a script which calls
git-format-patch to create some patches for post-processing. So I
need the name of the file that git-format-patch creates so that I can
open it and examine it. I'd liked to see if there's a way to get the
name of the patch without actually creating the file.
From: Timur Tabi <hidden> Date: 2016-06-15 22:47:38
On Thu, Oct 15, 2009 at 12:59 PM, Robin Rosenberg
[off-list ref] wrote:
quoted
The reason I ask is that I'm writing a script which calls
git-format-patch to create some patches for post-processing. So I
need the name of the file that git-format-patch creates so that I can
open it and examine it. I'd liked to see if there's a way to get the
name of the patch without actually creating the file.
It tells you the names on stdout.
Is there a way for it to tell me the name on stdout *without* actually
creating the patch?
--
Timur Tabi
Linux kernel developer at Freescale
On Thu, Oct 15, 2009 at 12:59 PM, Robin Rosenberg
[off-list ref] wrote:
quoted
quoted
The reason I ask is that I'm writing a script which calls
git-format-patch to create some patches for post-processing. So I
need the name of the file that git-format-patch creates so that I can
open it and examine it. I'd liked to see if there's a way to get the
name of the patch without actually creating the file.
It tells you the names on stdout.
Is there a way for it to tell me the name on stdout *without* actually
creating the patch?
Hello,
Is there any way you can just save the names from when you do call
format-patch?
e.g.
...
my @filenames = qx(git format-patch $opts);
...
Josh