From cbb5de8b83f3abde8f9b37b0048bc00344b6709b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 27 Apr 2021 15:17:40 -0600 Subject: subtree: remove duplicate check `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 Signed-off-by: Junio C Hamano diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 0df8d1b..7fbd848 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -655,10 +655,6 @@ process_split_commit () { } cmd_add () { - if test -e "$dir" - then - die "'$dir' already exists. Cannot add." - fi ensure_clean -- cgit v0.10.2-6-g49f6