From: Ian Campbell <ijc@hellion.org.uk>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Ian Campbell <ijc@hellion.org.uk>
Subject: [PATCH v2 2/4] filter-branch: reset $GIT_* before cleaning up
Date: Sun, 17 Sep 2017 08:36:55 +0100 [thread overview]
Message-ID: <20170917073657.31193-2-ijc@hellion.org.uk> (raw)
In-Reply-To: <1505633797.22447.4.camel@hellion.org.uk>
This is pure code motion to enable a subsequent patch to add code which needs
to happen with the reset $GIT_* but before the temporary directory has been
cleaned up.
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
git-filter-branch.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 05645064a..e15c538f6 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -544,11 +544,6 @@ if [ "$filter_tag_name" ]; then
done
fi
-cd "$orig_dir"
-rm -rf "$tempdir"
-
-trap - 0
-
unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE
test -z "$ORIG_GIT_DIR" || {
GIT_DIR="$ORIG_GIT_DIR" && export GIT_DIR
@@ -562,6 +557,11 @@ test -z "$ORIG_GIT_INDEX_FILE" || {
export GIT_INDEX_FILE
}
+cd "$orig_dir"
+rm -rf "$tempdir"
+
+trap - 0
+
if [ "$(is_bare_repository)" = false ]; then
git read-tree -u -m HEAD || exit
fi
--
2.11.0
next prev parent reply other threads:[~2017-09-17 8:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 7:36 [PATCH v2 0/4] filter-branch: support for incremental update + fix for ancient tag format Ian Campbell
2017-09-17 7:36 ` [PATCH v2 1/4] mktag: add option which allows the tagger field to be omitted Ian Campbell
2017-09-19 3:01 ` Junio C Hamano
2017-09-19 6:42 ` Ian Campbell
2017-09-17 7:36 ` Ian Campbell [this message]
2017-09-17 7:36 ` [PATCH v2 3/4] filter-branch: preserve and restore $GIT_AUTHOR_* and $GIT_COMMITTER_* Ian Campbell
2017-09-17 7:36 ` [PATCH v2 4/4] Subject: filter-branch: stash away ref map in a branch Ian Campbell
2017-09-17 9:43 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170917073657.31193-2-ijc@hellion.org.uk \
--to=ijc@hellion.org.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.