Re: [FAQ?] Rationale for git's way to manage the index
From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:08
Hi, On Sun, 6 May 2007, Matthieu Moy wrote:
Linus Torvalds [off-list ref] writes:quoted
- You fundamentally cannot do it any other way. Not doing it the way git does it (point to the content) means that the index-replacement has to point to something else, namely a "file ID".Well, git's index still tells more than "the content FOOBAR exists, somewhere". It also "contains", if not "points to", the file name.
As you pointed out yourself, the index _has_ an idea of the content of that file. So, arguably, it does not point to _that_ file, but rather to that file _with a certain content_.
quoted
What's so hard with adding that "-a" to "git commit"? You don't even need it on the status line, the status is relevant and understandable (and actually tells you more) even without it.Off course, I don't have strong argument against it. The biggest annoyance is that my fingers are used to "commit -m message", and now type "commit -a message", but ...
Just another reason to hate CVS. Because it trained people to do that. If it was not for the training by CVS, I would have strongly opposed to the introduction of the "-m" switch to commit. It _encourages_ bad commit messages. Now, with Git I usually let git-commit start up the editor. Because then I am actually encouraged to make up my mind, and put down a meaningful message, which might not only help _others_ to understand why I did it, and how, but also _myself_ (after a few months).
The reason why I'm posting this is that I was wondering whether "commit -a" not being the default was supposed to be a message like "you shouln't use it too often".
IMHO yes, that is the message. In addition to being nice to people used to the behaviour of "git commit" _without_ other arguments. Ciao, Dscho