summaryrefslogtreecommitdiffstats
path: root/subcmds/init.py
diff options
context:
space:
mode:
authorVictor Boivie <victor.boivie@sonymobile.com>2012-10-05 14:50:05 +0200
committerGustaf Lundh <gustaf.lundh@sonymobile.com>2012-10-08 15:03:20 +0200
commit297e7c6ee69077cb063b90a32d22b0b812a95841 (patch)
tree5e9c8fea016c7943dd3b933e228e238d171b091b /subcmds/init.py
parent7119f94abaa48b3b7fb990f2a12ec5458ef3f133 (diff)
downloadgit-repo-297e7c6ee69077cb063b90a32d22b0b812a95841.tar.gz
Expand ~ to user's home directory for --reference
This allows a user to have a 'repo init' as: $ repo init -u ... --reference=~/mirror Change-Id: Ib85b7c8ffca9d732132c68fe9a8d7f0ab1fa9288
Diffstat (limited to 'subcmds/init.py')
-rw-r--r--subcmds/init.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 9a4f7118..9a9317e4 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -317,6 +317,10 @@ to update the working directory files.
317 317
318 def Execute(self, opt, args): 318 def Execute(self, opt, args):
319 git_require(MIN_GIT_VERSION, fail=True) 319 git_require(MIN_GIT_VERSION, fail=True)
320
321 if opt.reference:
322 opt.reference = os.path.expanduser(opt.reference)
323
320 self._SyncManifest(opt) 324 self._SyncManifest(opt)
321 self._LinkManifest(opt.manifest_name) 325 self._LinkManifest(opt.manifest_name)
322 326