summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-08-24 18:26:09 +0200
committerOswald Buddenhagen <oswald.buddenhagen@gmx.de>2020-02-28 12:08:59 +0000
commit33a631f5e0f83337d34fd00fd97a111e7f3789d9 (patch)
tree83abb2791d732e61bc1061093f134464dbef546f /bin
parent0aa9aeca053b1ee13137967aae037de5feae5962 (diff)
downloadqtrepotools-33a631f5e0f83337d34fd00fd97a111e7f3789d9.tar.gz
gpush: use undef to indicate $ref_to being unset
that's in line with everything else (with the consequence that it will simplify things later) and less confusing. Change-Id: I1d8586515c4dc2da6408c7f23a53eb119df96cc5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/git-gpush4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/git-gpush b/bin/git-gpush
index f0c23ea..a55a8ac 100755
--- a/bin/git-gpush
+++ b/bin/git-gpush
@@ -107,7 +107,7 @@ EOM
my $remote = "gerrit";
my $ref_from = "HEAD";
-my $ref_to = "";
+my $ref_to;
my @reviewers;
my @CCs;
@@ -259,7 +259,7 @@ sub determine_local_branch()
# branch has been specified.
sub determine_remote_branch()
{
- if ($ref_to eq "") {
+ if (!defined($ref_to)) {
fail("Cannot deduce source branch for $ref_from. Please use --branch.\n")
if (!defined($local_branch));
$ref_to = git_config("branch.$local_branch.merge");