summaryrefslogtreecommitdiff
path: root/morphlib/plugins/branch_and_merge_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/plugins/branch_and_merge_plugin.py')
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py
index abadf8da..829176fa 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -140,6 +140,12 @@ class BranchAndMergePlugin(cliapp.Plugin):
# Clone it from cache to target directory.
repo.checkout(ref, os.path.abspath(dirname))
+ # Remember the repo name we cloned from in order to be able
+ # to identify the repo again later using the same name, even
+ # if the user happens to rename the directory.
+ app.runcmd(['git', 'config', 'morph.repository', reponame],
+ cwd=dirname)
+
# Set the origin to point at the original repository.
morphlib.git.set_remote(app.runcmd, dirname, 'origin', repo.url)