[csw-devel] SF.net SVN: gar:[6788] csw/mgar/pkg/git/trunk
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Thu Oct 8 19:34:28 CEST 2009
Revision: 6788
http://gar.svn.sourceforge.net/gar/?rev=6788&view=rev
Author: bdwalton
Date: 2009-10-08 17:34:28 +0000 (Thu, 08 Oct 2009)
Log Message:
-----------
git: add patch to stop segfault in ls-files
Modified Paths:
--------------
csw/mgar/pkg/git/trunk/Makefile
csw/mgar/pkg/git/trunk/checksums
Added Paths:
-----------
csw/mgar/pkg/git/trunk/files/0001-ls-files-make-option-parser-keep-argv-0.patch
Modified: csw/mgar/pkg/git/trunk/Makefile
===================================================================
--- csw/mgar/pkg/git/trunk/Makefile 2009-10-08 16:05:38 UTC (rev 6787)
+++ csw/mgar/pkg/git/trunk/Makefile 2009-10-08 17:34:28 UTC (rev 6788)
@@ -4,7 +4,7 @@
CATEGORIES = devel
# disable tests until next version bump (at the top so it stands out)
-TEST_SCRIPTS =
+#TEST_SCRIPTS =
PACKAGES = CSWgit CSWgitk CSWgitgui CSWgitsvn CSWgitcvs CSWgitemacs CSWgitdoc
PACKAGES += CSWgitcompletion CSWgitdevel
@@ -87,6 +87,7 @@
GIT_TREEISH_git.git = v$(GARVERSION)$(if $(PATCHLEVEL),-$(PATCHLEVEL))
DISTFILES = CSWgit.postinstall
+PATCHFILES = 0001-ls-files-make-option-parser-keep-argv-0.patch
fdirs = $(bindir_install) $(mandir) $(libexecdir_install)
define _git_files
Modified: csw/mgar/pkg/git/trunk/checksums
===================================================================
--- csw/mgar/pkg/git/trunk/checksums 2009-10-08 16:05:38 UTC (rev 6787)
+++ csw/mgar/pkg/git/trunk/checksums 2009-10-08 17:34:28 UTC (rev 6788)
@@ -1 +1,2 @@
+286ebdc4e98afca87750145775cbe918 download/0001-ls-files-make-option-parser-keep-argv-0.patch
0f3606cd6720f525e7261cea87c11a61 download/CSWgit.postinstall
Added: csw/mgar/pkg/git/trunk/files/0001-ls-files-make-option-parser-keep-argv-0.patch
===================================================================
--- csw/mgar/pkg/git/trunk/files/0001-ls-files-make-option-parser-keep-argv-0.patch (rev 0)
+++ csw/mgar/pkg/git/trunk/files/0001-ls-files-make-option-parser-keep-argv-0.patch 2009-10-08 17:34:28 UTC (rev 6788)
@@ -0,0 +1,42 @@
+From a613b30af3b8a74e8b2d8f5f9910564fb44bf59d Mon Sep 17 00:00:00 2001
+From: Ben Walton <bwalton at artsci.utoronto.ca>
+Date: Wed, 7 Oct 2009 16:25:38 -0400
+Subject: [PATCH] ls-files: make option parser keep argv[0]
+
+The ls-files built-in was not asking the option parser to maintain
+argv[0]. This led to the possibility of fprintf(stderr, "...", NULL).
+On Solaris, this was causing a segfault. On glibc systems, printed
+error messages didn't contain proper strings, but rather, "(null)":...
+
+A trigger for this bug was: `git ls-files -i`
+
+Signed-off-by: Ben Walton <bwalton at artsci.utoronto.ca>
+---
+ builtin-ls-files.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/builtin-ls-files.c b/builtin-ls-files.c
+index f473220..9a3705a 100644
+--- a/builtin-ls-files.c
++++ b/builtin-ls-files.c
+@@ -482,7 +482,7 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
+ git_config(git_default_config, NULL);
+
+ argc = parse_options(argc, argv, prefix, builtin_ls_files_options,
+- ls_files_usage, 0);
++ ls_files_usage, PARSE_OPT_KEEP_ARGV0);
+ if (show_tag || show_valid_bit) {
+ tag_cached = "H ";
+ tag_unmerged = "M ";
+@@ -505,7 +505,7 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
+ if (require_work_tree && !is_inside_work_tree())
+ setup_work_tree();
+
+- pathspec = get_pathspec(prefix, argv);
++ pathspec = get_pathspec(prefix, argv + 1);
+
+ /* be nice with submodule paths ending in a slash */
+ read_cache();
+--
+1.6.4.4
+
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