@@ -66,25 +66,25 @@ set_ident () {
6666 h
6767 s/^' $lid ' \([^<]*\) <[^>]*> .*$/\1/
6868 s/' \' ' /' \' ' \' \'\' ' /g
69- s/.*/export GIT_' $uid ' _NAME=' \' ' &' \' ' /p
69+ s/.*/GIT_' $uid ' _NAME=' \' ' &' \' ' ; export GIT_ ' $uid ' _NAME /p
7070
7171 g
7272 s/^' $lid ' [^<]* <\([^>]*\)> .*$/\1/
7373 s/' \' ' /' \' ' \' \'\' ' /g
74- s/.*/export GIT_' $uid ' _EMAIL=' \' ' &' \' ' /p
74+ s/.*/GIT_' $uid ' _EMAIL=' \' ' &' \' ' ; export GIT_ ' $uid ' _EMAIL /p
7575
7676 g
7777 s/^' $lid ' [^<]* <[^>]*> \(.*\)$/\1/
7878 s/' \' ' /' \' ' \' \'\' ' /g
79- s/.*/export GIT_' $uid ' _DATE=' \' ' &' \' ' /p
79+ s/.*/GIT_' $uid ' _DATE=' \' ' &' \' ' ; export GIT_ ' $uid ' _DATE /p
8080
8181 q
8282 }
8383 '
8484
8585 LANG=C LC_ALL=C sed -ne " $pick_id_script "
8686 # Ensure non-empty id name.
87- echo " [ -n \"\$ GIT_${uid} _NAME\" ] || export GIT_${uid} _NAME=\"\$ {GIT_${uid} _EMAIL%%@*}\" "
87+ echo " case \"\$ GIT_${uid} _NAME\" in \"\" ) GIT_${uid} _NAME=\"\$ {GIT_${uid} _EMAIL%%@*}\" && export GIT_ ${uid} _NAME;; esac "
8888}
8989
9090USAGE=" [--env-filter <command>] [--tree-filter <command>] \
@@ -206,7 +206,8 @@ done < "$tempdir"/backup-refs
206206ORIG_GIT_DIR=" $GIT_DIR "
207207ORIG_GIT_WORK_TREE=" $GIT_WORK_TREE "
208208ORIG_GIT_INDEX_FILE=" $GIT_INDEX_FILE "
209- export GIT_DIR GIT_WORK_TREE=.
209+ GIT_WORK_TREE=.
210+ export GIT_DIR GIT_WORK_TREE
210211
211212# These refs should be updated if their heads were rewritten
212213
@@ -231,7 +232,8 @@ done > "$tempdir"/heads
231232test -s " $tempdir " /heads ||
232233 die " Which ref do you want to rewrite?"
233234
234- export GIT_INDEX_FILE=" $( pwd) /../index"
235+ GIT_INDEX_FILE=" $( pwd) /../index"
236+ export GIT_INDEX_FILE
235237git read-tree || die " Could not seed the index"
236238
237239ret=0
@@ -267,7 +269,8 @@ while read commit parents; do
267269 git read-tree -i -m $commit :" $filter_subdir "
268270 esac || die " Could not initialize the index"
269271
270- export GIT_COMMIT=$commit
272+ GIT_COMMIT=$commit
273+ export GIT_COMMIT
271274 git cat-file commit " $commit " > ../commit ||
272275 die " Cannot read commit $commit "
273276
@@ -401,7 +404,8 @@ if [ "$filter_tag_name" ]; then
401404
402405 [ -f " ../map/$sha1 " ] || continue
403406 new_sha1=" $( cat " ../map/$sha1 " ) "
404- export GIT_COMMIT=" $sha1 "
407+ GIT_COMMIT=" $sha1 "
408+ export GIT_COMMIT
405409 new_ref=" $( echo " $ref " | eval " $filter_tag_name " ) " ||
406410 die " tag name filter failed: $filter_tag_name "
407411
0 commit comments