瀏覽代碼

Merge "Expand ~ to user's home directory for --reference"

Conley Owens 13 年之前
父節點
當前提交
25f17682ca
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      subcmds/init.py

+ 4 - 0
subcmds/init.py

@@ -317,6 +317,10 @@ to update the working directory files.
 
   def Execute(self, opt, args):
     git_require(MIN_GIT_VERSION, fail=True)
+
+    if opt.reference:
+      opt.reference = os.path.expanduser(opt.reference)
+
     self._SyncManifest(opt)
     self._LinkManifest(opt.manifest_name)