{"thread":{"id":"16904","subject":"git-add --verbose should say when something is already indexed","startedAt":"2008-12-29T06:46:24Z","lastAt":"2008-12-29T22:55:56Z","messageCount":4,"participants":["jidanni@jidanni.org","Nanako Shiraishi","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"98862","messageId":"87eizr32db.fsf@jidanni.org","threadId":"16904","inReplyTo":null,"subject":"git-add --verbose should say when something is already indexed","fromName":"","fromEmail":"jidanni@jidanni.org","sentAt":"2008-12-29T06:46:24Z","receivedAt":"2008-12-29T06:46:24Z","isPatch":false,"sender":{"key":"jidanni@jidanni.org","avatar":"https://gravatar.com/avatar/36568d4af4c8d3e71627ef3b8c8d00e39065b12f29676cccd38ced75e68fa2a6?d=mp&s=160"},"body":"git-add or at least git-add --verbose should say upon\n$ git-add bla.txt\n$ git-add bla.txt\nbla.txt is already in the index.\n\nThe git-add man page should mention how one can see all the files\nadded, perhaps by git-ls-files. If so mention in SEE ALSO too.\n"},{"id":"98872","messageId":"20081229175258.6117@nanako3.lavabit.com","threadId":"16904","inReplyTo":"87eizr32db.fsf@jidanni.org","subject":"Re: git-add --verbose should say when something is already indexed","fromName":"Nanako Shiraishi","fromEmail":"nanako3@lavabit.com","sentAt":"2008-12-29T08:52:58Z","receivedAt":"2008-12-29T08:52:58Z","isPatch":false,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting jidanni@jidanni.org:\n\n> git-add or at least git-add --verbose should say upon\n> $ git-add bla.txt\n> $ git-add bla.txt\n> bla.txt is already in the index.\n\nI do not think it should.\n\nI suspect that you misunderstand what \"git add\" is. It is not about adding a new path to be tracked. Rather, it is to add the current contents of the file (unless --interactive is used).\n\nYou told git to add the contents of \"bla.txt\" to the index as path \"bla.txt\". I do not think there is anything more to report after it did exactly what it was told to do.\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"98874","messageId":"7v63l3e4lz.fsf@gitster.siamese.dyndns.org","threadId":"16904","inReplyTo":"20081229175258.6117@nanako3.lavabit.com","subject":"Re: git-add --verbose should say when something is already indexed","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-29T09:02:32Z","receivedAt":"2008-12-29T09:02:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nanako Shiraishi <nanako3@lavabit.com> writes:\n\n> Quoting jidanni@jidanni.org:\n>\n>> git-add or at least git-add --verbose should say upon\n>> $ git-add bla.txt\n>> $ git-add bla.txt\n>> bla.txt is already in the index.\n>\n> I do not think it should.\n>\n> I suspect that you misunderstand what \"git add\" is. It is not about adding a new path to be tracked. Rather, it is to add the current contents of the file (unless --interactive is used).\n>\n> You told git to add the contents of \"bla.txt\" to the index as path \"bla.txt\". I do not think there is anything more to report after it did exactly what it was told to do.\n\nThat is almost (say, 98%) true, but it is not absolutely outlandishly\nunreasonable if somebody wants:\n\n    $ git add bla.txt\n    $ edit bla.txt\n    $ git add bla.txt\n\nand\n\n    $ git add bla.txt\n    $ git add bla.txt\n\nto behave differently.  The latter is a pure no-op.\n\nHaving said that, I do not think it is worth it.  For one thing, if you\ndid:\n\n    $ git add .\n\nafter making changes to a few files and created one new file in a project\nwith 20,000 files, command would say \"Yo, bozo, you told me to add the\nsame contents for path X\" for 19,998  times.\n\nIf the report were not negative as Jidanni suggests, but instead were\npositive, i.e.\n\n    $ git add -v frotz.txt nitfol.txt\n    added new contents for frotz.txt\n    added new contents for nitfol.txt\n    $ edit frotz.txt\n    $ git add -v frotz.txt nitfol.txt\n    added new contents for frotz.txt\n\nit might be slightly more useful, but I doubt it is that useful in\npractice.\n\nI won't reject a patch if it is cleanly done, though.\n"},{"id":"98925","messageId":"874p0m4mmb.fsf@jidanni.org","threadId":"16904","inReplyTo":"7v63l3e4lz.fsf@gitster.siamese.dyndns.org","subject":"Re: git-add --verbose should say when something is already indexed","fromName":"","fromEmail":"jidanni@jidanni.org","sentAt":"2008-12-29T22:55:56Z","receivedAt":"2008-12-29T22:55:56Z","isPatch":false,"sender":{"key":"jidanni@jidanni.org","avatar":"https://gravatar.com/avatar/36568d4af4c8d3e71627ef3b8c8d00e39065b12f29676cccd38ced75e68fa2a6?d=mp&s=160"},"body":"DESCRIPTION\n       This command adds the current content of new or modified files to the index, thus staging that content for\n       inclusion in the next commit.\n\nMaybe also mention that it also adds a new path to be tracked by the\nindex, if it is not tracked already.\n"}]}