From 7d167feb8bdb52a21a0ef1a4d3b2a8d1f1d413f1 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 29 Sep 2005 18:19:50 +0200 Subject: [PATCH] Old curl does not know about CURLOPT_SSLKEY ... so try to set it only in later versions. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano diff --git a/http-fetch.c b/http-fetch.c index 33f3949..0566a91 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -529,9 +529,11 @@ int main(int argc, char **argv) if ((ssl_cert = getenv("GIT_SSL_CERT")) != NULL) { curl_easy_setopt(curl, CURLOPT_SSLCERT, ssl_cert); } +#if LIBCURL_VERSION_NUM >= 0x070902 if ((ssl_key = getenv("GIT_SSL_KEY")) != NULL) { curl_easy_setopt(curl, CURLOPT_SSLKEY, ssl_key); } +#endif #if LIBCURL_VERSION_NUM >= 0x070908 if ((ssl_capath = getenv("GIT_SSL_CAPATH")) != NULL) { curl_easy_setopt(curl, CURLOPT_CAPATH, ssl_capath); -- cgit v0.10.2-6-g49f6 From cdda474525f67d6f7c8bb9ae8e4c6bada2c50afa Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 29 Sep 2005 16:53:14 -0400 Subject: [PATCH] Make logerror() and loginfo() static Make logerror() and loginfo() static logerror() and loginfo() in daemon.c are never declared and never called from other files, therefore they should be declared static. Found by sparse. Signed-off-by: Pavel Roskin Signed-off-by: Junio C Hamano diff --git a/daemon.c b/daemon.c index a369ce5..65e62d7 100644 --- a/daemon.c +++ b/daemon.c @@ -57,7 +57,7 @@ static void logreport(int priority, const char *err, va_list params) write(2, buf, buflen); } -void logerror(const char *err, ...) +static void logerror(const char *err, ...) { va_list params; va_start(params, err); @@ -65,7 +65,7 @@ void logerror(const char *err, ...) va_end(params); } -void loginfo(const char *err, ...) +static void loginfo(const char *err, ...) { va_list params; if (!verbose) -- cgit v0.10.2-6-g49f6 From 264b16b621d9996006b73786b0ccdf8b80d29c49 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 30 Sep 2005 00:09:04 -0700 Subject: Tell which packfile is corrupt when we die. The core part detected and died upon seeing a corrupted packfile, but did not help the user by telling which packfile is corrupt and how. Signed-off-by: Junio C Hamano diff --git a/sha1_file.c b/sha1_file.c index fe374c6..1e847a8 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -871,7 +871,8 @@ void packed_object_info_detail(struct pack_entry *e, strcpy(type, "tag"); break; default: - die("corrupted pack file"); + die("corrupted pack file %s containing object of kind %d", + p->pack_name, kind); } *store_size = 0; /* notyet */ } @@ -910,7 +911,8 @@ static int packed_object_info(struct pack_entry *entry, strcpy(type, "tag"); break; default: - die("corrupted pack file"); + die("corrupted pack file %s containing object of kind %d", + p->pack_name, kind); } if (sizep) *sizep = size; @@ -1010,7 +1012,7 @@ static void *unpack_entry(struct pack_entry *entry, retval = unpack_entry_gently(entry, type, sizep); unuse_packed_git(p); if (!retval) - die("corrupted pack file"); + die("corrupted pack file %s", p->pack_name); return retval; } -- cgit v0.10.2-6-g49f6 From 894a8a8b1b935639ac2ea503e8fa2887fd6bd44b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 30 Sep 2005 00:27:11 -0700 Subject: Still installing the old command names. After seeing Jeff's guide, I changed my mind about the big-rename transition plan. Even if Porcelains are kept up to date, those web documents that describes older world order would live longer and people will stumble across them via google searches. And who knows how many mirrored copies there are. The backward compatible symbolic links *will* be removed before 1.0. But that will not happen in 0.99.8. Signed-off-by: Junio C Hamano diff --git a/Makefile b/Makefile index 9920467..e943954 100644 --- a/Makefile +++ b/Makefile @@ -119,7 +119,7 @@ PROGRAMS = \ git-update-ref \ $(SIMPLE_PROGRAMS) -# Backward compatibility -- to be removed in 0.99.8 +# Backward compatibility -- to be removed after 1.0 PROGRAMS += git-ssh-pull git-ssh-push PYMODULES = \ @@ -345,6 +345,7 @@ install: $(PROGRAMS) $(SCRIPTS) $(INSTALL) -d -m755 $(DESTDIR)$(bindir) $(INSTALL) $(PROGRAMS) $(SCRIPTS) $(DESTDIR)$(bindir) $(INSTALL) git-revert $(DESTDIR)$(bindir)/git-cherry-pick + sh ./cmd-rename.sh $(DESTDIR)$(bindir) $(MAKE) -C templates install $(INSTALL) -d -m755 $(DESTDIR)$(GIT_PYTHON_DIR) $(INSTALL) $(PYMODULES) $(DESTDIR)$(GIT_PYTHON_DIR) diff --git a/cmd-rename.sh b/cmd-rename.sh index f90b6ba..34e7f49 100755 --- a/cmd-rename.sh +++ b/cmd-rename.sh @@ -1,15 +1,13 @@ #!/bin/sh -# -# This is for people who installed previous GIT by hand and would want -# to remove the backward compatible links: -# -# ./cmd-rename.sh $bindir -# d="$1" test -d "$d" || exit while read old new do rm -f "$d/$old" + if test -f "$d/$new" + then + ln -s "$new" "$d/$old" || exit + fi done <<\EOF git-add-script git-add git-archimport-script git-archimport @@ -54,7 +52,3 @@ git-update-cache git-update-index git-convert-cache git-convert-objects git-fsck-cache git-fsck-objects EOF - -# These two are a bit more than symlinks now. -# git-ssh-push git-ssh-upload -# git-ssh-pull git-ssh-fetch -- cgit v0.10.2-6-g49f6