Can't git format-patch

3 Antworten [Letzter Beitrag]
calher

I am a member!

Offline
Beigetreten: 06/19/2015

Why doesn't this command seem to be giving me any file or standard
output?

git format-patch master

All I can do is count how many commits I'm ahead of master, and do

git format-patch -3

where 3 is the number of commits ahead.

But this means I can't just send a patch file.  I have to send multiple
patch files in an archive, and then I have to tell some guy to run the
"git-am" command on three files and hope it works.  (I've never applied
one of these patches, I've only emailed them.)

My friend on a related, very old, popular, de-facto standard distro
says git should be able to do "git format-patch master".  Is this an
issue with Trisquel's version of git? :(

jxself
Offline
Beigetreten: 09/13/2010

This is git. It's normal to have multiple patch files. If you look on mailing lists, you'll see that. Look on the mailing list of the kernel named Linux and you'll see email threads [PATCH 1/5] which is patch 1 of 5. You can use git send-email to send them (which needs some set up first.)

If you really do one one file there are multiple options, of course since this is git: There's more than one way to do things. :)

You could squash the commits, make a temporary branch and merge things, or try this when doing format-patch:

--stdout > this_is_my_amazing_single_patch_file.diff

calher

I am a member!

Offline
Beigetreten: 06/19/2015

On Thu, 2018-08-02 at 00:29 +0200, name at domain wrote:
> This is git. It's normal to have multiple patch files. 

Oh, OK.  I guess I won't worry about it, then!

How should I send the patches?  I've been moving the patch files to my
desktop, archiving them as .tar.xz, and and attaching them to an email
to the author.

jxself
Offline
Beigetreten: 09/13/2010

Look at git send-email