Skip to content

Commit 248d686

Browse files
committed
gerrit-push-for: Say whether we are going to push regular changes or drafts
1 parent 7d19a34 commit 248d686

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

gerrit/gerrit-push-for.sh

+9-2
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,18 @@ fi
7474
topic=$(git rev-parse --abbrev-ref $ref)
7575
topic=${topic#gerrit/}
7676
topic=${topic#${USER-$USERNAME}/}
77+
78+
if [[ "$refname" == "drafts" ]]; then
79+
entity="draft(s)"
80+
else
81+
entity="change(s)"
82+
fi
83+
7784
if [[ "$topic" != "" && "$topic" != "HEAD" && "$topic" != "$target" ]]; then
78-
echo "Going to push $revcount \"$topic\" commit(s) for \"$remote/$target\"."
85+
echo "Going to push $revcount \"$topic\" $entity for \"$remote/$target\"."
7986
options="%topic=$topic"
8087
else
81-
echo "Going to push $revcount commit(s) for \"$remote/$target\"."
88+
echo "Going to push $revcount $entity for \"$remote/$target\"."
8289
fi
8390

8491
if [ $skip -eq 0 ]; then

0 commit comments

Comments
 (0)