git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Explicitly add the default "git pull" behaviour to .git/config on clone

From
JWJosef Weidendorfer <josef.weidendorfer@gmx.de>
Date
Dec 7, 2006, 14:52 UTC
Message-ID
<200612071552.51799.Josef.Weidendorfer@gmx.de>
In-Reply-To
<7v64cowers.fsf@assigned-by-dhcp.cox.net>
On Thursday 07 December 2006 04:44, Junio C Hamano wrote:
Show 17 quoted lines
> Josef Weidendorfer <Josef.Weidendorfer@gmx.de> writes:
> 
> > IMHO there only should be one place/command which is creating new branches,
> > and which is called by other porcelain commands [*1*].
> 
> Giving an option to git branch to set something like this up
> would be nice.  I would agree the division of labor you propose
> is a good way to keep the scripts maintainable.
> 
> It however is a different matter if we would want to set up the
> merge default always in the way you propose for a new branch at
> the policy level.
> 
> It also is a different matter if "git branch" has enough
> information to figure out which upstream "origin" needs to be
> fetched from, given an origin SHA-1 expression to create a new
> branch from, at the technical level
We could setup the branch.*.remote option for every tracking branch
git-clone is fetching (and git-fetch with the wildcard refspec).
And git-branch sets branch.*.remote/merge for the new branch
whenever it sees that a remote is set for the branch we are
branching off.
 
Show 11 quoted lines
> It entirely is possible to use the same remotes/origin/
> hierarchy to track two physically different URLs (thus two
> different "origin"s) on a mobile machine that has different
> connectivity to the outside world depending on where you are
> ("that mirror is closer from here" and "I need to go over the
> firewall while I am here").  Because they track the logically
> same repository, it does not make sense to use different
> hierarchies under remotes/ for this purpose.
> 
> In such a setup, "git branch new origin/for-public" would not be
> able to tell which "origin" to fetch from

I see. But I hope with my suggestion above, this can be looked up then in the branch."remotes/origin/for-public".remote option.

Previous: Junio C HamanoNext: Johannes Schindelin
Message 11 of 15 in “Explicitly add the default "git pull" behaviour to .git/config on clone”
  1. Explicitly add the default "git pull" behaviour to .git/config on cloneAndy Parkins, Dec 6, 2006
  2. Johannes SchindelinDec 6, 2006
  3. Jakub NarebskiDec 6, 2006
  4. Andy ParkinsDec 6, 2006
  5. Peter BaumannDec 6, 2006
  6. Josef WeidendorferDec 6, 2006
  7. Jakub NarebskiDec 6, 2006
  8. Johannes SchindelinDec 6, 2006
  9. Josef WeidendorferDec 7, 2006
  10. Junio C HamanoDec 7, 2006
  11. Josef WeidendorferDec 7, 2006
  12. Johannes SchindelinDec 7, 2006
  13. Josef WeidendorferDec 7, 2006
  14. Jakub NarebskiDec 8, 2006
  15. Aneesh Kumar K.VDec 7, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.