[123980] trunk/base/src/port1.0/portfetch.tcl
larryv at macports.org
larryv at macports.org
Sat Aug 16 20:53:39 PDT 2014
Revision: 123980
https://trac.macports.org/changeset/123980
Author: larryv at macports.org
Date: 2014-08-16 20:53:39 -0700 (Sat, 16 Aug 2014)
Log Message:
-----------
gitfetch: Use string comparison instead of testing length.
Modified Paths:
--------------
trunk/base/src/port1.0/portfetch.tcl
Modified: trunk/base/src/port1.0/portfetch.tcl
===================================================================
--- trunk/base/src/port1.0/portfetch.tcl 2014-08-17 03:50:13 UTC (rev 123979)
+++ trunk/base/src/port1.0/portfetch.tcl 2014-08-17 03:53:39 UTC (rev 123980)
@@ -428,7 +428,7 @@
git.url git.branch git.sha1 git.cmd
set options "-q"
- if {[string length ${git.branch}] == 0} {
+ if {${git.branch} eq ""} {
# if we're just using HEAD, we can make a shallow repo
set options "$options --depth=1"
}
@@ -438,7 +438,7 @@
return -code error [msgcat::mc "Git clone failed"]
}
- if {[string length ${git.branch}] > 0} {
+ if {${git.branch} ne ""} {
set env "GIT_DIR=${worksrcpath}/.git GIT_WORK_TREE=${worksrcpath}"
set cmdstring "$env ${git.cmd} checkout -q ${git.branch} 2>&1"
ui_debug "Executing $cmdstring"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140816/c07a6c36/attachment.html>
More information about the macports-changes
mailing list