[csw-devel] SF.net SVN: gar:[17660] csw/mgar/pkg/git/trunk/files/ 0009-Avoid-bug-in-Solaris-xpg4-sed-as-used-in-submodule.patch
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Sat Apr 14 04:09:08 CEST 2012
Revision: 17660
http://gar.svn.sourceforge.net/gar/?rev=17660&view=rev
Author: bdwalton
Date: 2012-04-14 02:09:08 +0000 (Sat, 14 Apr 2012)
Log Message:
-----------
git/trunk: another update to the sed workaround patch
Modified Paths:
--------------
csw/mgar/pkg/git/trunk/files/0009-Avoid-bug-in-Solaris-xpg4-sed-as-used-in-submodule.patch
Modified: csw/mgar/pkg/git/trunk/files/0009-Avoid-bug-in-Solaris-xpg4-sed-as-used-in-submodule.patch
===================================================================
--- csw/mgar/pkg/git/trunk/files/0009-Avoid-bug-in-Solaris-xpg4-sed-as-used-in-submodule.patch 2012-04-13 20:39:18 UTC (rev 17659)
+++ csw/mgar/pkg/git/trunk/files/0009-Avoid-bug-in-Solaris-xpg4-sed-as-used-in-submodule.patch 2012-04-14 02:09:08 UTC (rev 17660)
@@ -1,6 +1,6 @@
-From 3be2e5008274f5710b61d2ac4efc35eeab014ac6 Mon Sep 17 00:00:00 2001
-From: Ben Walton <bwalton at opencsw.org>
-Date: Tue, 10 Apr 2012 01:47:04 +0200
+From 7f273d2cfb16def4be2eb4110bfa9f30973c38da Mon Sep 17 00:00:00 2001
+From: Ben Walton <bwalton at artsci.utoronto.ca>
+Date: Wed, 11 Apr 2012 22:22:24 +0200
Subject: [PATCH] Avoid bug in Solaris xpg4/sed as used in submodule
The sed provided by Solaris in /usr/xpg4/bin has a bug whereby an
@@ -21,9 +21,9 @@
default SANE_TOOL_PATH for Solaris. It led to paths such as
..../.. being used in the submodule .git gitdir reference.
-As we do not need to handle fully qualfieid paths we can make the
-regex match 1 or more instead of 0 or more non-/ characters so use
-'s|[^/]\{1,\}|..|g' instead, which is correctly handled by all tested
+As we do not need to handle fully qualfied paths we can make the regex
+match 1 or more instead of 0 or more non-/ characters so use
+'s|[^/][^/]*|..|g' instead, which is correctly handled by all tested
sed implementations. This expression is semantically different than
the original one. It will not place leading '..' on a fully qualified
path as the original expression did. None of the paths passed to the
@@ -32,24 +32,23 @@
Signed-off-by: Ben Walton <bwalton at artsci.utoronto.ca>
---
- git-submodule.sh | 5 +++--
- 1 files changed, 3 insertions(+), 2 deletions(-)
+ git-submodule.sh | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
-index efc86ad..2c18e0c 100755
+index efc86ad..7aa9e95 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
-@@ -167,10 +167,11 @@ module_clone()
+@@ -167,10 +167,10 @@ module_clone()
a=${a%/}
b=${b%/}
- rel=$(echo $b | sed -e 's|[^/]*|..|g')
-+ # Turn path components into ..
-+ rel=$(echo $b | sed -e 's|[^/]\{1,\}|..|g')
++ rel=$(echo $b | sed -e 's|[^/][^/]*|..|g')
echo "gitdir: $rel/$a" >"$path/.git"
- rel=$(echo $a | sed -e 's|[^/]*|..|g')
-+ rel=$(echo $a | sed -e 's|[^/]\{1,\}|..|g')
++ rel=$(echo $a | sed -e 's|[^/][^/]*|..|g')
(clear_local_git_env; cd "$path" && GIT_WORK_TREE=. git config core.worktree "$rel/$b")
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list