]> git.ipfire.org Git - thirdparty/git.git/commitdiff
subtree: remove duplicate check
authorLuke Shumaker <lukeshu@datawire.io>
Tue, 27 Apr 2021 21:17:40 +0000 (15:17 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Apr 2021 07:47:18 +0000 (16:47 +0900)
`cmd_add` starts with a check that the directory doesn't yet exist.
However, the `main` function performs the exact same check before
calling `cmd_add`.  So remove the check from `cmd_add`.

Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree/git-subtree.sh

index 0df8d1b7d439a4dfab6ac9b496de51ae7c4b64b8..7fbd8481ed252fd86024e96c96e88427446dac62 100755 (executable)
@@ -655,10 +655,6 @@ process_split_commit () {
 }
 
 cmd_add () {
-       if test -e "$dir"
-       then
-               die "'$dir' already exists.  Cannot add."
-       fi
 
        ensure_clean