From 94c5759e71bac434ef2787a2b85ce1cb1e6efa02 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Wed, 11 Apr 2012 11:59:43 +0100 Subject: 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. --- morphlib/builder.py | 1 + 1 file changed, 1 insertion(+) (limited to 'morphlib/builder.py') 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] -- cgit v1.2.1