[85941] trunk/dports/devel/git-core
jeremyhu at macports.org
jeremyhu at macports.org
Mon Oct 17 15:13:58 PDT 2011
Revision: 85941
http://trac.macports.org/changeset/85941
Author: jeremyhu at macports.org
Date: 2011-10-17 15:13:58 -0700 (Mon, 17 Oct 2011)
Log Message:
-----------
git-core: Fix a recent git regression when adding paths that already contain a .git directory
Modified Paths:
--------------
trunk/dports/devel/git-core/Portfile
trunk/dports/devel/git-core/files/patch-Makefile.diff
Added Paths:
-----------
trunk/dports/devel/git-core/files/0001-setup-Do-not-strip-trailing-from-paths.patch
Modified: trunk/dports/devel/git-core/Portfile
===================================================================
--- trunk/dports/devel/git-core/Portfile 2011-10-17 22:13:12 UTC (rev 85940)
+++ trunk/dports/devel/git-core/Portfile 2011-10-17 22:13:58 UTC (rev 85941)
@@ -5,6 +5,7 @@
name git-core
version 1.7.7
+revision 1
description A fast version control system
long_description Git is a fast, scalable, distributed open source version \
control system focusing on speed and efficiency.
@@ -36,7 +37,8 @@
port:expat \
port:libiconv
-patchfiles patch-Makefile.diff
+patchfiles patch-Makefile.diff 0001-setup-Do-not-strip-trailing-from-paths.patch
+patch.pre_args -p1
extract.only git-${version}${extract.suffix} \
git-manpages-${version}${extract.suffix}
Added: trunk/dports/devel/git-core/files/0001-setup-Do-not-strip-trailing-from-paths.patch
===================================================================
--- trunk/dports/devel/git-core/files/0001-setup-Do-not-strip-trailing-from-paths.patch (rev 0)
+++ trunk/dports/devel/git-core/files/0001-setup-Do-not-strip-trailing-from-paths.patch 2011-10-17 22:13:58 UTC (rev 85941)
@@ -0,0 +1,43 @@
+From 76c6800f47dabff89e6aee32c90d6064324868a9 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Tue, 11 Oct 2011 00:33:35 -0700
+Subject: [PATCH] setup: Do not strip trailing / from paths
+
+real_path will strip the trailing / from provided paths. This fixes
+a regression introduced in 18e051a3981f38db08521bb61ccf7e4571335353
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+
+Patch sent upstream via email on 10/11/2011 to
+carenas at sajinet.com.pe gitster at pobox.com
+
+<rdar://problem/10238070>
+
+ setup.c | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+diff --git a/setup.c b/setup.c
+index 61c22e6..e3a8ae3 100644
+--- a/setup.c
++++ b/setup.c
+@@ -10,8 +10,16 @@ char *prefix_path(const char *prefix, int len, const char *path)
+ char *sanitized;
+ if (is_absolute_path(orig)) {
+ const char *temp = real_path(path);
+- sanitized = xmalloc(len + strlen(temp) + 1);
++ sanitized = xmalloc(len + strlen(temp) + 2);
+ strcpy(sanitized, temp);
++
++ temp = strrchr(path, '\0');
++ temp--;
++ if (*temp == '/') {
++ char *s = strrchr(sanitized, '\0');
++ s[0] = '/';
++ s[1] = '\0';
++ }
+ } else {
+ sanitized = xmalloc(len + strlen(path) + 1);
+ if (len)
+--
+1.7.6.1
Modified: trunk/dports/devel/git-core/files/patch-Makefile.diff
===================================================================
--- trunk/dports/devel/git-core/files/patch-Makefile.diff 2011-10-17 22:13:12 UTC (rev 85940)
+++ trunk/dports/devel/git-core/files/patch-Makefile.diff 2011-10-17 22:13:58 UTC (rev 85941)
@@ -1,5 +1,5 @@
---- Makefile.orig 2011-09-02 21:46:23.000000000 -0400
-+++ Makefile 2011-09-02 21:46:23.000000000 -0400
+--- a/Makefile.orig 2011-09-02 21:46:23.000000000 -0400
++++ b/Makefile 2011-09-02 21:46:23.000000000 -0400
@@ -306,7 +306,7 @@
sharedir = $(prefix)/share
gitwebdir = $(sharedir)/gitweb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111017/2554593d/attachment-0001.html>
More information about the macports-changes
mailing list