diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-02-27 15:15:14 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-02-27 15:15:14 +0000 |
commit | 0e23121d8534bb39ba75186a3c57fe31bb60e45e (patch) | |
tree | 1e96955f817a875b008d8541a60d051aa6dd4c61 /morphlib/builder.py | |
parent | 94abd2410c44e93b16bc7818b00e7c5040a6b765 (diff) | |
download | morph-0e23121d8534bb39ba75186a3c57fe31bb60e45e.tar.gz |
morph: drop special case .git in mtime setting
Either all .gits need to be left alone, including submodules, or
all of them get changed.
Doing all gets surprisingly complicated, as bottom-up traversal is
needed for directories to have their mtimes set, which means that
either we check the path for a .git component, or we do our own
traversal function, to top-down exclude .git and bottom-up set
mtimes.
This is more effort than it is worth when git probably doesn't care
so let's just drop it entirely.
Diffstat (limited to 'morphlib/builder.py')
-rw-r--r-- | morphlib/builder.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py index 2bdbc8ad..385a431f 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -354,13 +354,11 @@ class ChunkBuilder(BlobBuilder): ''' now = time.time() - dot_git = os.path.join(root, '.git') for dirname, subdirs, basenames in os.walk(root, topdown=False): - if dirname != dot_git: - for basename in basenames: - pathname = os.path.join(dirname, basename) - os.utime(pathname, (now, now)) - os.utime(dirname, (now, now)) + for basename in basenames: + pathname = os.path.join(dirname, basename) + os.utime(pathname, (now, now)) + os.utime(dirname, (now, now)) def build_with_system_or_commands(self): '''Run explicit commands or commands from build system. |