From: Junio C Hamano Date: Fri, 9 Dec 2011 21:33:39 +0000 (-0800) Subject: Merge branch 'maint-1.7.7' into maint X-Git-Tag: v1.7.8.1~16 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/10dd3b2bf1444695416c0dac951297acf7d4e5e4?hp=-c Merge branch 'maint-1.7.7' into maint * maint-1.7.7: am: don't persist keepcr flag mingw: give waitpid the correct signature git symbolic-ref: documentation fix --- 10dd3b2bf1444695416c0dac951297acf7d4e5e4 diff --combined compat/mingw.c index efdc703257,f899bf0839..a0ac487c0c --- a/compat/mingw.c +++ b/compat/mingw.c @@@ -1321,13 -1321,6 +1321,13 @@@ static void ensure_socket_initializatio initialized = 1; } +#undef gethostname +int mingw_gethostname(char *name, int namelen) +{ + ensure_socket_initialization(); + return gethostname(name, namelen); +} + #undef gethostbyname struct hostent *mingw_gethostbyname(const char *host) { @@@ -1712,7 -1705,7 +1712,7 @@@ char *getpass(const char *prompt return strbuf_detach(&buf, NULL); } - pid_t waitpid(pid_t pid, int *status, unsigned options) + pid_t waitpid(pid_t pid, int *status, int options) { HANDLE h = OpenProcess(SYNCHRONIZE | PROCESS_QUERY_INFORMATION, FALSE, pid); diff --combined compat/mingw.h index fecf0d0776,43e42f4481..0ff1e04812 --- a/compat/mingw.h +++ b/compat/mingw.h @@@ -120,7 -120,7 +120,7 @@@ static inline int mingw_mkdir(const cha #define mkdir mingw_mkdir #define WNOHANG 1 - pid_t waitpid(pid_t pid, int *status, unsigned options); + pid_t waitpid(pid_t pid, int *status, int options); #define kill mingw_kill int mingw_kill(pid_t pid, int sig); @@@ -190,9 -190,6 +190,9 @@@ char *mingw_getcwd(char *pointer, int l char *mingw_getenv(const char *name); #define getenv mingw_getenv +int mingw_gethostname(char *host, int namelen); +#define gethostname mingw_gethostname + struct hostent *mingw_gethostbyname(const char *host); #define gethostbyname mingw_gethostbyname diff --combined git-am.sh index 9042432e23,94f853fbd4..1c13b13991 --- a/git-am.sh +++ b/git-am.sh @@@ -311,40 -311,6 +311,40 @@@ split_patches () this= msgnum= ;; + hg) + this=0 + for hg in "$@" + do + this=$(( $this + 1 )) + msgnum=$(printf "%0${prec}d" $this) + # hg stores changeset metadata in #-commented lines preceding + # the commit message and diff(s). The only metadata we care about + # are the User and Date (Node ID and Parent are hashes which are + # only relevant to the hg repository and thus not useful to us) + # Since we cannot guarantee that the commit message is in + # git-friendly format, we put no Subject: line and just consume + # all of the message as the body + perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 } + if ($subject) { print ; } + elsif (/^\# User /) { s/\# User/From:/ ; print ; } + elsif (/^\# Date /) { + my ($hashsign, $str, $time, $tz) = split ; + $tz = sprintf "%+05d", (0-$tz)/36; + print "Date: " . + strftime("%a, %d %b %Y %H:%M:%S ", + localtime($time)) + . "$tz\n"; + } elsif (/^\# /) { next ; } + else { + print "\n", $_ ; + $subject = 1; + } + ' <"$hg" >"$dotest/$msgnum" || clean_abort + done + echo "$this" >"$dotest/last" + this= + msgnum= + ;; *) if test -n "$patch_format" then @@@ -530,7 -496,6 +530,6 @@@ els echo "$sign" >"$dotest/sign" echo "$utf8" >"$dotest/utf8" echo "$keep" >"$dotest/keep" - echo "$keepcr" >"$dotest/keepcr" echo "$scissors" >"$dotest/scissors" echo "$no_inbody_headers" >"$dotest/no_inbody_headers" echo "$GIT_QUIET" >"$dotest/quiet" @@@ -576,12 -541,6 +575,6 @@@ if test "$(cat "$dotest/keep")" = then keep=-k fi - case "$(cat "$dotest/keepcr")" in - t) - keepcr=--keep-cr ;; - f) - keepcr=--no-keep-cr ;; - esac case "$(cat "$dotest/scissors")" in t) scissors=--scissors ;;