[PATCH 1/3] fix commit abbrev on merge commits
daniel watson
ozzloy at each.do
Wed Jun 17 02:31:25 BST 2026
woops, sorry, resending with correct "In-Reply-To" header.
get a single ABBREV even on merge commits. this caused problems for targz
target when ABBREV was a list of commit abbreviations instead of a single commit
abbreviation.
example:
#+begin_quote
[ozzloy at aiayn offlineimap3]$ git log --format='%h' HEAD~1..
0eac4e8
d537871
8689995
d11176f
0290d94
b03c565
6613752
1f04bbd
56b8cbc
3ca32e9
61291de
2933d3e
46505c5
a81e267
4bb9eb2
15cadd7
630e4d2
b33bc95
5973266
cc48cc3
b9f8726
35bdd70
1c4f9b4
450accc
d16afe5
d4ccbbb
854f389
915dd0a
2afacde
2175481
e722e8c
38da540
177145e
1680e0c
0185b11
4d30078
[ozzloy at aiayn offlineimap3]$ git rev-parse --short HEAD
0eac4e8
[ozzloy at aiayn offlineimap3]$
#+end_quote
Signed-off-by: daniel watson <ozzloy at each.do>
---
Makefile | 2 +-
docs/build-uploads.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 9f0012b..de346fd 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
# Warning: VERSION, ABBREV and TARGZ are used in docs/build-uploads.sh.
VERSION=$(shell ./offlineimap.py --version)
-ABBREV=$(shell git log --format='%h' HEAD~1..)
+ABBREV=$(shell git rev-parse --short HEAD)
TARGZ=offlineimap-v$(VERSION)-$(ABBREV)
SHELL=/bin/bash
RST2HTML=`type rst2html >/dev/null 2>&1 && echo rst2html || echo rst2html.py`
diff --git a/docs/build-uploads.sh b/docs/build-uploads.sh
index 3bef541..45d15a8 100755
--- a/docs/build-uploads.sh
+++ b/docs/build-uploads.sh
@@ -19,7 +19,7 @@ make targz >/dev/null
# Defined in the root Makefile.
version="$(./offlineimap.py --version)"
-abbrev="$(git log --format='%h' HEAD~1..)"
+abbrev="$(git rev-parse --short HEAD)"
targz="../offlineimap-v${version}-${abbrev}.tar.gz"
filename="offlineimap-v${version}.tar.gz"
--
2.54.0
Subject:
From: daniel watson <ozzloy at each.do>
Date: Tue, 16 Jun 2026 18:29:36 -0700
Message-ID: <87cxxq2bun.fsf at each.do>
More information about the OfflineIMAP-project
mailing list