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

Re: [PATCH] fetch: add new fetch.default configuration

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 19, 2013, 12:15 UTC
Message-ID
<CAMP44s1rV+Pe_58qZLvTDt-r7XkDAinh3npY-dr+W5vnfNk4NA@mail.gmail.com>
In-Reply-To
<CALkWK0nQzEK6-E7aMnGg6eYZJ_=XsE6FBmRgu9_8jBGkYmJe+Q@mail.gmail.com>

On Sun, May 19, 2013 at 6:51 AM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:

Show 11 quoted lines
> Felipe Contreras wrote:
>> % git checkout fc/remote/hg-next
>> % git rebase -i # rebase to master
>> % git checkout fc/remote/hg-notes
>> % git rebase -i # rebase to fc/remote/hg-next
>> % git checkout fc/remote/hg-gitifyhg-compat
>> % git rebase -i # rebase to fc/remote/hg-notes
>
> So it is rebase, but rebase.defaultUpstream = origin won't suffice.
> You want to specify a custom base.  What I don't understand is why
> you're abusing @{u},
There's no abuse; 'upstream' is meant *exactly* for this: rebase, and pull.

It's called upstream because that's where eventually all the code must go, so semantically it's *exactly* correct: 'origin/master' is the upstream of 'master' which is the upstream of 'fc/remote/hg-next', which is the upstream of 'fc/remote/hg-notes', and so on.

And if I where to merge a branch from 'master', it make sense that the default is 'origin/master', because that's the upstream.

Literally each and every way in which 'upstream' is used remains the same for local branches, except for 'git push'.

> and crippling remote (by hard-interpreting it as
> "origin") to achieve this.
More false rhetoric; "origin" is *ALREADY* the default.
Show me the output of these:

%git clone --origin foobar git://git.kernel.org/pub/scm/git/git.git /tmp/git %cd /tmp/git %git fetch -v %git checkout --no-track -b test master %git fetch -v

> For the record, I didn't think your
> branch.<name>.base was a bad idea at all (re-visiting now).

It makes sens for rebase, but what happens when you do 'git pull' and you don't have an upstream configured, only a base? Why would you want 'git pull' to fail? In which instances would you want to have a 'base', but not an 'upstream'?

Think about it.
-- 
Felipe Contreras
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 5 of 9 in “fetch: add new fetch.default configuration”
  1. fetch: add new fetch.default configurationFelipe Contreras, May 18, 2013
  2. Ramkumar RamachandraMay 18, 2013
  3. Felipe ContrerasMay 18, 2013
  4. Ramkumar RamachandraMay 19, 2013
  5. Felipe ContrerasMay 19, 2013
  6. Ramkumar RamachandraMay 19, 2013
  7. Felipe ContrerasMay 19, 2013
  8. Eric SunshineMay 19, 2013
  9. Felipe ContrerasJun 1, 2013

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.