]> git.proxmox.com Git - libgit2.git/commit - src/libgit2/remote.c
remote: mark branch for-merge even if we're unborn
authorCarlos Martín Nieto <cmn@dwim.me>
Wed, 2 Apr 2014 16:44:01 +0000 (18:44 +0200)
committerCarlos Martín Nieto <cmn@dwim.me>
Wed, 2 Apr 2014 18:22:22 +0000 (20:22 +0200)
commit67d4997a7e3d95d8ebc9c13481b767efd1d5bb15
treec81316ae40c5af824dce39df98a1f33abcae3cd3
parent6f6be8fe4199b5bccad00a9a3ab8b078286c1837
remote: mark branch for-merge even if we're unborn

When the current branch is unborn, git will still mark the current
branch's upstream for-merge if there is an upstream configuration. The
only non-constrived case is cloning from an empty repository which then
gains history. origin's master should be marked for-merge.

In order to do this, we cannot use the high-level wrappers that expect a
reference, as we may not have one. Move over to the internal ones that
expect a reference name, which we do have.
src/remote.c