Re: [PATCH] Documentation: update git-pull.txt for clone's new default behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Junio C Hamano <junkio@xxxxxxx> wrote:
> Luben Tuikov <ltuikov@xxxxxxxxx> writes:
> 
> > --- Junio C Hamano <junkio@xxxxxxx> wrote:
> >> 
> >> Because [remote] is NOT about mapping.  It asks the fetch
> >> mechanism to fetch from that remote, so the primary thing you
> >> should look at is .url, not RHS of colon on .fetch lines.  Use
> >> of tracking branches is strictly optional.
> >
> > Remote
> > ------
> >
> > Please help me understand.  Here is a sample remote from
> > an actual repo (actual names changed):
> >
> > [remote "origin"]
> >         url = http://blah/bleah.git
> >         fetch = +refs/heads/*:refs/remotes/origin/*
> >
> > This basically says: "Get it" from such and such url, where
> > on the repo at that url, i.e. the remote side, you will
> > find stuff in "refs/heads/", and when you get it here, locally,
> > put it in refs/remotes/origin/.
> 
>         [remote "origin"]
>                 url = http://blah/blah.git
>                 fetch = refs/heads/master
> 
> is also fine.  The point is that you do not have to use tracking
> branches.  ", and when you get it here, ..." part is optional.

Ok. So then in this case "fetch = refs/heads/master" describes
.git/refs/heads/master or something else?

If it does, then this is a local map.

I guess this is the case where one wants to automate
"git-pull . OtherBranch", but shouldn't this be handled
by [branch], i.e. the "merge" part of [branch].

> > Branch
> > ------
> >
> > Here is an actual example:
> >
> > [branch "branchA"]
> >         remote = origin
> >         merge = refs/heads/branchA
> >
> > Yeah, but by default "refs/heads/branchA" doesn't exist (see
> > my previous email).  It doesn't have to, since it specifies
> > the "remote part", but that has already been handled by
> > "[remote]".
> 
> Obviously fetch needs to handle the remote part because that is
> the only name it exists at the remote.  branch.*.merge is used
> by pull, not fetch, and fetch communicates with pull by using
> the remote name, because use of local tracking branches is
> optional.

Does this mean that "fetch = <remote>:" is legal?  Shouldn't the
RHS always exist?  Is the RHS of "fetch = :" what you mean
by local tracking branches?

    Luben


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]