Skip to content

Commit 5c58080

Browse files
committed
Fix cleanup of cleanup list
1 parent 8b15a43 commit 5c58080

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

git-fmt-diff

+2-4
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ pat_list_to_case () {
6565

6666
rm_list__push () {
6767
[ "$gf_debug" -eq 2 ] && return
68-
if [ -z "$g_rm_list" ]; then
69-
g_rm_list="$(mktemp)"
70-
rm_list__push "$g_rm_list"
71-
fi
7268
for f in "$@"; do
7369
echo "$f" >> "$g_rm_list"
7470
done
@@ -559,7 +555,9 @@ repo_root="$(git rev-parse --show-toplevel 2> /dev/null)"
559555
# setup env {{{2
560556
TMPDIR="${TMPDIR:-/tmp}"/git-"$gc_prog_name"
561557
mkdir -p "$TMPDIR"
558+
g_rm_list="$(mktemp)"
562559
rm_list__push "$TMPDIR"
560+
rm_list__push "$g_rm_list"
563561

564562
trap 'cleanup' EXIT
565563
# }}}2

0 commit comments

Comments
 (0)