git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git format-patch on empty commit
@ 2016-01-11 14:19 pedro rijo
  2016-01-11 20:53 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: pedro rijo @ 2016-01-11 14:19 UTC (permalink / raw)
  To: git

Hi all,

Couldn't find any explanation on git docs on this issue:

If I create a dummy commit, with some dummy diff, I get a normal patch
when I run

$ git format-patch -1 -o outgoing/ -p -k

but if the last commit is an empty commit, generated by

$ git commit --allow-empty "Some commit message"

then the output of the format patch will be an empty patch. If the
first case produces something like this:

>From 08cfdb2994554d834b89309ca96d9bf513e26a90 Mon Sep 17 00:00:00 2001
From: pedrorijo91 <pedrorijo91@gmail.com>
Date: Fri, 8 Jan 2016 12:44:57 +0000
Subject: dummy commit


diff --git a/lol.txt b/lol.txt
new file mode 100644
index 0000000..f944b38
--- /dev/null
+++ b/lol.txt
@@ -0,0 +1 @@
+:)
--
2.5.4 (Apple Git-61)



then the second case shouldn't generate something like this instead ?

>From 2d486f25c48780e2e132047e681929fcccb7e60c Mon Sep 17 00:00:00 2001
From: pedrorijo91 <pedrorijo91@gmail.com>
Date: Fri Jan 8 12:43:55 2016 +0000
Subject: Some commit message


2.5.4 (Apple Git-61)

Thanks,
Pedro Rijo

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-11 23:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-11 14:19 git format-patch on empty commit pedro rijo
2016-01-11 20:53 ` Jeff King
2016-01-11 21:04   ` Junio C Hamano
2016-01-11 21:09     ` Jeff King
2016-01-11 23:47     ` pedro rijo

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).