{"thread":{"id":"12835","subject":"Effects of alias not changing the directory","startedAt":"2008-03-24T05:27:44Z","lastAt":"2008-03-24T05:27:44Z","messageCount":1,"participants":["Logan Kennelly"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"72857","messageId":"64DCCD62-D432-4076-9CD6-337EEB82FCCE@sent.com","threadId":"12835","inReplyTo":null,"subject":"Effects of alias not changing the directory","fromName":"Logan Kennelly","fromEmail":"logank+git@sent.com","sentAt":"2008-03-24T05:27:44Z","receivedAt":"2008-03-24T05:27:44Z","isPatch":false,"sender":{"key":"logank+git@sent.com","avatar":null},"body":"At the request of some of my coworkers, I created a wrapper script that\nallows them to use a graphical diff tool when they wish. I  \neffectively add a\nnew command through the use of an alias:\n\n  [alias]\n   exdiff = \"!GIT_EXTERNAL_DIFF=git_exdiff.sh GIT_PAGER=cat git diff\"\n\nThis command works extremely well when run by itself (`git exdiff`) but\nfails when run from a subdirectory and given a relative path because the\nalias machinery changes the current directory as demonstrated here:\n\n  [alias]\n   echopath = \"!echo $PWD\"\n\n   $ cd /path/git_tracked/a/b\n   $ git echopath\n   /path/git_tracked\n\nIs there a reason for this behavior? I'd like to submit a patch, but I'm\nconcerned that I'm missing something. If it helps, I believe it is the\nsetup_git_directory_gently logic (called from handle_alias) that  \nresults in\nthe chdir.\n\nThank you.\n"}]}