git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* format-patch and submodules
@ 2015-06-04 23:20 Christopher Dunn
  2015-06-09 18:52 ` Jens Lehmann
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Dunn @ 2015-06-04 23:20 UTC (permalink / raw)
  To: git

(Seen in git versions: 2.1.0 and 1.9.3 et al.)

$ git format-patch --stdout X^..X | git apply check -
fatal: unrecognized input

This fails when the commit consists of nothing but a submodule change
(as in 'git add submodule foo'), but it passes when a file change is
added to the same commit.

There used to be a similar problem for empty commits, but that was
fixed around git-1.8:

    http://stackoverflow.com/questions/20775132/cannot-apply-git-patch-replacing-a-file-with-a-link

Now, 'git format-patch' outputs nothing for an empty commit. I suppose
that needs to be the behavior also when only submodules are changed,
since in that case there is no 'diff' section from 'format-patch'.

Use-case: git-p4

Of course, we do not plan to add the submodule into Perforce, but we
would like this particular command to behave the same whether there
are other diffs or not.

~Christopher Dunn (cdunn2001)

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

end of thread, other threads:[~2015-06-10 22:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-04 23:20 format-patch and submodules Christopher Dunn
2015-06-09 18:52 ` Jens Lehmann
2015-06-10 17:04   ` Christopher Dunn
2015-06-10 21:14     ` Luke Diamand
2015-06-10 22:41       ` Christopher Dunn

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