{"thread":{"id":"11770","subject":"\"git add\" and absolute paths","startedAt":"2008-01-28T12:32:24Z","lastAt":"2008-01-28T18:32:23Z","messageCount":4,"participants":["Wincent Colaiuta","Johannes Schindelin","Jakub Narebski","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"66740","messageId":"916BAC14-A5E4-4666-A29E-2CDF114DCD87@wincent.com","threadId":"11770","inReplyTo":null,"subject":"\"git add\" and absolute paths","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2008-01-28T12:32:24Z","receivedAt":"2008-01-28T12:32:24Z","isPatch":false,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"I was somewhat surprised the other day to see that you can't pass  \nabsolute paths to \"git add\":\n\n$ cd /tmp\n$ mkdir foo\n$ cd foo\n$ git init\nInitialized empty Git repository in .git/cuzco:foo\n$ echo \"content\" > file\n$ git add /tmp/foo/file\nfatal: unable to add /tmp/foo/file to index\n$ git add file\n\nI understand that you can't add arbitrary paths outside of your  \nworktree, but if the absolute path specifies something _inside_ your  \nworktree then it seems that this is either a bug or a \"usability  \nshortcoming\" if you prefer to avoid the term \"bug\".\n\nI also understand that providing a relative path is by far the most  \ncommon operation, but there are real use cases where it's easier to  \npass an absolute path. For example: you're working at the console  \ninside the work tree but you also have a GUI file browser open  \nalongside. Sometimes it is simpler to drag-and-drop the file from the  \nGUI to the console window (thus inserting the absolute path to the  \nfile) rather than typing out the relative path, even with  \nautocompletion.\n\nOut of curiosity I went back and looked at the last version of Git  \nbefore \"add\" became a built-in (1.3.3). It also barfs for absolute  \npaths:\n\n$ git add file\nIgnoring path /tmp/foo/file\n\nSo I suspect it's always been this way. Do people agree that this  \nissue is worth addressing?\n\nCheers,\nWincent\n"},{"id":"66742","messageId":"alpine.LSU.1.00.0801281241550.23907@racer.site","threadId":"11770","inReplyTo":"916BAC14-A5E4-4666-A29E-2CDF114DCD87@wincent.com","subject":"Re: \"git add\" and absolute paths","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-28T12:43:16Z","receivedAt":"2008-01-28T12:43:16Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 28 Jan 2008, Wincent Colaiuta wrote:\n\n> I was somewhat surprised the other day to see that you can't pass \n> absolute paths to \"git add\":\n\nI think this is in the same ballpark as the wish to normalise paths passed \nto git add.  Not something for 1.5.4.\n\nPersonally, I have to admit that this was never an itch of mine, so I'll \nprobably not \"fix\" it.\n\nCiao,\nDscho\n"},{"id":"66744","messageId":"m33asi9jxp.fsf@localhost.localdomain","threadId":"11770","inReplyTo":"916BAC14-A5E4-4666-A29E-2CDF114DCD87@wincent.com","subject":"Re: \"git add\" and absolute paths","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-01-28T13:08:44Z","receivedAt":"2008-01-28T13:08:44Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Wincent Colaiuta <win@wincent.com> writes:\n\n> I was somewhat surprised the other day to see that you can't pass\n> absolute paths to \"git add\":\n>\n[cut] \n> \n> I understand that you can't add arbitrary paths outside of your\n> worktree, but if the absolute path specifies something _inside_ your\n> worktree then it seems that this is either a bug or a \"usability\n> shortcoming\" if you prefer to avoid the term \"bug\".\n\nIf I remember correctly this issue was discussed on git mailing list,\nand I guess there were even some patches implementing that, but I\ndon't know what happened iwth them: freeze persiod, troubles with\nCygwin (MS Windows), or what...\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"66753","messageId":"20080128183223.GA31140@coredump.intra.peff.net","threadId":"11770","inReplyTo":"m33asi9jxp.fsf@localhost.localdomain","subject":"Re: \"git add\" and absolute paths","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-01-28T18:32:23Z","receivedAt":"2008-01-28T18:32:23Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jan 28, 2008 at 05:08:44AM -0800, Jakub Narebski wrote:\n\n> > I understand that you can't add arbitrary paths outside of your\n> > worktree, but if the absolute path specifies something _inside_ your\n> > worktree then it seems that this is either a bug or a \"usability\n> > shortcoming\" if you prefer to avoid the term \"bug\".\n> \n> If I remember correctly this issue was discussed on git mailing list,\n> and I guess there were even some patches implementing that, but I\n> don't know what happened iwth them: freeze persiod, troubles with\n> Cygwin (MS Windows), or what...\n\nI think the thread just trailed off, and no replacement patch got\nsubmitted. See this thread:\n\n  http://mid.gmane.org/200712032153.31322.robin.rosenberg.lists@dewire.com\n\n-Peff\n"}]}