From: Jon Loeliger <jdl@freescale.com>
To: git@vger.kernel.org
Subject: Re: Trying to Update All Heads of a Repository
Date: Fri, 04 Nov 2005 08:49:40 -0600 [thread overview]
Message-ID: <E1EY2su-0006LW-IN@jdl.com> (raw)
In-Reply-To: 7vy8453zhu.fsf@assigned-by-dhcp.cox.net
Junio says:
My "pu" is somewhat special; it is rewound and rebased all the time,
so merging with its older self would conflict with it. That's why
my example remotes/origin file has '+' in front of it. It tells
git-fetch that the other side _might_ rebase and fetch would not
result in a fast-forward merge when that happens.
So, from the git-pull man page:
For "git push", the local ref that matches <src> is used to fast
forward the remote ref that matches <dst>. If the optional plus + is
used, the remote ref is updated even if it does not result in a fast
forward update.
Ah-ha! Wait. But here's the conceptual missing piece: When might I
_know_ I have the situation where a fast-forward update might not
happen? And as a remote puller, that would be "never" -- unless I know
something about the nature of the remote end. That is, like you said,
"pu" is subject to wild fluctuation and non-linear behavior. But any
random puller can't know that a priori. So far, that is out-of-band
information about a branch that needs to be "available".
I think my previous "Ah ha!" paragraph should be massaged and added to
the git-pull man page as part of the above (man page) quoted material.
That's one.
Junio explained:
> Alternatively, with your original remotes/origin
> file, you should be able to do:
>
> $ git checkout master
> $ git fetch origin master:origin +pu:pu maint:maint
> $ git pull . origin
What an excellent example for the git-pull man page! That's two.
Junio also exampled:
My "guinea pig" repository has this in $GIT_DIR/remotes/origin:
URL: git://git.kernel.org/pub/scm/git/git.git
Pull: master:origin
Pull: +pu:pu
Pull: maint:maint
This means that my "master" is copied to the "origin" branch of
the guinea pig repository and "pu" and "maint" are copies of my
"pu" and "maint" branches. You never do your own development on
branches that appear on the right hand side of colon on "Pull"
lines (i.e. origin, pu and maint) in this repository. They are
to be updated by git-fetch.
The notion that multiple pull lines can be placed in the .git/remotes
file should be added to the git-pull man page. That's three.
Furthermore, there is one very important guideline you just
stated in that paragraph:
You never do your own development on branches that appear on the
right hand side of colon on "Pull" lines in a repository. They are
to be updated by git-fetch.
And it might bear stating the corollary:
The reason for a "Pull: master:origin" line is to side-step
the above maxim and provide a unique place where the local
developer can do her own work.
I'll consider that concept item four for the git-pull man page . :-)
> Sorry, my "pu" does not fast forward. The branch is to showcase what
> I've received or picked up from the list, and what changes are under
> consideration for inclusion.
Heh. I understand it now! :-) No problem.
And finally:
> The "hold/draw" topic branch (thanks for your ASCII art) is fully
> merged into my "master"; in fact it's head is the master branch head.
That's five-ish. I'm on deck for some git-pull man page and
drawing documentation patches. Coming up Real Soon Now.
Thanks for the explanations!
jdl
next reply other threads:[~2005-11-04 14:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-04 14:49 Jon Loeliger [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-11-04 0:23 Trying to Update All Heads of a Repository Jon Loeliger
2005-11-04 1:04 ` Linus Torvalds
2005-11-04 2:42 ` Junio C Hamano
2005-11-04 23:47 ` Daniel Barkalow
2005-11-05 2:07 ` Junio C Hamano
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=E1EY2su-0006LW-IN@jdl.com \
--to=jdl@freescale.com \
--cc=git@vger.kernel.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).