diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-04-11 11:59:43 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-04-11 13:10:27 +0100 |
commit | 94c5759e71bac434ef2787a2b85ce1cb1e6efa02 (patch) | |
tree | 71c912f226aa41ddee146605a5cc5ce958e9bec6 /morphlib/builder.py | |
parent | 38132bcc37534d9d7727a7e93f2113a6b4e3acd5 (diff) | |
download | morph-94c5759e71bac434ef2787a2b85ce1cb1e6efa02.tar.gz |
builder: ensure working directory matches commit
When making a copy of the repository to build from, builder copies the
.git directory then checks out the ref it wants.
However sometimes this doesn't add the files to the working directory,
possibly because the files it is missing weren't changed in the difference
between what the .git thought HEAD was and what is now checked out.
Diffstat (limited to 'morphlib/builder.py')
-rw-r--r-- | morphlib/builder.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py index ed21f623..4bbf4464 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -115,6 +115,7 @@ class Factory(object): os.mkdir(destdir) morphlib.git.copy_repository(treeish, destdir, msg) morphlib.git.checkout_ref(destdir, treeish.ref, msg) + morphlib.git.reset_workdir(destdir, msg) return [(sub.treeish, os.path.join(destdir, sub.path)) for sub in treeish.submodules] |