git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git subtree error (just how do you expect me to merge 0 trees?)
@ 2012-10-18 23:04 Drew Crawford
  2013-01-01  1:44 ` greened
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Drew Crawford @ 2012-10-18 23:04 UTC (permalink / raw)
  To: git@vger.kernel.org

I noticed today that if you leave off the branch name from git subtree like so:

$ git subtree add --prefix somewhere -m "adding CDH as subtree" path/to/repo
warning: read-tree: emptying the index with no arguments is deprecated; use --empty
fatal: just how do you expect me to merge 0 trees?

The error message is not particularly helpful (and seems to actually be in read-subtree?)  The solution in my case was to add the branch name on the end of the command.

Ideally it would be better to emit an error-message from a script higher up the calling chain that would be more descriptive about the problem (such as suggesting no branch is specified).

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

end of thread, other threads:[~2013-01-01  5:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18 23:04 git subtree error (just how do you expect me to merge 0 trees?) Drew Crawford
2013-01-01  1:44 ` greened
2013-01-01  2:09 ` greened
2013-01-01  3:16   ` Junio C Hamano
2013-01-01  4:04     ` greened
2013-01-01  5:54       ` Junio C Hamano
2013-01-01  2:39 ` greened

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