git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] "git rebase": fatal: Not a valid object name: ''

From
John Keeping <john@keeping.me.uk>
Date
Jan 9, 2014, 15:56 UTC
Message-ID
<20140109155620.GH7608@serenity.lan>
In-Reply-To
<20140109153618.GA18975@inner.h.apk.li>
On Thu, Jan 09, 2014 at 04:36:18PM +0100, Andreas Krey wrote:
Show 5 quoted lines
> since ad8261d (rebase: use reflog to find common base with upstream)
> a rebase without arguments says "fatal: Not a valid object name: ''",
> caused by trying to determine the fork point with an empty $switch_to.
> 
> I don't really see what the appropriate fix would be. :-(

I think the correct fix is to change the "$switch_to" in the call to "git merge-base --fork-point" to "${switch_to:-HEAD}", but I'm not at a machine where I can test that or work up a patch at the moment...

Previous: Andreas KreyNext: Andreas Krey
Message 3 of 6 in “[BUG] git symbolic-ref does not recognize @ as the shortcut for HEAD”
  1. Mathieu LemoineJan 9, 2014
  2. [BUG] "git rebase": fatal: Not a valid object name: ''Andreas Krey, Jan 9, 2014
  3. John KeepingJan 9, 2014
  4. Andreas KreyJan 9, 2014
  5. rebase: fix fork-point with zero argumentsJohn Keeping, Jan 9, 2014
  6. Duy NguyenJan 15, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.