From e93368d26ebcf69698b8454afb85c9c84bd54363 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 23 Nov 2010 20:53:08 +0100 Subject: [PATCH 1/3] mingw: do not set errno to 0 on success Currently do_lstat always sets errno to 0 on success. This incorrectly overwrites previous errors. Fetch the error-code into a temporary variable instead, and assign that to errno on failure. Signed-off-by: Erik Faye-Lund Signed-off-by: Junio C Hamano --- compat/mingw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index f2d9e1fd97..b98e600006 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -195,9 +195,10 @@ static inline time_t filetime_to_time_t(const FILETIME *ft) */ static int do_lstat(const char *file_name, struct stat *buf) { + int err; WIN32_FILE_ATTRIBUTE_DATA fdata; - if (!(errno = get_file_attr(file_name, &fdata))) { + if (!(err = get_file_attr(file_name, &fdata))) { buf->st_ino = 0; buf->st_gid = 0; buf->st_uid = 0; @@ -211,6 +212,7 @@ static int do_lstat(const char *file_name, struct stat *buf) buf->st_ctime = filetime_to_time_t(&(fdata.ftCreationTime)); return 0; } + errno = err; return -1; } From 83acaaec12fcf33e605f441216ecc91c81b90449 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Sat, 20 Nov 2010 15:06:05 -0800 Subject: [PATCH 2/3] git-send-email.perl: Deduplicate "to:" and "cc:" entries with names If an email address in the "to:" list is in the style "First Last ", ie: not just a bare address like "email@domain.tld", and the same named entry style exists in the "cc:" list, the current logic will not remove the entry from the "cc:" list. Add logic to better deduplicate the "cc:" list by also matching the email address with angle brackets. Signed-off-by: Joe Perches Signed-off-by: Junio C Hamano --- git-send-email.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index e1f29a72a1..92bcbd085c 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -940,7 +940,7 @@ sub maildomain { sub send_message { my @recipients = unique_email_list(@to); @cc = (grep { my $cc = extract_valid_address($_); - not grep { $cc eq $_ } @recipients + not grep { $cc eq $_ || $_ =~ /<\Q${cc}\E>$/ } @recipients } map { sanitize_address($_) } @cc); From 401857c4c641a73e7fb78d26a9c2ad6eb316b739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Wed, 24 Nov 2010 21:03:53 +0100 Subject: [PATCH 3/3] imap-send: link against libcrypto for HMAC and others MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using stricter linkers, such as GNU gold or Darwin ld, transitive dependencies are not counted towards symbol resolution. If we don't link imap-send to libcrypto, we'll have undefined references to the HMAC_*, EVP_* and ERR_* functions families. Signed-off-by: Diego Elio Pettenò Signed-off-by: Junio C Hamano --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d3dcfb18a7..cd98c59271 100644 --- a/Makefile +++ b/Makefile @@ -1921,7 +1921,7 @@ git-%$X: %.o $(GITLIBS) git-imap-send$X: imap-send.o $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ - $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) + $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO) git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \