Skip to content

Commit 9b5a8c2

Browse files
committed
git-synchronizer: disallow blowing away all the branches
In case a server died (such as pacific.mpi-cbg.de) and the IP is changed for a name and a new repository is set up, that new repository should not mean that all the branches should be deleted (just because there was a previous record of branches and now the remote repository is empty). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c603422 commit 9b5a8c2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

git-synchronizer.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ url2remotename () {
2828

2929
nullsha1=0000000000000000000000000000000000000000
3030
find_deleted () {
31+
test -n "$2" || return
3132
printf '%s\n%s\n%s\n' "$1" "$2" "$2" |
3233
sort -k 3 |
3334
uniq -u -f 2 |

0 commit comments

Comments
 (0)