Code

git-mergetool--lib: Make vimdiff retain the current directory
authorDavid Aguilar <davvid@gmail.com>
Thu, 26 May 2011 06:21:01 +0000 (23:21 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2011 22:05:52 +0000 (15:05 -0700)
commitf9ad901fd31991837c9648bbee8ac18b39aa0891
tree19c31a93951cc9f26596fe88bed8fd9ad34c72d6
parent26b052515d1714918a7da4bfcdaaca37dc4db2e0
git-mergetool--lib: Make vimdiff retain the current directory

When using difftool with vimdiff it can be unexpected that
the current directory changes to the root of the project.
Tell vim to chdir to the value of $GIT_PREFIX to fix this.

Care is taken to quote the variable so that vim expands it.
This avoids problems when directory names contain spaces.

Signed-off-by: David Aguilar <davvid@gmail.com>
Reported-by: Frédéric Heitzmann <frederic.heitzmann@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-mergetool--lib.sh