diff options
author | Dmitry Ivankov <divanorama@gmail.com> | 2011-07-16 15:03:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-07-19 11:17:47 -0700 |
commit | e173587252ea0db16efc5c64c2cb165ccb406495 (patch) | |
tree | 9c34a47459d9c83803e39c8763a1af56ececc2ef /git-remote-testgit.py | |
parent | b4b872994b59be397519ff76354ba4002e74de48 (diff) | |
download | git-e173587252ea0db16efc5c64c2cb165ccb406495.tar.gz |
remote-helpers: export GIT_DIR variable to helpers
The gitdir capability is recognized by git and can be used to tell
the helper where the .git directory is. But it is not mentioned in
the documentation and considered worse than if gitdir was passed
via GIT_DIR environment variable.
Remove support for the gitdir capability and export GIT_DIR instead.
Teach testgit to use env instead of the now-removed gitdir command.
[sr: fixed up documentation]
Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-remote-testgit.py')
-rw-r--r-- | git-remote-testgit.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/git-remote-testgit.py b/git-remote-testgit.py index e4a99a33ef..b0c1e9b273 100644 --- a/git-remote-testgit.py +++ b/git-remote-testgit.py @@ -35,7 +35,7 @@ def get_repo(alias, url): prefix = 'refs/testgit/%s/' % alias debug("prefix: '%s'", prefix) - repo.gitdir = "" + repo.gitdir = os.environ["GIT_DIR"] repo.alias = alias repo.prefix = prefix @@ -70,7 +70,6 @@ def do_capabilities(repo, args): print "import" print "export" - print "gitdir" print "refspec refs/heads/*:%s*" % repo.prefix print # end capabilities @@ -150,22 +149,11 @@ def do_export(repo, args): repo.non_local.push(repo.gitdir) -def do_gitdir(repo, args): - """Stores the location of the gitdir. - """ - - if not args: - die("gitdir needs an argument") - - repo.gitdir = ' '.join(args) - - COMMANDS = { 'capabilities': do_capabilities, 'list': do_list, 'import': do_import, 'export': do_export, - 'gitdir': do_gitdir, } |