From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Jeff Garzik <jgarzik@pobox.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
git@vger.kernel.org
Subject: Re: [howto] Kernel hacker's guide to git, updated
Date: Sat, 01 Oct 2005 00:36:37 -0700 [thread overview]
Message-ID: <7voe69664a.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: Pine.LNX.4.64.0509301112100.3378@g5.osdl.org
Linus Torvalds <torvalds@osdl.org> writes:
> Hey, even more impressive is "git pull --all", which will happily try to
> create an octopus of every single ref available at the other end.
True.
However, I think --all is a mistake even if you use it without
merging in 'git fetch', so I am not planning to do refs/heads/
side, at least not yet. Even if you prevent an Octopus, what
would you do then? If you choose to merge one of them, which
one? Not merging any that is not explicitly specified on the
command line, seems to me the most sensible and safe option.
The rule for 'pull' to decide which refs to merge is:
(1) if command line has explicit refspecs (--tags and --heads
do not count), they are all merged.
(2) if command line has no explicit refspecs (--tags and
--heads do not count), the default one found from either
remotes or branches file is merged.
Notice that I am forbidding remotes file to say "by default I
always merge these three heads from there to make an Octopus" by
the above rule (branches file cannot even name more than one
head so this is not an issue). Since everybody seems to agree
that Octopus is not something that is done mechanically and
routinely anyway [*1*], I think this is a sensible way to guard
against accidental Octopus.
We could consider fetching all heads, by minimally renaming
remote master to origin and getting everything else under the
same name, but I'd really want to keep the local namespace for
branches isolated from each other. Many kernel.org public
repositories seem to have 'test' and 'release' branches and if
you are a maintainer of such a tree, and if you are interested
in another maintainer's tree, and if that other maintainer has
the 'test' and 'release' branches, --heads (or --tags)
overwriting your 'test' with his 'test' is obviously not what
you want.
Possibly, something like this could be arranged later:
* git fetch --heads=$ns $remote "$@"
In addition to the usual refspecs (the rest of the
command line arguments), fetch all remote heads and
store remote refs/heads/$a under local refs/heads/$ns/$a
for all $a. If $ns is empty, remote "master" is renamed
"origin".
* git fetch --heads $remote "$@"
shorthand for empty $ns
[Footnote]
*1* I do make many Octopus merges, but they happen across my
local topic branches. Topics merged change day-by-day, and even
the set of topics alive at the time changes everyday. IOW, it
is not something I would want to do with the same sets of heads
every time by describing them in the remotes file.
next prev parent reply other threads:[~2005-10-01 7:36 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-29 11:03 [howto] Kernel hacker's guide to git, updated Jeff Garzik
2005-09-29 15:18 ` David Leimbach
2005-09-29 16:03 ` Alberto Patino
2005-09-29 16:13 ` David Leimbach
2005-09-29 19:08 ` Oliver Neukum
2005-09-29 19:34 ` Jon Loeliger
2005-09-29 19:38 ` Oliver Neukum
2005-09-30 7:37 ` Junio C Hamano
2005-09-30 8:36 ` Oliver Neukum
2005-09-30 16:39 ` Linus Torvalds
2005-09-29 20:02 ` Dave Jones
2005-09-29 20:07 ` Anton Altaparmakov
2005-09-29 20:11 ` Dave Jones
2005-09-29 21:14 ` Linus Torvalds
2005-09-29 21:26 ` Linus Torvalds
2005-09-29 21:33 ` Dave Jones
2005-09-29 21:55 ` Linus Torvalds
2005-09-29 22:12 ` Anton Altaparmakov
2005-09-29 22:25 ` Linus Torvalds
2005-09-29 22:32 ` Anton Altaparmakov
2005-09-29 23:19 ` Junio C Hamano
2005-09-30 12:22 ` Johannes Schindelin
2005-09-29 23:17 ` Horst von Brand
2005-09-30 0:47 ` Linus Torvalds
2005-09-30 1:54 ` Junio C Hamano
2005-09-30 2:36 ` Linus Torvalds
2005-10-01 0:10 ` Linus Torvalds
2005-10-01 1:58 ` Horst von Brand
2005-10-03 1:03 ` Linus Torvalds
2005-09-29 21:33 ` Elfyn McBratney
2005-09-29 21:35 ` Linus Torvalds
2005-09-29 21:40 ` Dave Jones
2005-09-29 20:15 ` Jeff Garzik
2005-09-29 21:04 ` Junio C Hamano
2005-09-30 11:15 ` Jeff Garzik
2005-09-30 11:55 ` Junio C Hamano
2005-09-30 14:11 ` Jeff Garzik
2005-10-02 8:47 ` Junio C Hamano
2005-09-30 18:14 ` Linus Torvalds
2005-10-01 7:36 ` Junio C Hamano [this message]
2005-09-30 12:02 ` Oliver Neukum
2005-09-30 13:58 ` Jeff Garzik
2005-09-30 15:10 ` Alberto Patino
2005-09-30 12:07 ` Erik Mouw
2005-09-30 14:08 ` Jeff Garzik
2005-09-30 18:13 ` Horst von Brand
2005-10-01 0:17 ` Jeff Garzik
2005-09-30 22:52 ` Francois Romieu
2005-09-29 21:23 ` Chuck Lever
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=7voe69664a.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).