From: Siddharth Agarwal <sid0@fb.com>
To: <git@vger.kernel.org>
Cc: <john@keeping.me.uk>
Subject: with git-next, git pull --rebase can print out "fatal: No such ref: ''" for branches without an upstream
Date: Thu, 16 Jan 2014 17:08:14 -0800 [thread overview]
Message-ID: <52D8827E.3060007@fb.com> (raw)
With git-next, where git pull --rebase can print out "fatal: No such
ref: ''" if git pull --rebase is run on branches without an upstream.
With git at b139ac2589b15d55cd9fa5c6957da44b150d0737, the following
commands demonstrate the problem:
git init repo1
cd repo1
touch a; git add a; git commit -m "a"
cd ..
git clone repo1 repo2
cd repo2
git config remote.origin.fetch refs/heads/master:refs/remotes/origin/master
git checkout -b test
git pull --rebase
This results in the following output:
fatal: No such ref: ''
Current branch test is up to date.
So the pull --rebase looks like it works, but it prints out a spurious
fatal error.
I've managed to bisect this down to
https://github.com/gitster/git/commit/48059e405028ebf8a09c5a9aede89dfb460cce98.
Looks like get_remote_merge_branch is called without arguments, and it
returns an empty string. This string is passed as-is to git merge-base,
which causes the error.
next reply other threads:[~2014-01-17 1:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-17 1:08 Siddharth Agarwal [this message]
2014-01-17 2:21 ` with git-next, git pull --rebase can print out "fatal: No such ref: ''" for branches without an upstream Jeff King
2014-01-17 2:47 ` Siddharth Agarwal
2014-01-17 8:40 ` John Keeping
2014-01-17 18:09 ` Siddharth Agarwal
2014-01-17 18:57 ` Junio C Hamano
2014-01-17 19:26 ` John Keeping
2014-01-17 20:00 ` [PATCH] pull: suppress error when no remoteref is found John Keeping
2014-01-17 20:02 ` with git-next, git pull --rebase can print out "fatal: No such ref: ''" for branches without an upstream Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D8827E.3060007@fb.com \
--to=sid0@fb.com \
--cc=git@vger.kernel.org \
--cc=john@keeping.me.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).