Salikh Zakirov <Salikh.Zakirov@Intel.com> writes:Well, that's why the description says 'the changes to the tracked files' above to make it clear. An obvious alternative is not to talk about staging in terms of `git add` and `git rm` but instead mention `git update-index` in that part of the documentation, but I think that is going backwards. I think the conclusion of recent discussions is not to paper over the differences from new people (nor making git closer to other systems by castrating git), but make things easier to learn for them. My attempt to update git-commit documentation is a part of this effort. Better rewording is very much appreciated. But you are right. Prior experiences with other systems would make it harder to learn git here, because 'git add', especially with Nico's enhancement in 'next', is different from 'cvs add'. The problem is that these systems do not have the concept of tracking 'contents' (they instead track paths), and 'add' to them mean 'add the named paths to the set of tracked paths'. On the other hand, git fundamentally tracks contents. We do have the concept of 'the set of tracked paths', but that is a side effect of tracking contents. In other words, you do not 'add' a path without 'add'ing its contents. By the way, I have been wondering if the --only variant of the command should also add untracked files to the index. That is: $ git commit foo.c '*.h' currently barfs if foo.c is not tracked, and/or there is no tracked header files. We could instead run git-update-index --add on them. Incidentally, this would make this sequence possible: $ tar xf /var/tmp/foo.tar ;# extract tarball here. $ git init-db $ git commit -m 'initial import' . - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Linux 2.6.25-rc4 |
| Greg KH | Linux 2.6.25.10 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Ilpo Järvinen | Re: Strange Application bug, race in MSG_PEEK complaints (was: Bug#513695: fetchma... |
