Thread (4 messages) 4 messages, 3 authors, 2016-06-15

Re: Possible regression in master? (submodules without a "master" branch)

From: W. Trevor King <hidden>
Date: 2016-06-15 23:00:33

On Thu, Mar 27, 2014 at 08:52:08AM -0700, W. Trevor King wrote:
Working around that to default to the upstream submodule's HEAD is
possible (you can just use --branch HEAD)
Actually, this is probably not a good idea.  The initial submodule
addition works:

  $ git submodule add -b HEAD /tmp/submod.git submod
  Cloning into 'submod'...
  done.

But subsequent log calls (from the superproject) do not:

  $ git log
  fatal: bad default revision 'HEAD'
  $ echo $?
  128

and status calls (from the superproject) also have trouble:

  $ git status
  warning: refname 'HEAD' is ambiguous
  warning: refname 'HEAD' is ambiguous.
  On branch master
  …

So it's better to just specify your preferred upstream branch directly
(e.g. --branch next).

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help