Reduce indent on the happy day scenario. Update error logging while at
it.
Signed-off-by: Jani Nikula <[email protected]>
---
dim | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dim b/dim
index 8e782eecff70..b227f0db99dc 100755
--- a/dim
+++ b/dim
@@ -1892,16 +1892,16 @@ function dim_tag_branch
git fetch $remote
- if [ $(git rev-parse $branch) == $(git rev-parse "$branch@{u}") ] ; then
- echo "Tagging current $branch"
-
- tag=$(tag_name "$branch")
- tag_branch $tag $branch
- git push $DRY_RUN $remote $tag
- else
- echo "$branch not up-to-date, aborting"
- exit
+ if [ $(git rev-parse $branch) != $(git rev-parse "$branch@{u}") ]; then
+ echoerr "ERROR: $branch not up-to-date"
+ return 1
fi
+
+ echo "Tagging current $branch"
+
+ tag=$(tag_name "$branch")
+ tag_branch $tag $branch
+ git push $DRY_RUN $remote $tag
}
function dim_tag_next
--
2.11.0
_______________________________________________
dim-tools mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dim-tools