Junio C Hamano <gits...@pobox.com> writes:

> Updating Documentation/pull-fetch-param.txt would be a bear, though.
> The documentation is stale in that it was written in the days back
> when .git/remotes/ was the primary way to configure remotes, and was
> not adjusted to use the termilology used in the [remote "where"]
> section of the .git/config file (notice a mention of "'Pull: '
> lines" there), so it needs cosmetic adjustment anyway, but the
> semantics it spells is still up to date.  The current rule is very
> simple and understandable.  You either say from the command line
> exactly what should happen (refspec without colon is the same as the
> refspec with colon at the end, meaning "do not track"; if you want
> to track, you write what to update with the fetch), or we use the
> configured refspec (which again spells what should happen).
> The updated rule would be more complex.  If a remote nickname is
> used, and a refspec given from the command line is without colon, a
> new special rule overrides the current behaviour and tries to match
> with a configured refspec.  You would need to desribe what happens
> in that case.

It would be something like this.

When you tell "git fetch" to fetch one or more refs from a
configured remote by explicitly listing them on the command line,

    git fetch <remote> <name>...

each <name>... goes through the following process:

    - The <name> is turned into the full ref at the remote that
      starts from refs/ form by applying the usual fetch dwimmery
      (if <name> is a name of a branch, "refs/heads/<name>" would
      likely to be the one that is fetched).

    - Then, configured fetch refspecs for <remote> is looked up from
      remote.<remote>.fetch configuration variable(s), or "Pull: "
      line(s) of .git/remotes/<remote> file.

    - If the LHS of a refspec found in the previous step matches the
      full ref we computed in the first step, then the ref at the
      RHS of the refspec (i.e. remote tracking branch), if any, is

If there is no configured refspecs that match the name given from
the command line, no remote tracking ref is updated.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to