diff options
author | Karel Kočí <cynerd@email.cz> | 2020-04-24 07:28:51 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2020-04-24 07:28:51 +0200 |
commit | 704be815c7f19d29faa7478cad0dd5847850027b (patch) | |
tree | fe08fe7354b26ce6d3f21475ef51049fc1279d9e /shellrc.d | |
parent | e0949a2d329b434999fdb285c2461ad880c7f337 (diff) | |
download | shellrc-704be815c7f19d29faa7478cad0dd5847850027b.tar.gz shellrc-704be815c7f19d29faa7478cad0dd5847850027b.tar.bz2 shellrc-704be815c7f19d29faa7478cad0dd5847850027b.zip |
shellrc.d/git: do not remove root directory with gitbmergev0.7.6
Diffstat (limited to 'shellrc.d')
-rw-r--r-- | shellrc.d/git | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shellrc.d/git b/shellrc.d/git index 1c1de0a..a662cb0 100644 --- a/shellrc.d/git +++ b/shellrc.d/git @@ -19,6 +19,10 @@ gitbmerge() ( local wt wt="$(_gitbworktree "$1")" if [ -n "$wt" ]; then + if [ -d "$wd/.git" ]; then + echo "Branch is checked out in root repository!" + return 1 + fi rm -r "$wt" git worktree prune fi |