Merge branch 'maint-1.7.7' into maint
authorJunio C Hamano <gitster@pobox.com>
Fri, 9 Dec 2011 21:33:39 +0000 (13:33 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Dec 2011 21:33:39 +0000 (13:33 -0800)
* maint-1.7.7:
am: don't persist keepcr flag
mingw: give waitpid the correct signature
git symbolic-ref: documentation fix

1  2 
compat/mingw.c
compat/mingw.h
git-am.sh
diff --combined compat/mingw.c
index efdc703257c9589018e59dc5bc93e9980e0f30b6,f899bf08394a9b4b940a311572ab0dc31bdf17de..a0ac487c0c12ea0e7c81485b5784e28f2115a2ea
@@@ -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 fecf0d07760d2211fac6db2e19ecbedaac81c57e,43e42f4481a371af5f886bdb0ce1cc789dfdb82e..0ff1e04812ef2491f15b1d40bb8e1c2977b26d98
@@@ -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 9042432e23d7e43edafce28b6822a041028b57b7,94f853fbd4228cfc298b3a47c6b4a2515f825ac5..1c13b1399185506dd11750fe7e8c1b989a0f3d0c
+++ 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 ;;