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

Re: [PATCH v3] Add core.mode configuration

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Oct 15, 2013, 13:29 UTC
Message-ID
<525d4354a5436_5844e73e843d@nysa.notmuch>
In-Reply-To
<20131015133327.GA22723@shrek.podlesie.net>
Krzysztof Mazur wrote:
Show 12 quoted lines
> On Tue, Oct 15, 2013 at 07:32:39AM -0500, Felipe Contreras wrote:
> > Krzysztof Mazur wrote:
> > > 
> > > But with core.mode = next after upgrade you may experience incompatible
> > > change without any warning.
> > 
> > Yes, and that is actually what the user wants. I mean, why would the user set
> > core.mode=next, if the user doesn't want to experencie incompatible changes? A
> > user that sets this mode is expecting incompatible changes, and will be willing
> > to test them, and report back if there's any problem with them.
> 
> With your patch, because it's the only way to have 'git add' v2.0.

Yeah, but that's not what I'm suggesting. I suggested to have *both* a fined-tunned way to have this behavior, say core.addremove = true, and a way to enable *all* v2.0 behaviors (core.mode = next).

If we have both, and the user sets core.mode = next, that means the user wants *all* the incompatible changes.

> But if another git v2.0 incompatible change will be added it will not
> be warned, because with core.mode=next he decided to enable also
> future changes and that's why I would never set that.

That's fine, you wouldn't set that, but I would. That's why it's a configuration.

Show 17 quoted lines
> > > I think it's better to keep the old behavior by default and warn the user if
> > > with new behavior the result might be different. So the user:
> > > 
> > > 	a) knows about the change
> > > 
> > > 	b) may set appropriate option to enable the new default or keep
> > > 	   the old behavior and disable the warning
> > > 
> > > 	c) may report that he does not like that change
> > 
> > But that's what we are doing already. Look at the test I wrote, it's testing
> > the warnings for the current version of Git.
> 
> With pull.default we did that, but with git add v2.0 now we only warn
> the user. With your patch he can enable new git add (and disable warning),
> but he also enables future incompatible changes and disables
> warnings for such changes.

Yeah, but I suggested to have *both* a fine-tunned option and a general one, didn't I?

> He also cannot keep the old behaviour and disable the warning.
He cannot do that regardless if my patch is merged or not.
Show 15 quoted lines
> > > I don't see the change in "git add" as an improvement, because
> > > removing files with "git add" IMHO is more confusing than ignoring
> > > such files. Maybe introducing new command - "git update" for instance -
> > > which is equivalent to new "git add" and teaching new users to use it
> > > instead of "git add" is better.
> > 
> > I agree. At first I simply ignored the changes because I didn't have the
> > patience to figure out what exactly did they mean. Now I was forced to
> > understand them to write this patch, and I'm also forcing myself to use this
> > behavior.
> > 
> > 'git add' removing files is counter-intutive, 'git stage' (currently an alias
> > to 'git add') might make more sense.
> 
> Yeah, 'git stage' as an alias to 'git add -A' is much more intuitive.
Agreed.
-- 
Felipe Contreras
Previous: Krzysztof MazurNext: Krzysztof Mazur
Message 7 of 25 in “Add core.mode configuration”
  1. Add core.mode configurationFelipe Contreras, Oct 12, 2013
  2. Krzysztof MazurOct 14, 2013
  3. Felipe ContrerasOct 14, 2013
  4. Krzysztof MazurOct 15, 2013
  5. Felipe ContrerasOct 15, 2013
  6. Krzysztof MazurOct 15, 2013
  7. Felipe ContrerasOct 15, 2013
  8. Krzysztof MazurOct 15, 2013
  9. John SzakmeisterOct 15, 2013
  10. Felipe ContrerasOct 16, 2013
  11. Krzysztof MazurOct 16, 2013
  12. Felipe ContrerasOct 16, 2013
  13. John SzakmeisterOct 16, 2013
  14. John SzakmeisterOct 16, 2013
  15. Felipe ContrerasOct 16, 2013
  16. Felipe ContrerasOct 16, 2013
  17. Philip OakleyOct 16, 2013
  18. Jonathan NiederOct 16, 2013
  19. Philip OakleyOct 17, 2013
  20. Felipe ContrerasOct 17, 2013
  21. Felipe ContrerasOct 15, 2013
  22. Krzysztof MazurOct 15, 2013
  23. Felipe ContrerasOct 16, 2013
  24. Krzysztof MazurOct 16, 2013
  25. Felipe ContrerasOct 16, 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.