diff options
author | David Pursehouse <dpursehouse@collab.net> | 2018-03-16 02:06:10 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-03-16 02:06:10 +0000 |
commit | 4ea1f0cabdda28fdee837ee2f99e14375028b5f4 (patch) | |
tree | 0f3c43a263dbc368a91577442a91ed2de0f0629c /subcmds/init.py | |
parent | 7d52585ec4719ce0314c6d1a20216fc0128d6883 (diff) | |
parent | 5f0e57d2ca28dad4e0f32849609c1857abb596fc (diff) | |
download | git-repo-4ea1f0cabdda28fdee837ee2f99e14375028b5f4.tar.gz |
Merge changes I9c1ab65f,I7b2027ae
* changes:
init: Remove string concat in no-op os.path.join
Support relative paths in --reference
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index eeddca06..47a1c9fa 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -175,7 +175,8 @@ to update the working directory files. | |||
175 | if not mirrored_manifest_git.endswith(".git"): | 175 | if not mirrored_manifest_git.endswith(".git"): |
176 | mirrored_manifest_git += ".git" | 176 | mirrored_manifest_git += ".git" |
177 | if not os.path.exists(mirrored_manifest_git): | 177 | if not os.path.exists(mirrored_manifest_git): |
178 | mirrored_manifest_git = os.path.join(opt.reference + '/.repo/manifests.git') | 178 | mirrored_manifest_git = os.path.join(opt.reference, |
179 | '.repo/manifests.git') | ||
179 | 180 | ||
180 | m._InitGitDir(mirror_git=mirrored_manifest_git) | 181 | m._InitGitDir(mirror_git=mirrored_manifest_git) |
181 | 182 | ||
@@ -401,7 +402,7 @@ to update the working directory files. | |||
401 | git_require(MIN_GIT_VERSION, fail=True) | 402 | git_require(MIN_GIT_VERSION, fail=True) |
402 | 403 | ||
403 | if opt.reference: | 404 | if opt.reference: |
404 | opt.reference = os.path.abspath(os.path.expanduser(opt.reference)) | 405 | opt.reference = os.path.expanduser(opt.reference) |
405 | 406 | ||
406 | # Check this here, else manifest will be tagged "not new" and init won't be | 407 | # Check this here, else manifest will be tagged "not new" and init won't be |
407 | # possible anymore without removing the .repo/manifests directory. | 408 | # possible anymore without removing the .repo/manifests directory. |