diff options
author | Richard Maw <richard.maw@gmail.com> | 2014-08-08 23:05:12 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-08-12 11:00:09 +0100 |
commit | 54e03f2e5005775c8e8c434094256feccd91c488 (patch) | |
tree | 7a00a5ea111a2b4b60179bfbb1b985c5a074d9d2 /morphlib/gitindex.py | |
parent | 4f14465e968be2ff479ddfeaa6eb568881287bed (diff) | |
download | morph-54e03f2e5005775c8e8c434094256feccd91c488.tar.gz |
Treat untracked morphologies as uncommitted changes
We used to coincidentally include morphologies because we later include
every morphology in the build graph into our temporary build branches.
Since we're now checking whether there's any uncommitted changes before
attempting to create a temporary build branch, this means that we can no
longer build uncommitted morphologies if they aren't reported as
changes.
So this patch makes an exception to the untracked changes rule for
anything that ends with .morph.
It's still confusing that some files aren't included in temporary build
branches, but that would cause performance regressions, so we'll limit
it to just morphologies for now, until we make a decision on what
uncomitted content we care about.
Diffstat (limited to 'morphlib/gitindex.py')
-rw-r--r-- | morphlib/gitindex.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/morphlib/gitindex.py b/morphlib/gitindex.py index 978ea0e2..6be4aacb 100644 --- a/morphlib/gitindex.py +++ b/morphlib/gitindex.py @@ -1,4 +1,4 @@ -# Copyright (C) 2013 Codethink Limited +# Copyright (C) 2013-2014 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -97,7 +97,8 @@ class GitIndex(object): def get_uncommitted_changes(self): for code, to_path, from_path in self._get_status(): - if code not in (STATUS_UNTRACKED, STATUS_IGNORED): + if (code not in (STATUS_UNTRACKED, STATUS_IGNORED) + or code == (STATUS_UNTRACKED) and to_path.endswith('.morph')): yield code, to_path, from_path def set_to_tree(self, treeish): |