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

Re: [PATCH] Make git-clone --use-separate-remote the default

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 24, 2006, 09:22 UTC
Message-ID
<ek6dhj$n1l$1@sea.gmane.org>
In-Reply-To
<7vlkm1hf57.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 11 quoted lines
> Petr Baudis <pasky@suse.cz> writes:
> 
>>> Even though I fully agree that use-separate-remotes should be
>>> the default, to the point that I think we do not even
>>> need a backward compatibility option.  People who want to use
>>> traditional layout for simple one-remote-branch-only project
>>> would not suffer anyway because 'origin' still means origin in
>>> the new layout (refs/remotes/origin/HEAD).
>>
>> I don't know, we still at least need to keep the functionality for
>> --bare.

By the way, I think the backward compatibility option should be simply named --dont-use-separate-remote, or --without-separate-remote, or --no-separate-remote (the last is probably the best choice).

Show 23 quoted lines
> I agree --bare should continue to be a "snapshot mirror"; I am
> not advocating for the removal of the internal implementation
> detail such as $use_separate_remote variable.
> 
> However, I think having one sane behaviour is the right thing to
> do for a clone that prepares a repository with a working tree
> (including the one made with -n option, which only means "do not
> do the check-out immediately after cloning" for such a
> repository).
> 
> The traditional layout is slightly simpler for a project with
> the simplest needs (that is, a single upstream repository that
> has a single 'master' branch), but I do think even that is not
> an advantage anymore.
> 
> With the separate-remote layout, git-fetch would still fetch and
> update the "origin" (although that is now remotes/origin/master
> which is pointed at by remotes/origin/HEAD) and the user can
> still refer to it with "origin".  Commands "git-pull origin",
> "git-pull . origin", and "git-merge origin" all will continue to
> work the same way as before for such a project as in the
> traditional layout, and that is why I think we do not need
> backward compatibility flag in this case.
 
The exception being that with --use-separate-remote you cannot checkout
tracking branches to see what it is there (at least for now, but IIRC we
want to relax this constraint; i.e. to forbid commiting to non-heads,
instead of forbidding checking out), you cannot use it as alternate
source (as alternate repo to check from) while still allowing to work
on it, and that gitweb doesn't show anything except heads and tags;
it doesn't show remotes.

By the way, does new "git peek-remote -a ." show anything except refs/heads/, refs/tags/ and refs/remotes (e.g. StGit refs/bases/ and refs/patches/)?

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Junio C HamanoNext: Salikh Zakirov
Message 16 of 17 in “Make git-clone --use-separate-remote the default”
  1. Make git-clone --use-separate-remote the defaultPetr Baudis, Nov 23, 2006
  2. Junio C HamanoNov 23, 2006
  3. Andy WhitcroftNov 23, 2006
  4. Petr BaudisNov 23, 2006
  5. J. Bruce FieldsNov 23, 2006
  6. Junio C HamanoNov 24, 2006
  7. Junio C HamanoNov 24, 2006
  8. Junio C HamanoNov 24, 2006
  9. Salikh ZakirovNov 24, 2006
  10. Junio C HamanoNov 24, 2006
  11. Salikh ZakirovNov 24, 2006
  12. Salikh ZakirovNov 24, 2006
  13. Junio C HamanoNov 25, 2006
  14. Sergey VlasovNov 24, 2006
  15. Junio C HamanoNov 24, 2006
  16. Jakub NarebskiNov 24, 2006
  17. Salikh ZakirovNov 24, 2006

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.