Skip to content

Commit

Permalink
Update previous commit: short-circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Garrett committed Apr 26, 2015
1 parent 860c1a0 commit 378b1eb
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions git-stree
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,17 @@ function error
# Command: `git stree forget`
function forget_subtrees
{
if [ -z "${args[1]}" ]; then
for name in $(get_subtree_list simple); do
rm_subtree "$name" && discreet "• Removed subtree '$name'"
done
yay 'Successfully removed all subtree definitions.'
else
error false "This is not the command you're looking for.
git stree forget removes all subtrees defined for this repository.
You specified a specific subtree ($1) on the command line,
so you probably want: git stree rm $1
"
if [ -n "${args[1]}" ]; then
error false "This is not the command you're looking for.
git stree forget removes all subtrees defined for this repository.
You specified a specific subtree ($1) on the command line,
so you probably want: git stree rm $1
"
fi
for name in $(get_subtree_list simple); do
rm_subtree "$name" && discreet "• Removed subtree '$name'"
done
yay 'Successfully removed all subtree definitions.'
}

# Helper: computes a backport branch name based on the passed CLI name.
Expand Down

0 comments on commit 378b1eb

Please sign in to comment.