[111086] trunk/base/src/macports1.0/macports.tcl
ecronin at macports.org
ecronin at macports.org
Sat Sep 14 07:17:22 PDT 2013
Revision: 111086
https://trac.macports.org/changeset/111086
Author: ecronin at macports.org
Date: 2013-09-14 07:17:22 -0700 (Sat, 14 Sep 2013)
Log Message:
-----------
Support ${portdir} not being top level git checkout
Ticket #27485
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2013-09-14 12:15:05 UTC (rev 111085)
+++ trunk/base/src/macports1.0/macports.tcl 2013-09-14 14:17:22 UTC (rev 111086)
@@ -2290,14 +2290,14 @@
incr numfailed
continue
}
- } elseif {$git_cmd ne {} && [file exists ${portdir}/.git]} {
+ } elseif {$git_cmd ne {} && ![catch {exec sh -c "cd ${portdir} && $git_cmd rev-parse --is-inside-work-tree"} result]} {
# determine what type of git repository this is
- if {![catch {exec sh -c "$git_cmd --git-dir=${portdir}/.git config --local --get svn-remote.svn.url"} result]} {
+ if {![catch {exec sh -c "cd ${portdir} && $git_cmd config --local --get svn-remote.svn.url"} result]} {
set git_action "svn rebase"
} else {
set git_action "pull --rebase"
}
- set git_commandline "$git_cmd --git-dir=${portdir}/.git --work-tree=${portdir} $git_action"
+ set git_commandline "pushd $portdir ; $git_cmd $git_action ; popd"
ui_debug $git_commandline
if {
[catch {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130914/47ab0f49/attachment.html>
More information about the macports-changes
mailing list