LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Steve French <smfrench@gmail.com>
Cc: git@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: Re: kernel.org git tree corrupt?
Date: Mon, 3 Mar 2008 08:21:35 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.1.00.0803030800460.17889@woody.linux-foundation.org> (raw)
In-Reply-To: <524f69650803021943i33ce6ddbo309f118cd0a77ac9@mail.gmail.com>



On Sun, 2 Mar 2008, Steve French wrote:
> 
> >   - look at your "origin" branch, and make sure it's a *remote* branch, not
> >    the old-style local one. Ie it should *not* show up when you do a
> >    plain
> >
> >         git branch
> now only shows "* master"
> 
> >    but it *should* show up (as both "origin/HEAD" and "origin/master")
> >    when you do
> >
> >         git branch -a
> Now "git branch -a" shows
> * master
>   origin/master
> 
> It is missing "origin/HEAD"

Ahh, yeah, my bad. The origin/HEAD thing will be created if you use either 
clone or "git remote add -m master" to create the remote. But when I asked 
you to do it by just editing the config file, you now have to create that 
HEAD pointer manually too.

You can do

	git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master

to create the thing (it just creates a symbolic ref from the origin/HEAD 
remote ref to the origin/master one, so now git will know that when you 
talk about 'origin', it is supposed to just use the master branch of 
that remote).

> >   - now do "git log origin" an it should show something recent
> git log origin and git log origin/master both return
> "ambiguous argument 'origin': unknown revision"

Well, origin/master should have worked, but the fact that plain "origin" 
didn't work is due to exactly the lack of HEAD file for that remote branch 
(for your kernel tree, there's only one remote branch, so it may be 
"obvious" that origin must be talking about the master branch, but if 
there are multiple branches at the origin it's not obvious *which* branch 
should be considered the default one, which is why we use HEAD)

> I must be misunderstanding the syntax/manpage of git-log but "git diff
> -m -r origin/master"
> now works fine and displays exactly what I expect so things have improved.

Well, if "origin/master" works in that situation, then "origin/master" 
should have worked in "git log" too, so maybe you mistyped?

Anyway, with the HEAD link added for the remote 'origin', you should be 
able to use plain 'origin' like you're used to.

			Linus

  reply	other threads:[~2008-03-03 16:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-02 15:49 Steve French
2008-03-02 21:16 ` Linus Torvalds
2008-03-02 21:40   ` Martin Langhoff
2008-03-02 22:02     ` Steve French
2008-03-03  3:43   ` Steve French
2008-03-03 16:21     ` Linus Torvalds [this message]
2008-03-04  4:42       ` Steve French

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=alpine.LFD.1.00.0803030800460.17889@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smfrench@gmail.com \
    --subject='Re: kernel.org git tree corrupt?' \
    /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

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).