From: Goswin von Brederlow <goswin-v-b@web.de>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
578764@bugs.debian.org, git@vger.kernel.org
Subject: Re: Please default to 'commit -a' when no changes were added
Date: Fri, 23 Apr 2010 11:03:56 +0200 [thread overview]
Message-ID: <87vdbitu9v.fsf@frosties.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.00.1004221651590.7232@xanadu.home> (Nicolas Pitre's message of "Thu, 22 Apr 2010 17:25:07 -0400 (EDT)")
Nicolas Pitre <nico@fluxnic.net> writes:
> On Thu, 22 Apr 2010, Goswin von Brederlow wrote:
>
>> Nicolas Pitre <nico@fluxnic.net> writes:
>>
>> > On Thu, 22 Apr 2010, Goswin von Brederlow wrote:
>> > Exact. It is therefore not progress to impose some inconvenience to one
>> > work flow in order to make another one easier. And in this case we're
>> > talking about the difference between having to type an additional -a vs
>> > the risk of creating a commit with unexpected content.
>>
>> Is there a risk? You do get an editor with all the files affected listed
>> giving you a big fat warning what you are about to commit. Yes I
>> sometimes do start to commit wrongly too (no matter what RCS used) but
>> then I just close the editor to abort and commit the things seperately.
>
> Yes, but this is a much greater burden to 1) not forget to empty the
> editor, and 2) actually save the empty file. Simply exiting the editor
> will cause unwanted commit.
>
> Compare that with simply adding -a to your commit command when told so.
That is not how it works in other RCS. Initialy the editor only contains
comments listing the affected files. If you do not alter the file then
the commit aborts. I agree that having to empty the file and save it
would be a greater burden.
>> >> Alternatively an option to take all changes but only if the index is
>> >> empty would be helpfull. Then people could define an alias for that or
>> >> set the option in the config. Other than setting -a that would allow
>> >> using an index when needed and commit everything in the normal case
>> >> without having to change the command used to commit.
>> >
>> > But you're proposing to change the semantics for that command. And I
>> > also suspect that you're trying to make the index more hidden while what
>> > we're actually trying to do is to promote it.
>>
>> Yes, it would hide the index. But you are not just promoting it. You are
>> forcing people to always use it, even if only through the -a option.
>
> Well, sure.
>
> And you might be glad that the -a option is there at all. When this was
> debated, the concensus was that the index is what makes Git so
> different, and actually *better* than the alternatives.
>
> Concerns were raised about natural human resistance to change and the
> fact that some people would have problem adapting to a different model.
> So the -a argument was added as a compromize, although the concensus was
> much less strong in that case.
>
> And experience so far has shown that the vast majority of new Git users
> started to really appreciate the index once they've past the initial
> hurdle of getting used to a different concept.
>
> So we can say that Git's index is one of its major feature. You should
> learn to use it or stick to -a, but please don't try to make Git into
> what it was meant to be different from.
>
>> > What _you_ can do though, is this:
>> >
>> > git config --global alias.ci "commit -a"
>>
>> But then when I accidentally use 'git ci' while having an index the
>> index gets ignored and all changed files get commited in one big mess.
>
> Not at all. You will end up in the same text editor with the same
> opportunity to abort the messed up commit as you are claiming above.
> Except now this is your own burden instead of mine. See? One's gain is
> another one's loss.
>
> However in this case this would happen because you mixed up an
> index-using workflow with a non-index-using workflow. While with your
> suggested change the messed up commit could occur without mixing up
> workflows.
No, with my suggested change (either change of the default or the extra
option) it would be smart enough to do the right thing on its own.
> So either you use the index or you don't. And of course I'd strongly
> suggest you truly consider using it.
>
>> Given how seldom I need an index (so far never) the risk of using 'git
>> ci' accidentally is way to high. Same with typing -a. I do it so often
>> that when I actualy don't want it I will probably type it anyway out of
>> habbit.
>
> This is a strawman. If you do not use the index and never used it so
> far, why are you so afraid of this ci alias? Please get over it.
>
>
> Nicolas
You all say the index is such a great thing. So I might use it
eventually. Other people might use it 1 out of 10 times. Yet other
people use it 9 out of 10 times. Can you at least accept that the use of
the index feature is different for each person?
My suggested change, with the --a-if-empty option, would not impose
anything on existing usage. But it would benefit those that rarely use
an index and would like git to be smart enough to know when to use the
index and when not. Yes, it would mean the use of the index ideology is
not force upon people anymore. But isn't that a good thing? Free
software is about freedom. That should include the freedom not to use
the index method.
MfG
Goswin
next prev parent reply other threads:[~2010-04-23 9:04 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100422151037.2310.2429.reportbug@frosties.localdomain>
2010-04-22 15:58 ` Please default to 'commit -a' when no changes were added Jonathan Nieder
2010-04-22 18:37 ` Goswin von Brederlow
2010-04-22 19:03 ` Nicolas Pitre
2010-04-22 19:08 ` Sverre Rabbelier
2010-04-22 20:37 ` Goswin von Brederlow
2010-04-22 21:25 ` Nicolas Pitre
2010-04-23 9:03 ` Goswin von Brederlow [this message]
2010-04-23 9:31 ` Miles Bader
2010-04-23 16:01 ` Wincent Colaiuta
2010-04-23 20:17 ` Goswin von Brederlow
2010-04-23 20:26 ` Michael Witten
2010-04-23 20:33 ` Daniel Grace
2010-04-23 21:01 ` Nicolas Pitre
2010-04-24 21:15 ` Goswin von Brederlow
2010-04-24 21:40 ` Jonathan Nieder
2010-04-24 22:08 ` Goswin von Brederlow
2010-04-24 22:42 ` Jonathan Nieder
2010-04-25 2:47 ` Miles Bader
2010-04-25 3:33 ` Jonathan Nieder
2010-04-23 22:35 ` Matthias Andree
2010-04-24 1:43 ` Junio C Hamano
2010-04-22 21:28 ` Junio C Hamano
2010-04-22 21:40 ` Matthieu Moy
2010-04-22 21:57 ` Michael Witten
2010-04-23 9:09 ` Goswin von Brederlow
2010-04-23 9:22 ` Tomas Carnecky
2010-04-23 17:00 ` Michael Witten
2010-04-23 9:27 ` Matthieu Moy
2010-04-23 9:35 ` Tor Arntsen
2010-04-22 21:48 ` Adam Brewster
2010-04-22 22:27 ` Jonathan Nieder
2010-04-23 9:15 ` Goswin von Brederlow
2010-04-23 10:39 ` The index (Re: Please default to 'commit -a' when no changes were added) Jonathan Nieder
2010-04-22 22:38 ` Please default to 'commit -a' when no changes were added Jon Seymour
2010-04-23 0:04 ` Adam Brewster
2010-04-23 9:25 ` Goswin von Brederlow
2010-04-23 9:14 ` Goswin von Brederlow
2010-04-23 9:39 ` Björn Steinbrink
2010-04-23 11:44 ` Sergei Organov
2010-04-23 11:57 ` Sverre Rabbelier
2010-04-23 12:20 ` Sergei Organov
2010-04-23 14:23 ` Goswin von Brederlow
2010-04-23 18:59 ` Matthias Andree
2010-04-23 19:34 ` Michael Witten
2010-04-23 22:18 ` Matthias Andree
2010-04-23 22:25 ` Eric Raymond
2010-04-23 23:38 ` Michael Witten
2010-04-24 4:38 ` Eric Raymond
2010-04-24 9:05 ` Michael Witten
2010-04-24 9:09 ` Eric Raymond
2010-04-23 23:26 ` Michael Witten
2010-04-24 13:26 ` Tor Arntsen
2010-04-24 9:40 ` 'commit -a' safety (was: Re: Please default to 'commit -a' when no changes were added) Jakub Narebski
2010-04-24 9:56 ` 'commit -a' safety Miles Bader
2010-04-24 10:05 ` Andreas Schwab
2010-04-24 10:26 ` Jakub Narebski
2010-04-24 13:29 ` Miles Bader
2010-04-24 18:23 ` Nicolas Pitre
2010-04-25 0:16 ` Jakub Narebski
2010-04-25 2:43 ` Miles Bader
2010-04-24 11:10 ` 'commit -a' safety (was: Re: Please default to 'commit -a' when no changes were added) Wincent Colaiuta
2010-04-24 11:48 ` 'commit -a' safety Jakub Narebski
2010-04-24 14:28 ` Joey Hess
2010-04-24 15:11 ` Mike Hommey
2010-04-24 16:42 ` 'commit -a' safety (was: Re: Please default to 'commit -a' when no changes were added) Petr Baudis
2010-04-24 16:59 ` Bug#578764: " Wincent Colaiuta
2010-04-24 17:47 ` Petr Baudis
2010-04-24 18:35 ` Nicolas Pitre
2010-04-24 18:54 ` Petr Baudis
2010-04-24 19:09 ` Nicolas Pitre
2010-04-24 19:35 ` Jacob Helwig
2010-04-24 19:44 ` Nicolas Pitre
2010-04-24 19:57 ` Jacob Helwig
2010-04-24 23:47 ` 'commit -a' safety Jakub Narebski
2010-04-25 1:13 ` Junio C Hamano
2010-04-25 8:01 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vdbitu9v.fsf@frosties.localdomain \
--to=goswin-v-b@web.de \
--cc=578764@bugs.debian.org \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=nico@fluxnic.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).