]> git.madduck.net Git - code/vcsh.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Get rid of GIT_WORK_TREE during vcsh sessions
authormartin f. krafft <madduck@madduck.net>
Fri, 19 Jul 2013 17:21:14 +0000 (19:21 +0200)
committermartin f. krafft <madduck@madduck.net>
Fri, 19 Jul 2013 17:21:14 +0000 (19:21 +0200)
This patch gets rid of GIT_WORK_TREE completely, which makes the whole thing a
bit more transparent, I find. Git uses core.worktree anyway, so the
environment variable isn't needed.

Signed-off-by: martin f. krafft <madduck@madduck.net>
vcsh

diff --git a/vcsh b/vcsh
index d45e95d927925fa31e45deadd7e19f409a94ae9b..5642b97741a4182f6ffdb0dacc3e15a4314ffa3e 100755 (executable)
--- a/vcsh
+++ b/vcsh
@@ -248,7 +248,6 @@ push() {
 }
 
 retire() {
-       unset GIT_WORK_TREE
        unset VCSH_DIRECTORY
 }
 
@@ -289,7 +288,6 @@ upgrade() {
 
 use() {
        git_dir_exists
-       export GIT_WORK_TREE="$(git rev-parse --show-toplevel)"
        export VCSH_DIRECTORY="$VCSH_REPO_NAME"
 }