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

Re: Now what: multiple HEAD refs

From
Alex Riesen <raa.lkml@gmail.com>
Date
Dec 15, 2005, 15:14 UTC
Message-ID
<81b0412b0512150714t293c29fav6cddc1c74ee4a6b3@mail.gmail.com>
In-Reply-To
<7vu0daphmf.fsf@assigned-by-dhcp.cox.net>
On 12/15/05, Junio C Hamano <junkio@cox.net> wrote:
Show 9 quoted lines
> >> I think the reason why my trial here worked correctly while you
> >> had trouble with it is because I have the send-pack fix from
> >> Pasky last night.
> >
> > yes, probably. It cleanups a reference if there was an error, right?
>
> Not really.  send-pack does not have anything to do with this
> (it is involved in git-push not git-pull).  Care to see how
> yours gets broken when you do "sh -x git-pull.sh . ref1 HEAD"?
I tried. Interesting: no refs/heads/HEAD. But, then I tried "ref1:HEAD":
broken-HEAD /d/download/git2 [822]
PATH=".:$PATH" sh -x git-pull . lf-usage:HEAD
+ . git-sh-setup
++ unset CDPATH
++ : .git
++ : .git/objects
++ GIT_DIR=.git
++ git-var GIT_AUTHOR_IDENT
+ strategy_args=
+ no_summary=
+ no_commit=
+ break
++ git-rev-parse --verify HEAD
+ orig_head=5a0b59da20d832fcfdf864b522718acbc2171525
+ git-fetch --update-head-ok . lf-usage:HEAD
* refs/heads/HEAD: storing branch 'lf-usage' of .
++ git-rev-parse --verify HEAD
git-rev-parse: fatal: Needed a single revision
+ curr_head=
+ test '' '!=' 5a0b59da20d832fcfdf864b522718acbc2171525
+ echo 'Warning: fetch updated the current branch head.'
Warning: fetch updated the current branch head.
+ echo 'Warning: fast forwarding your working tree.'
Warning: fast forwarding your working tree.
+ git-read-tree -u -m 5a0b59da20d832fcfdf864b522718acbc2171525 ''
usage: git-read-tree (<sha> | -m [-u | -i] <sha1> [<sha2> [<sha3>]])
+ die 'You need to first update your working tree.'
+ echo 'You need to first update your working tree.'
You need to first update your working tree.
+ exit 1

And of course, there was refs/heads/HEAD now. So it seems that I _had_ typed it with a colon (though I'm very sure I did it with a space as well). Sorry for the whole confusion, but that reveals that other problem, which Johannes' patch partially helps with.

Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 9 in “Now what: multiple HEAD refs”
  1. Alex RiesenDec 15, 2005
  2. Junio C HamanoDec 15, 2005
  3. Alex RiesenDec 15, 2005
  4. Junio C HamanoDec 15, 2005
  5. Alex RiesenDec 15, 2005
  6. Junio C HamanoDec 15, 2005
  7. Alex RiesenDec 15, 2005
  8. Johannes SchindelinDec 15, 2005
  9. Alex RiesenDec 15, 2005

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.