From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>, git@vger.kernel.org
Subject: Re: Useful tracking branches and auto merging
Date: Thu, 7 Oct 2010 13:04:30 +0300 [thread overview]
Message-ID: <AANLkTinqw06t88fkbyW3BbU-ZpWFAWBmjMQLPrTkXrci@mail.gmail.com> (raw)
In-Reply-To: <7vvd5g5rjq.fsf@alter.siamese.dyndns.org>
On Tue, Oct 5, 2010 at 11:10 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> I believe this use-case is valid:
>>
>> * The user wants *all* his remote tracking branches to point to the
>> latest branch head in all the repos in the case the can be
>> fast-forwarded, and in the case they can't, print an error and
>> continue with the rest.
>
> I would not be so sure about the validity of that use case.
>
> If your tracking branches are always trailing, never having any real work
> of your own, there is no reason to have them locally, instead of checking
> them out on demand. So let's forget about that case.
Don't be so quick. Typing 'master' is certain easier than
'origin/master', or 'stable' rather than 'linux-stable/master', or
'vj-feature-1' rather than 'whatever-repo-this-came-from/feature-1'.
The fact that you don't do it doesn't mean it's not a valid use-case.
> On the other hand, if you have forked a topic branch to build your new
> nifty feature at some known point (e.g. immediately after the upstream
> reached a new stable point), but you haven't done any real work on it, it
> is doubtful that it is even a good idea to fast-forward it automatically
> to begin with. C.f.
Fortunately we have 'git checkout --no-track -b origin/foo'. Problem solved.
But rather, what I do is:
% git branch -t origin/foo
% git checkout -b nifty-feature foo
> Message-ID: <AANLkTim85sH_2o=xCiDuoQrHq_7ZL96Y91xQMGxUP5Fy@mail.gmail.com>
>
> "The real problem is that maintainers often pick random - and not at
> all stable - points for their development to begin with. They just
> pick some random "this is where Linus -git tree is today", and do
> their development on top of that. THAT is the problem - they are
> unaware that there's some nasty bug in that version."
>
> IOW, once I decided one point is a good place to fork a topic, created a
> branch off of it, but didn't have a chance to do a real work on it yet, it
> would be very irritating if "git pull" updated that branch only because I
> do not have my own commit on it yet.
Then either:
1) fork of a local branch
2) use --no-track
3) don't do 'git pull --all'
> I see little sanity in doing this with any option whose name has "all"; it
> largely depends on the workflow, and in a single repository, some branches
> may want to get fast-forwarded automatically while others don't [*2*].
I think if you are issuing 'git pull --all' you want your remote
tracking branches to fast forward if possible, if not, why are you
doing 'git pull --all'?
Cheers.
--
Felipe Contreras
prev parent reply other threads:[~2010-10-07 10:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 20:44 Useful tracking branches and auto merging Felipe Contreras
2010-10-04 20:46 ` Jonathan Nieder
2010-10-04 20:56 ` Felipe Contreras
2010-10-04 20:57 ` Jonathan Nieder
2010-10-04 21:06 ` Felipe Contreras
2010-10-10 17:15 ` Clemens Buchacher
2010-10-10 17:30 ` Felipe Contreras
2010-10-10 17:45 ` Clemens Buchacher
2010-10-10 17:48 ` Felipe Contreras
2010-10-05 16:35 ` Junio C Hamano
2010-10-05 17:49 ` Felipe Contreras
2010-10-05 20:10 ` Junio C Hamano
2010-10-07 10:04 ` Felipe Contreras [this message]
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=AANLkTinqw06t88fkbyW3BbU-ZpWFAWBmjMQLPrTkXrci@mail.gmail.com \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/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).