summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2022-01-02 01:41:23 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2022-01-02 01:47:52 +0000
commit563fc6ffd17055097035f7f3990a4657a73e040c (patch)
tree99742e0e4ed95473163cbb56e78898ae066f9ae7 /tests
parent7b2f107a56a0172690ca45d9013f0ea78d66c596 (diff)
tests/update-db-compat: Some more refactoring
Break out git_filter_strip_origs. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/update-dh-compat10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/update-dh-compat b/tests/update-dh-compat
index 9620e5e..f327b6e 100755
--- a/tests/update-dh-compat
+++ b/tests/update-dh-compat
@@ -35,6 +35,12 @@ cd_fresh_d () {
adjust="$toplevel"/tests/update-dh-compat-adjust
adjust () { "$adjust"; }
+git_filter_strip_origs () {
+ git for-each-ref refs/original \
+ --format '%(refname)' |
+ xargs -rn1 git update-ref -d
+}
+
adjust_git_filter () {
# this is the dgit origin commit; this check may stop
# us rewriting our normal dgit tree
@@ -49,9 +55,7 @@ adjust_git_filter () {
--tag-name-filter cat \
-- --all
- git for-each-ref refs/original \
- --format '%(refname)' |
- xargs -rn1 git update-ref -d
+ git_filter_strip_origs
}
cd "$toplevel"