git: update to 3.36.0 & rebase patches & use CYGWIN_CHOST

Removes git-1.9.0-manifest-msys2.patch as it is already applied upstream
as fe90397604f9f9695b3fa0b8b11d9f93533b655f

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
This commit is contained in:
Christopher Degawa 2022-04-28 19:19:02 -05:00
parent 37453b4f7c
commit 2ccaf50d3e
No known key found for this signature in database
GPG Key ID: 40BDA1D2A156699E
8 changed files with 60 additions and 318 deletions

View File

@ -1,6 +1,6 @@
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -136,7 +136,7 @@ GITGUI_SCRIPT := $$0
@@ -138,7 +138,7 @@ GITGUI_SCRIPT := $$0
GITGUI_RELATIVE :=
GITGUI_MACOSXAPP :=

View File

@ -2,7 +2,7 @@
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
pkgname=git
pkgver=2.35.3
pkgver=2.36.0
pkgrel=1
pkgdesc="The fast distributed version control system"
arch=('i686' 'x86_64')
@ -50,20 +50,18 @@ provides=('git-core')
#options=('debug' '!strip')
source=("${pkgname}-${pkgver}.tar.gz"::https://github.com/git/git/archive/v${pkgver}.tar.gz
1.7.9-cygwin.patch
git-1.9.0-manifest-msys2.patch
git-1.8.4-msys2.patch
git-2.3.5-mingw-pwd.patch
git-2.8.2-Cygwin-Allow-DOS-paths.patch
git-tcsh-completion-fixes.patch
git-2.35.1-git-gui.patch)
sha256sums=('acc6b83f1f019d712011432df88fc60f8cc84167ff80f86acadf49143f4ed078'
'e46e64081d1099d0c6835119e5e10cbcbee40df782dcbdee5d7bd2e26a74829e'
'fd993519beb407c9276f3b209a1139616140d36e575ae91e421fac9a38dcdd91'
'340d289f8a9d82975b34bd635e8c734c0c8529d5ac1ad9bbc8a77ed752502b02'
'887776d3e1319e673879b8a0c121d76a839163de13dbe1fec570c3737c6883ab'
'905e35e145be34f6affad830155a193d869da4898e46726f36cef2e89c073d23'
'b28b3e13de08911f027d19a557967fc21128318a8d6ca74b20b26ee997a9b992'
'b2b7a8e6128d3208116736c5fbf05cd293a08743e3be90ed0bc50c9f0e4c0433')
sha256sums=('59dbc158dce293798570166fe7acfe225514f2868bc2d6e25c1a5a00c4ac0888'
'32baa705d76789d82316a1325e61c9a261114eaa9814dca9c05683bf63069dea'
'9bc4da5022c5004c4c5b45417b25c6636ddf0ac338574a624c2c775d4394546d'
'336159815092f503e0254ebbbea2b637ffc09a36217c4c644167b86852568272'
'045e998cbd6d84dc454a879a94657ab3e43cd5a965fc5571e84910d0bd6fe178'
'6f25aae9e92469d5e284dcf372e15ee0e57ff91531e691e7391f9bfb78f73626'
'080533696ee3105f3f311a1dc6d8ebe7bf386262cc265d34ef7e9cc4353a736d')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
@ -80,7 +78,6 @@ prepare() {
rm -f compat/win32/git.manifest compat/win32/resource.rc
apply_patch_with_msg \
1.7.9-cygwin.patch \
git-1.9.0-manifest-msys2.patch \
git-1.8.4-msys2.patch \
git-2.3.5-mingw-pwd.patch \
git-2.8.2-Cygwin-Allow-DOS-paths.patch \
@ -91,14 +88,6 @@ prepare() {
apply_patch_with_msg \
git-2.35.1-git-gui.patch
local _arch=
if [ "${CARCH}" == 'x86_64' ]; then
_arch='amd64'
elif [ "${CARCH}" == 'i686' ]; then
_arch='x86'
fi
sed -e "s|@ARCH@|${_arch}|g" -i compat/win32/git.manifest
make configure
}
@ -106,8 +95,9 @@ build() {
export PYTHON_PATH='/usr/bin/python'
cd "${srcdir}/${pkgname}-${pkgver}"
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
./configure \
--build=${CHOST} \
--build=${CYGWIN_CHOST} \
--prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/lib \

View File

@ -1,7 +1,7 @@
--- git-1.8.4/config.mak.uname 2013-08-23 23:38:43.000000000 +0400
+++ git-1.8.4m/config.mak.uname 2013-08-25 21:04:59.876953200 +0400
@@ -174,6 +174,31 @@
COMPAT_OBJS += compat/cygwin.o
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -244,6 +244,31 @@ ifeq ($(uname_O),Cygwin)
COMPAT_OBJS += compat/win32/path-utils.o
FREAD_READS_DIRECTORIES = UnfortunatelyYes
endif
+ifeq ($(uname_O),Msys)
@ -31,27 +31,14 @@
+endif
ifeq ($(uname_S),FreeBSD)
NEEDS_LIBICONV = YesPlease
OLD_ICONV = YesPlease
diff -Naur git-1.8.3.1/contrib/completion/git-completion.bash git-1.8.3.1m/contrib/completion/git-completion.bash
--- git-1.8.4/contrib/completion/git-completion.bash 2013-06-10 20:01:55.000000000 +0000
+++ git-1.8.4m/contrib/completion/git-completion.bash 2013-06-13 11:35:14.541992200 +0000
@@ -2760,3 +2760,7 @@
if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
__git_complete git.exe __git_main
# Versions up to 10.1 require OLD_ICONV; 10.2 and beyond don't.
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -3589,3 +3589,7 @@ ___git_complete gitk __gitk_main
if [ "$OSTYPE" = cygwin ]; then
___git_complete git.exe __git_main
fi
+
+if [ Msys = "$(uname -o 2>/dev/null)" ]; then
+__git_complete git.exe __git_main
+if [ "$OSTYPE" = msys ]; then
+ ___git_complete git.exe __git_main
+fi
diff -Naur git-1.8.3.1/t/test-lib.sh git-1.8.3.1m/t/test-lib.sh
--- git-1.8.4/t/test-lib.sh 2013-06-10 20:01:55.000000000 +0000
+++ git-1.8.4m/t/test-lib.sh 2013-06-13 11:35:14.557617200 +0000
@@ -677,7 +677,7 @@
test_set_prereq NOT_CYGWIN
test_set_prereq SED_STRIPS_CR
;;
-*CYGWIN*)
+*CYGWIN* | *MSYS*)
test_set_prereq POSIXPERM
test_set_prereq EXECKEEPSPID
test_set_prereq NOT_MINGW

