diff options
author | Luciano Rocha <luciano@eurotux.com> | 2008-05-28 20:53:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-29 03:31:19 +0200 |
commit | 74d3b23fe3771c769ccd5c97f6a46682b4061577 (patch) | |
tree | 3c43256733366887751ad07cbc8ea40a2d53e546 /t | |
parent | "git checkout -- paths..." should error out when paths cannot be written (diff) | |
download | git-74d3b23fe3771c769ccd5c97f6a46682b4061577.tar.xz git-74d3b23fe3771c769ccd5c97f6a46682b4061577.zip |
git-init: accept --bare option
It is unfortunate that "git init --bare" does not work and the only reason
why "init" did not learn its own "--bare" option is because "git --bare
init" already does the job (and as an option to the git 'potty', it is
more generic solution).
This teaches "git init" its own "--bare" option, so that both "git --bare init"
and "git init --bare" works mostly the same way.
[jc: rewrote the log message and added test]
Signed-off-by: Luciano Rocha <strange@nsk.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t0001-init.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index b0289e397a..d31887f9bf 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -79,6 +79,17 @@ test_expect_success 'GIT_DIR bare' ' check_config git-dir-bare.git true unset ' +test_expect_success 'init --bare' ' + + ( + unset GIT_DIR GIT_WORK_TREE GIT_CONFIG + mkdir git-init-bare.git && + cd git-init-bare.git && + git init --bare + ) && + check_config git-init-bare.git true unset +' + test_expect_success 'GIT_DIR non-bare' ' ( |