f5f0842d0b
When a user deleted an enlistment manually, let's be generous and _still_ unregister it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
33 lines
775 B
Bash
Executable File
33 lines
775 B
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description='test the `scalar` command'
|
|
|
|
TEST_DIRECTORY=$PWD/../../../t
|
|
export TEST_DIRECTORY
|
|
|
|
# Make it work with --no-bin-wrappers
|
|
PATH=$PWD/..:$PATH
|
|
|
|
. ../../../t/test-lib.sh
|
|
|
|
test_expect_success 'scalar shows a usage' '
|
|
test_expect_code 129 scalar -h
|
|
'
|
|
|
|
test_expect_success 'scalar unregister' '
|
|
git init vanish/src &&
|
|
scalar register vanish/src &&
|
|
git config --get --global --fixed-value \
|
|
maintenance.repo "$(pwd)/vanish/src" &&
|
|
scalar list >scalar.repos &&
|
|
grep -F "$(pwd)/vanish/src" scalar.repos &&
|
|
rm -rf vanish/src/.git &&
|
|
scalar unregister vanish &&
|
|
test_must_fail git config --get --global --fixed-value \
|
|
maintenance.repo "$(pwd)/vanish/src" &&
|
|
scalar list >scalar.repos &&
|
|
! grep -F "$(pwd)/vanish/src" scalar.repos
|
|
'
|
|
|
|
test_done
|