View File

@ -1,206 +0,0 @@
On Windows Vista, not having an application manifest with a
requestedExecutionLevel can cause several kinds of confusing behavior.
The first and more obvious is Installer Detection, where sometimes
Windows decides (by looking at things like the file name and even
sequences of bytes within the executable) that an executable is an
installer and should run elevated (causing the well-known popup dialog
to appear). On git, this happens for executables with names containing
"patch" or "update".
The second and more confusing is File Virtualization. With it, writes to
some files which should fail are instead redirected to somewhere else,
and reads to files might return different contents if a previous write
was redirected. Even more confusing, not all writes are redirected; I
recall reading somewhere that for instance writes to .exe files will
fail instead of redirecting.
Needless to say, git wants none of that. Not only that, but File
Virtualization has been blamed for dramatic slowdowns in git (see for
instance http://code.google.com/p/msysgit/issues/detail?id=320).
There are two ways to turn off these annoyances. Either you embed an
application manifest within all your executables, or you add an external
manifest (a file with the same name followed by .manifest) to all your
executables. Since for git some executables are copied (or hardlinked)
with several names, it is simpler and more robust to embed an internal
manifest.
A recent enough MSVC compiler should already embed a working internal
manifest, but for mingw you have to do so by hand.
Very lightly tested on Wine, where like on Windows XP it should not make
any difference.
References:
- New UAC Technologies for Windows Vista
http://msdn.microsoft.com/en-us/library/bb756960.aspx
- Create and Embed an Application Manifest (UAC)
http://msdn.microsoft.com/en-us/library/bb756929.aspx
Signed-off-by: Cesar Eduardo Barros <ces...@cesarb.net>
---
Makefile | 31 ++++++++++++++++++++++---------
compat/win32/git.manifest | 11 +++++++++++
compat/win32/resource.rc | 1 +
config.mak.uname | 4 ++++
4 files changed, 38 insertions(+), 9 deletions(-)
create mode 100644 compat/win32/git.manifest
create mode 100644 compat/win32/resource.rc
diff --git a/Makefile b/Makefile
index ddd1bdf..6ee4500 100644
--- a/Makefile
+++ b/Makefile
@@ -558,6 +558,7 @@ CURL_CONFIG = curl-config
GCOV = gcov
STRIP = strip
SPATCH = spatch
+WINDRES = windres
export TCL_PATH TCLTK_PATH
@@ -568,6 +569,7 @@ BUILTIN_OBJS =
BUILT_INS =
COMPAT_CFLAGS =
COMPAT_OBJS =
+RESOURCE_OBJS =
XDIFF_OBJS =
GENERATED_H =
EXTRA_CPPFLAGS =
@@ -1876,6 +1878,11 @@ ifdef OVERRIDE_STRDUP
COMPAT_OBJS += compat/strdup.o
endif
+ifdef APPLICATION_MANIFEST
+ # Cannot be in LIB_OBJS because it must always be linked in
+ RESOURCE_OBJS += compat/win32/resource.o
+endif
+
ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
export GIT_TEST_CMP_USE_COPIED_CONTEXT
endif
@@ -1971,6 +1978,7 @@ ifndef V
QUIET_XGETTEXT = @echo ' ' XGETTEXT $@;
QUIET_MSGFMT = @echo ' ' MSGFMT $@;
QUIET_GCOV = @echo ' ' GCOV $@;
+ QUIET_WINDRES = @echo ' ' RC $@;
QUIET_SP = @echo ' ' SP $<;
QUIET_HDR = @echo ' ' HDR $(<:hcc=h);
QUIET_RC = @echo ' ' RC $@;
@@ -2213,9 +2221,9 @@ git.sp git.s git.o: EXTRA_CPPFLAGS = \
'-DGIT_MAN_PATH="$(mandir_relative_SQ)"' \
'-DGIT_INFO_PATH="$(infodir_relative_SQ)"'
-git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS)
+git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(RESOURCE_OBJS) $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
- $(filter %.o,$^) $(LIBS)
+ $(filter %.o,$^) $(LIBS)
help.sp help.s help.o: command-list.h
builtin/bugreport.sp builtin/bugreport.s builtin/bugreport.o: hook-list.h
@@ -2607,17 +2615,17 @@ compat/nedmalloc/nedmalloc.sp compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
compat/nedmalloc/nedmalloc.sp: SP_EXTRA_FLAGS += -Wno-non-pointer-null
endif
-git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
+git-%$X: %.o $(RESOURCE_OBJS) GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
-git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) GIT-LDFLAGS $(GITLIBS)
+git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) $(RESOURCE_OBJS) GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(IMAP_SEND_LDFLAGS) $(LIBS)
-git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS)
+git-http-fetch$X: http.o http-walker.o http-fetch.o $(RESOURCE_OBJS) GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(CURL_LIBCURL) $(LIBS)
-git-http-push$X: http.o http-push.o GIT-LDFLAGS $(GITLIBS)
+git-http-push$X: http.o http-push.o $(RESOURCE_OBJS) GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)
@@ -2627,10 +2635,15 @@ $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY)
ln -s $< $@ 2>/dev/null || \
cp $< $@
-$(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o GIT-LDFLAGS $(GITLIBS)
+$(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o $(RESOURCE_OBJS) GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(CURL_LIBCURL) $(EXPAT_LIBEXPAT) $(LIBS)
+%.o: %.rc
+ $(QUIET_WINDRES)$(WINDRES) $< $@
+compat/win32/resource.o: compat/win32/git.manifest
+
+
contrib/scalar/scalar$X: $(SCALAR_OBJECTS) GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
$(filter %.o,$^) $(LIBS)
@@ -2945,7 +2958,7 @@ .PRECIOUS: $(TEST_OBJS)
t/helper/test-tool$X: $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))
-t/helper/test-%$X: t/helper/test-%.o GIT-LDFLAGS $(GITLIBS) $(REFTABLE_TEST_LIB)
+t/helper/test-%$X: t/helper/test-%.o $(RESOURCE_OBJS) GIT-LDFLAGS $(GITLIBS) $(REFTABLE_TEST_LIB)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(filter %.a,$^) $(LIBS)
check-sha1:: t/helper/test-tool$X
diff --git a/compat/win32/git.manifest b/compat/win32/git.manifest
new file mode 100644
index 0000000..325e3bb
--- /dev/null
+++ b/compat/win32/git.manifest
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <assemblyIdentity type="win32" name="Git" processorArchitecture="@ARCH@" version="0.0.0.0" />
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="asInvoker" uiAccess="false" />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
diff --git a/compat/win32/resource.rc b/compat/win32/resource.rc
new file mode 100644
index 0000000..c2bf4a6
--- /dev/null
+++ b/compat/win32/resource.rc
@@ -0,0 +1 @@
+1 24 "git.manifest"
diff --git a/config.mak.uname b/config.mak.uname
index f20d4ce..fcc651f 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -213,6 +213,8 @@ ifeq ($(uname_O),Msys)
NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
X = .exe
+ APPLICATION_MANIFEST = YesPlease
+ APPLICATION_MANIFEST = YesPlease
UNRELIABLE_FSTAT = UnfortunatelyYes
SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield
endif
@@ -398,6 +400,7 @@ ifeq ($(uname_S),Windows)
NO_INET_PTON = YesPlease
NO_INET_NTOP = YesPlease
NO_POSIX_GOODIES = UnfortunatelyYes
+ APPLICATION_MANIFEST = YesPlease
NATIVE_CRLF = YesPlease
DEFAULT_HELP_FORMAT = html
@@ -548,6 +551,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
NO_INET_PTON = YesPlease
NO_INET_NTOP = YesPlease
NO_POSIX_GOODIES = UnfortunatelyYes
+ APPLICATION_MANIFEST = YesPlease
DEFAULT_HELP_FORMAT = html
COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
--
2.10.1

