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

Re: [RFC/PATCH v2] pull: add --set-upstream

From
Erwan Mathoniere <erwan.mathoniere@grenoble-inp.org>
Date
Jun 7, 2016, 13:15 UTC
Message-ID
<af8762b1-3865-5d10-296c-db9bf9e8aa53@grenoble-inp.org>
In-Reply-To
<xmqqoa7ew319.fsf@gitster.mtv.corp.google.com>
On 06/06/2016 21:06, Junio C Hamano wrote:
Show 16 quoted lines
>
> But I am unhappy with a more serious problem with the tests in this
> patch.  They assume that "-u" option will forever be the only thing
> that is allowed to modify the configuration during "git pull -u".
> It should never make such an assumption.
>
> The only thing these additional tests later in the patch (ommitted)
> want to check, if I understand them correctly, is that when -u is
> used on a ref that shouldn't be tracked from the given remote then
> remote.<that remote>.merge etc. are not updated.  Make a list of the
> configuration variables the feature cares about, and check them and
> ignore changes to any other variable.  Somebody else's feature that
> will be added to "git pull" may have legitimate reason to update
> configuration variables that are not releated to this feature, and
> you shouldn't be writing your test for your feature in such a way
> to forbid such a new feature by others from being added.

I asked myself these questions but I came to the wrong conclusion since I considered that testing if `--set-upstream` doesn't alter any configuration var it shouldn't was also important. But there is no reason "git pull -u" modify the configuration in such a chaotic way.

I'll apply your suggestions, thanks.
Previous: Erwan MathoniereNext: Erwan Mathoniere
Message 9 of 12 in “pull: set-upstream implementation”
  1. pull: set-upstream implementationErwan Mathoniere, May 25, 2016
  2. Junio C HamanoMay 25, 2016
  3. Erwan MathoniereMay 29, 2016
  4. pull: add --set-upstreamErwan Mathoniere, Jun 6, 2016
  5. Matthieu MoyJun 6, 2016
  6. Junio C HamanoJun 6, 2016
  7. Matthieu MoyJun 7, 2016
  8. Erwan MathoniereJun 7, 2016
  9. Erwan MathoniereJun 7, 2016
  10. Erwan MathoniereJun 7, 2016
  11. Philip OakleyJun 6, 2016
  12. Erwan MathoniereJun 7, 2016

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.