aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2021-07-29 02:44:51 -0600
committerTim Harder <radhermit@gmail.com>2021-07-29 02:46:31 -0600
commit67898ddbe0d273165de7d40d64fa23577ac518e9 (patch)
tree18f927211c7a9f94e92c6b0914f66960bc16127b /src
parentbump version (diff)
downloadpkgdev-67898ddbe0d273165de7d40d64fa23577ac518e9.tar.gz
pkgdev-67898ddbe0d273165de7d40d64fa23577ac518e9.tar.bz2
pkgdev-67898ddbe0d273165de7d40d64fa23577ac518e9.zip
pkgdev commit: only update change data when altered
Diffstat (limited to 'src')
-rw-r--r--src/pkgdev/scripts/pkgdev_commit.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkgdev/scripts/pkgdev_commit.py b/src/pkgdev/scripts/pkgdev_commit.py
index 920555b..bb783a5 100644
--- a/src/pkgdev/scripts/pkgdev_commit.py
+++ b/src/pkgdev/scripts/pkgdev_commit.py
@@ -590,12 +590,13 @@ class Change:
data = f.read()
except (FileNotFoundError, UnicodeDecodeError):
data = None
- object.__setattr__(self, "data", data)
+ object.__setattr__(self, 'data', data)
return data
def update(self, data):
"""Update the change's cached file data."""
- object.__setattr__(self, "data", data)
+ if data != getattr(self, 'data', None):
+ object.__setattr__(self, 'data', data)
return self
def sync(self):