View File

@ -1,6 +1,6 @@
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -306,28 +305,17 @@ case $(uname -s) in
@@ -315,28 +315,17 @@ case $(uname -s) in
find () {
/usr/bin/find "$@"
}
@ -25,7 +25,7 @@
- return 1
- }
esac
+is_absolute_path () {
+ case "$1" in
+ /*)

View File

@ -1,6 +1,6 @@
--- git-2.35.1/git-gui/git-gui.sh.orig 2022-01-29 01:48:42.000000000 +0100
+++ git-2.35.1/git-gui/git-gui.sh 2022-03-12 18:51:13.610007600 +0100
@@ -51,7 +51,10 @@
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -51,7 +51,10 @@ catch {rename send {}} ; # What an evil concept...
if { [info exists ::env(GIT_GUI_LIB_DIR) ] } {
set oguilib $::env(GIT_GUI_LIB_DIR)
} else {
@ -12,7 +12,7 @@
}
set oguirel {@@GITGUI_RELATIVE@@}
if {$oguirel eq {1}} {
@@ -274,10 +277,6 @@
@@ -274,10 +277,6 @@ proc is_Cygwin {} {
set _iscygwin 0
} else {
set _iscygwin 1

View File

@ -1,32 +1,31 @@
diff -urN git-2.8.2-orig/builtin/clone.c git-2.8.2/builtin/clone.c
--- git-2.8.2-orig/builtin/clone.c 2016-05-17 11:31:07.469884100 +0100
+++ git-2.8.2/builtin/clone.c 2016-05-17 11:31:16.899423500 +0100
@@ -887,7 +887,7 @@
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -939,7 +939,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
die(_("depth %s is not a positive number"), option_depth);
if (argc == 2)
- dir = xstrdup(argv[1]);
+ dir = maybe_xstrdup_cyg_conv_path(argv[1], 1);
else
dir = guess_dir_name(repo_name, is_bundle, option_bare);
strip_trailing_slashes(dir);
diff -urN git-2.8.2-orig/cache.h git-2.8.2/cache.h
--- git-2.8.2-orig/cache.h 2016-05-17 11:31:07.561889400 +0100
+++ git-2.8.2/cache.h 2016-05-17 11:31:16.884422600 +0100
@@ -989,6 +989,7 @@
dir = git_url_basename(repo_name, is_bundle, option_bare);
strip_dir_trailing_slashes(dir);
diff --git a/cache.h b/cache.h
index 6226f6a8a5..e8c0158e46 100644
--- a/cache.h
+++ b/cache.h
@@ -1284,6 +1284,7 @@ int normalize_path_copy_len(char *dst, const char *src, int *prefix_len);
int normalize_path_copy(char *dst, const char *src);
int longest_ancestor_length(const char *path, struct string_list *prefixes);
char *strip_path_suffix(const char *path, const char *suffix);
+char *maybe_xstrdup_cyg_conv_path(const char *path, int always_dupe);
int daemon_avoid_alias(const char *path);
extern int is_ntfs_dotgit(const char *name);
diff -urN git-2.8.2-orig/path.c git-2.8.2/path.c
--- git-2.8.2-orig/path.c 2016-05-17 11:31:06.252814500 +0100
+++ git-2.8.2/path.c 2016-05-17 11:38:34.828471600 +0100
@@ -6,6 +6,10 @@
#include "string-list.h"
#include "dir.h"
/*
--- a/path.c
+++ b/path.c
@@ -14,6 +14,10 @@
#include "lockfile.h"
#include "exec-cmd.h"
+#if defined(__CYGWIN__)
+#include <sys/cygwin.h>
@ -35,8 +34,8 @@ diff -urN git-2.8.2-orig/path.c git-2.8.2/path.c
static int get_st_mode_bits(const char *path, int *mode)
{
struct stat st;
@@ -1101,6 +1105,39 @@
return xstrndup(path, chomp_trailing_dir_sep(path, path_len));
@@ -1300,6 +1304,39 @@ char *strip_path_suffix(const char *path, const char *suffix)
return offset == -1 ? NULL : xstrndup(path, offset);
}
+/* We're deliberately not changing the normal has_dos_drive_prefix
@ -75,10 +74,9 @@ diff -urN git-2.8.2-orig/path.c git-2.8.2/path.c
int daemon_avoid_alias(const char *p)
{
int sl, ndot;
diff -urN git-2.8.2-orig/pathspec.c git-2.8.2/pathspec.c
--- git-2.8.2-orig/pathspec.c 2016-05-17 11:31:06.253814600 +0100
+++ git-2.8.2/pathspec.c 2016-05-17 11:31:16.903423700 +0100
@@ -397,6 +397,10 @@
--- a/pathspec.c
+++ b/pathspec.c
@@ -418,6 +418,10 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags,
const char *prefix, int prefixlen,
const char *elt)
{
@ -89,7 +87,7 @@ diff -urN git-2.8.2-orig/pathspec.c git-2.8.2/pathspec.c
unsigned magic = 0, element_magic = 0;
const char *copyfrom = elt;
char *match;
@@ -488,6 +492,10 @@
@@ -514,6 +518,10 @@ static void init_pathspec_item(struct pathspec_item *item, unsigned flags,
item->prefix > item->len) {
BUG("error initializing pathspec_item");
}
@ -100,10 +98,9 @@ diff -urN git-2.8.2-orig/pathspec.c git-2.8.2/pathspec.c
}
static int pathspec_item_cmp(const void *a_, const void *b_)
diff -urN git-2.8.2-orig/strbuf.c git-2.8.2/strbuf.c
--- git-2.8.2-orig/strbuf.c 2016-05-17 11:31:06.336819300 +0100
+++ git-2.8.2/strbuf.c 2016-05-17 11:31:16.893423100 +0100
@@ -671,6 +671,10 @@
--- a/strbuf.c
+++ b/strbuf.c
@@ -894,6 +894,10 @@ void strbuf_humanise_rate(struct strbuf *buf, off_t bytes)
void strbuf_add_absolute_path(struct strbuf *sb, const char *path)
{
@ -114,7 +111,7 @@ diff -urN git-2.8.2-orig/strbuf.c git-2.8.2/strbuf.c
if (!*path)
die("The empty string is not a valid path");
if (!is_absolute_path(path)) {
@@ -692,6 +696,10 @@
@@ -915,6 +919,10 @@ void strbuf_add_absolute_path(struct strbuf *sb, const char *path)
free(cwd);
}
strbuf_addstr(sb, path);
@ -124,4 +121,4 @@ diff -urN git-2.8.2-orig/strbuf.c git-2.8.2/strbuf.c
+#endif
}
int printf_ln(const char *fmt, ...)
void strbuf_add_real_path(struct strbuf *sb, const char *path)

View File

@ -1,14 +1,6 @@
---
contrib/completion/git-completion.tcsh | 17 +++++++----------
contrib/completion/git.csh | 4 ++++
contrib/completion/git.tcsh | 4 ++++
3 files changed, 15 insertions(+), 10 deletions(-)
Index: git-2.4.6/contrib/completion/git-completion.tcsh
===================================================================
--- git-2.4.6.orig/contrib/completion/git-completion.tcsh
+++ git-2.4.6/contrib/completion/git-completion.tcsh
@@ -32,14 +32,14 @@ if ( ${__git_tcsh_completion_version[1]}
--- a/contrib/completion/git-completion.tcsh
+++ b/contrib/completion/git-completion.tcsh
@@ -32,14 +32,14 @@ if ( ${__git_tcsh_completion_version[1]} < 6 || \
endif
unset __git_tcsh_completion_version
@ -30,28 +22,10 @@ Index: git-2.4.6/contrib/completion/git-completion.tcsh
cat << EOF >! ${__git_tcsh_completion_script}
#!bash
@@ -121,6 +121,3 @@ EOF
@@ -122,6 +122,3 @@ EOF
# Don't need this variable anymore, so don't pollute the users environment
unset __git_tcsh_completion_original_script
-
-complete git 'p,*,`bash ${__git_tcsh_completion_script} git "${COMMAND_LINE}"`,'
-complete gitk 'p,*,`bash ${__git_tcsh_completion_script} gitk "${COMMAND_LINE}"`,'
Index: git-2.4.6/contrib/completion/git.csh
===================================================================
--- /dev/null
+++ git-2.4.6/contrib/completion/git.csh
@@ -0,0 +1,4 @@
+if (${?prompt}) then
+complete git 'p,*,`bash /usr/share/tcsh/git.complete git "${COMMAND_LINE}"`,'
+complete gitk 'p,*,`bash /usr/share/tcsh/git.complete gitk "${COMMAND_LINE}"`,'
+endif
Index: git-2.4.6/contrib/completion/git.tcsh
===================================================================
--- /dev/null
+++ git-2.4.6/contrib/completion/git.tcsh
@@ -0,0 +1,4 @@
+if (${?prompt}) then
+complete git 'p,*,`bash /usr/share/tcsh/git.complete git "${COMMAND_LINE}"`,'
+complete gitk 'p,*,`bash /usr/share/tcsh/git.complete gitk "${COMMAND_LINE}"`,'
+endif