diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-12 13:32:11 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-07-12 13:44:16 +0100 |
commit | c6d53e75432183e55ed0144465101968ea01511f (patch) | |
tree | c2fa79a95b0ba744d35a2cf98bfeafa2b70cdbd5 | |
parent | 0871c116c21e7f91f5ec5a0810daca1eeba21dd5 (diff) |
test suite: Introduce playtree-save-refs
Arranges for all the refs in each playtree to be saved in the parent's
ref namespace.
This is going to be used when running git-gc when saving artifacts.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-x | tests/playtree-save-refs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/playtree-save-refs b/tests/playtree-save-refs new file mode 100755 index 0000000..7841367 --- /dev/null +++ b/tests/playtree-save-refs @@ -0,0 +1,9 @@ +#!/bin/bash +set -e +set -o pipefail +find -name .git -type d -exec sh -xec ' + cd "$1" + git for-each-ref \ + --format='\''update refs/dgit-test-keep/g%(objectname) %(objectname)'\'' \ +' x "{}" \; | \ + sort -u | git update-ref --stdin |