From 94c4a15d6797512d670febd8c8ac6686fe0be223 Mon Sep 17 00:00:00 2001 From: mirabilos Date: Mon, 2 Aug 2021 02:31:49 +0200 Subject: [PATCH] =?UTF-8?q?ugh=E2=80=A6=20git=20commands=20are=20an=20inco?= =?UTF-8?q?nsistency=20hell=20in=20itself?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git reflog expire --expire=a̲l̲l̲ is documented, even though the code only uses parse_expiry_date() which handles all and now the same, so --expire=now would also work (and is in fact recommended by git help filter-branch but undocumented in git help reflog!); git gc --prune=n̲o̲w̲ is handled specially, one use is parse_expiry_date() (which also accepts --prune=all, which I’ve seen recommended lots over the years), the other is a direct strcmp with "now" (matching *its* documentation but not lots of info elsewhere)… so we now use --expire=all --all and --prune=now despite wanting the identical thing… --- cvs2git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvs2git b/cvs2git index df32928..075a164 100644 --- a/cvs2git +++ b/cvs2git @@ -226,7 +226,7 @@ if (( do_grafts )); then fi $git reflog expire --expire=all --all || die "git reflog failed with errorlevel $?" -$git gc --aggressive --prune=all || die "git gc failed with errorlevel $?" +$git gc --aggressive --prune=now || die "git gc failed with errorlevel $?" print -u2 "I: $SECONDS seconds elapsed for garbage collection" for rem in "${remote[@]}"; do print -ru2 "D: pushing to $rem"