Control: tags -1 patch

Ian Jackson writes ("/usr/lib/git-core/git-subtree: git-subtree needs bash"):
> Editing the shebang to `#!/bin/bash` fixes it.

I spoke too soon.  It turns out that bash also has a recursion limit,
and it just silently exits with status 1.  This appears to be due to
stack exhaustion.

ulimit -s hard fixed it.

With the attched patch I was able to process about 20k commits.
It was slow, but it succeeded.

The package dependencies may need `bash` adding too.

Ian.

--- /usr/lib/git-core/git-subtree~      2025-06-22 12:21:11.000000000 +0100
+++ /usr/lib/git-core/git-subtree       2025-11-04 18:51:01.948281050 +0000
@@ -1,10 +1,12 @@
-#!/bin/sh
+#!/bin/bash
 #
 # git-subtree.sh: split/join git repositories in subdirectories of this one
 #
 # Copyright (C) 2009 Avery Pennarun <[email protected]>
 #
 
+ulimit -s hard
+
 if test -z "$GIT_EXEC_PATH" || ! test -f "$GIT_EXEC_PATH/git-sh-setup" || {
        test "${PATH#"${GIT_EXEC_PATH}:"}" = "$PATH" &&
        test ! "$GIT_EXEC_PATH" -ef "${PATH%%:*}" 2>/dev/null

-- 
Ian Jackson <[email protected]>   These opinions are my own.  

Pronouns: they/he.  If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.

Reply via email to