<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch vcs-fetch
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/5593e149164cd0b50d13f2e18cef2eba2a06cccd">https://github.com/macports/macports-base/commit/5593e149164cd0b50d13f2e18cef2eba2a06cccd</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/vcs-fetch by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 5593e14 Update git tarball instead of writing a new one
</span>5593e14 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 5593e149164cd0b50d13f2e18cef2eba2a06cccd
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Thu Nov 17 21:48:56 2016 +0100
<span style='display:block; white-space:pre;color:#404040;'> Update git tarball instead of writing a new one
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The archive tarball created by git has a pax header comment referencing
</span><span style='display:block; white-space:pre;color:#404040;'> the sha1 of the commit it was created for (see `git get-tar-commit-id`).
</span><span style='display:block; white-space:pre;color:#404040;'> This would be lost when moving everything to a new tarball. In the rare
</span><span style='display:block; white-space:pre;color:#404040;'> case that the submodule command did not actually create any new tarball
</span><span style='display:block; white-space:pre;color:#404040;'> content, this will now leave the original git tarball unmodified.
</span>---
src/port1.0/portfetch.tcl | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portfetch.tcl b/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 93927cc..659ecdc 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portfetch.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -527,7 +527,6 @@ proc portfetch::gitfetch {args} {
</span> set xz [findBinary xz ${portutil::autoconf::xz_path}]
# TODO: add dependency on libarchive, if /usr/bin/tar is not bsdtar
set tar [findBinary bsdtar tar]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set tartmp [join [list [mktemp "/tmp/macports.portfetch.${name}.XXXXXXXX"] ".tar"] ""]
</span> # determine tmppath again in shell, as the real path might be different
# due to symlinks (/tmp vs. /private/tmp), pass it as MPTOPDIR in
# environment
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -535,12 +534,10 @@ proc portfetch::gitfetch {args} {
</span> "MPTOPDIR=\$PWD " \
"${git.cmd} submodule -q foreach --recursive '" \
"${git.cmd} archive --format=tar --prefix=\"${git.file_prefix}/\${PWD#\$MPTOPDIR/}/\" \$sha1 " \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- "| tar -cf ${tartmp} @- @${tardst} " \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "&& mv ${tartmp} ${tardst}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "| tar -uf ${tardst} @-" \
</span> "' 2>&1"] ""]
if {[catch {system -W $tmppath $cmdstring} result]} {
delete $tardst
<span style='display:block; white-space:pre;background:#ffe0e0;'>- delete $tartmp
</span> return -code error [msgcat::mc "Git submodule archive creation failed"]
}
}
</pre><pre style='margin:0'>
</pre>