diff options
-rwxr-xr-x | macro.py | 2 | ||||
-rwxr-xr-x | set-serial.sh | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -106,7 +106,7 @@ class Macro: self.__dict__[key] = body # determine the macro's serial number if computeSerialNumber: # compute the number from git - logMessages = subprocess.check_output(["git", "log", "--oneline", "--", filePath], bufsize=1) + logMessages = subprocess.check_output(["git", "log", "--oneline", "054e8ad8c766afa7059d8cd4a81bbfa99133ef5e..HEAD", "--", filePath], bufsize=1) logLines = logMessages.rstrip(b'\n').split(b"\n") self.serial = len(logLines) modified = subprocess.call(["git", "diff", "--quiet", "--exit-code", "HEAD", "--", filePath]) diff --git a/set-serial.sh b/set-serial.sh index 7e52ed4..5ee3e8e 100755 --- a/set-serial.sh +++ b/set-serial.sh @@ -14,7 +14,7 @@ set_serial_number() for n in "$@"; do echo "$n ... " # Determine the number of revisions that have occurred to the macro. - revision=$(git log --oneline -- "$n" | wc -l) + revision=$(git log --oneline 054e8ad8c766afa7059d8cd4a81bbfa99133ef5e..HEAD -- "$n" | wc -l) # Check whether git regards the file as "modified" now. If it does, # the serial number needs to be bumped one more time. if ! git diff --quiet --exit-code HEAD -- "$n"; then |