{"thread":{"id":"27084","subject":"using aliases within the subdirectory","startedAt":"2011-04-13T10:24:10Z","lastAt":"2011-04-13T12:42:07Z","messageCount":3,"participants":["Matej Batic","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"165736","messageId":"4DA579CA.5030908@ge.infn.it","threadId":"27084","inReplyTo":null,"subject":"using aliases within the subdirectory","fromName":"Matej Batic","fromEmail":"matej.batic@ge.infn.it","sentAt":"2011-04-13T10:24:10Z","receivedAt":"2011-04-13T10:24:10Z","isPatch":false,"sender":{"key":"matej.batic@ge.infn.it","avatar":null},"body":"Dear all,\n\nI am facing a problem, noted previously in\n    \nhttp://git.661346.n2.nabble.com/git-alias-always-chdir-to-top-td1609456.html  \n\n    http://kerneltrap.org/mailarchive/git/2010/5/5/29818/thread\nwhich in practice means that I cannot pass the \" -- \nrelative_path_to_some_file_in_the_tree\" argument to my alias.\n\nIs there any way to get the current working dir before git changes dir \nto root directory?\n\nBest regards,\nMatej\n"},{"id":"165739","messageId":"4DA59480.5080307@drmicha.warpmail.net","threadId":"27084","inReplyTo":"4DA579CA.5030908@ge.infn.it","subject":"Re: using aliases within the subdirectory","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-04-13T12:18:08Z","receivedAt":"2011-04-13T12:18:08Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Matej Batic venit, vidit, dixit 13.04.2011 12:24:\n> Dear all,\n> \n> I am facing a problem, noted previously in\n>     \n> http://git.661346.n2.nabble.com/git-alias-always-chdir-to-top-td1609456.html  \n> \n>     http://kerneltrap.org/mailarchive/git/2010/5/5/29818/thread\n> which in practice means that I cannot pass the \" -- \n> relative_path_to_some_file_in_the_tree\" argument to my alias.\n> \n> Is there any way to get the current working dir before git changes dir \n> to root directory?\n> \n> Best regards,\n> Matej\n\nThis may depend on your shell and rc files, but for me, $PWD gives the\noriginal current working dir.\n\nAlso, revisiting that topic after 1.7.5 seems worthwhile.\n\nMichael\n"},{"id":"165742","messageId":"4DA59A1F.7060104@drmicha.warpmail.net","threadId":"27084","inReplyTo":"4DA5965C.8050501@ge.infn.it","subject":"Re: using aliases within the subdirectory","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-04-13T12:42:07Z","receivedAt":"2011-04-13T12:42:07Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Matej Batic venit, vidit, dixit 13.04.2011 14:26:\n> Michael J Gruber wrote:\n>> Matej Batic venit, vidit, dixit 13.04.2011 12:24:\n>>   \n>>> Dear all,\n>>>\n>>> I am facing a problem, noted previously in\n>>>     \n>>> http://git.661346.n2.nabble.com/git-alias-always-chdir-to-top-td1609456.html  \n>>>\n>>>     http://kerneltrap.org/mailarchive/git/2010/5/5/29818/thread\n>>> which in practice means that I cannot pass the \" -- \n>>> relative_path_to_some_file_in_the_tree\" argument to my alias.\n>>>\n>>> Is there any way to get the current working dir before git changes dir \n>>> to root directory?\n>>>\n>>> Best regards,\n>>> Matej\n>>>     \n>>\n>> This may depend on your shell and rc files, but for me, $PWD gives the\n>> original current working dir.\n>>\n>> Also, revisiting that topic after 1.7.5 seems worthwhile.\n>>\n>> Michael\n>>   \n> \n> Well, that does not work for me:\n> [alias]\n>     pwd = \"!sh -c 'echo $PWD'\"\n> \n> git pwd inside tree subdirectory will print git root directory with git \n> version 1.7.3.4 and also with 1.7.4.1.\n\nI had only tried \"pwd = !env\" to check the environment which is passed\n(and that has the PWD from the subdir). So, I guess you'd need to have a\nsecond look at that topic.\n\nMichael\n"}]}