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

Re: [PATCH] Fix git-pull output message

From
RWRobert Watson <robert.oo.watson@gmail.com>
Date
Sep 29, 2005, 08:48 UTC
Message-ID
<72499e3b05092901484731450a@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.58.0509280823260.3308@g5.osdl.org>
On 9/28/05, Linus Torvalds <torvalds@osdl.org> wrote:
Show 49 quoted lines
>
>
> On Wed, 28 Sep 2005, Robert Watson wrote:
> >
> > Notice that the git.git directory is truncated.  It seems the
> > intension is to truncate at the .git
> > directory level.  The following patch fixes it.
>
> No, the intention really is to remove the ".git" at the end. At least
> that's how I use it.
>
> I like seeing my merges say
>
>     Merge branch 'for-linus' from master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
>
> even though the _real_ directory was ".../infiniband.git/", simply because
> the ".git" doesn't really add any extra information when you're already in
> git.
>
> _outside_ of git, the ".git" tells you something: it tells you that you're
> entering a git archive. But when merging in git, that part is kind of
> taken for granted, isn't it?
>
> This also matches what "git-receive-pack" and "git-upload-pack" does:
>
>         ...
>         /* chdir to the directory. If that fails, try appending ".git" */
>         if (chdir(dir) < 0) {
>                 if (chdir(mkpath("%s.git", dir)) < 0)
>                         die("unable to cd to %s", dir);
>         }
>
>         /* If we have a ".git" directory, chdir to it */
>         chdir(".git");
>         ...
>
> Note how it _both_ will append ".git" to the directory name (if it can't
> find one without ".git" _and_ will try to chdir to a ".git" directory
> _within_ the directory name.
>
> So if you use the native pack ssh interfaces, you really can say
>
>         git pull master.kernel.org:.../infiniband
>
> because the tools (well, the "native pack" ones - not the http/rsync/scp
> ones) will automatically DTRT.
>
>                 Linus
>
Now, I understand it.  Thanks Linus and Junio.
Robertoo
Previous: Linus Torvalds
Message 4 of 4 in “Fix git-pull output message”
  1. Fix git-pull output messageRobert Watson, Sep 28, 2005
  2. Junio C HamanoSep 28, 2005
  3. Linus TorvaldsSep 28, 2005
  4. Robert WatsonSep 29, 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.