From a8d05d72b9fd60fe63f249250dcab2352b7b1984 Mon Sep 17 00:00:00 2001 From: Michael Haggerty Date: Wed, 7 Dec 2011 16:20:16 +0100 Subject: git symbolic-ref: documentation fix The old "git symbolic-ref" manpage seemed to imply in one place that symlinks are still the default way to represent symbolic references and in another that symlinks are deprecated. Fix the text and shorten the justification for the change of implementation. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano diff --git a/Documentation/git-symbolic-ref.txt b/Documentation/git-symbolic-ref.txt index 75b1ae5..a45d4c4 100644 --- a/Documentation/git-symbolic-ref.txt +++ b/Documentation/git-symbolic-ref.txt @@ -43,12 +43,9 @@ In the past, `.git/HEAD` was a symbolic link pointing at `refs/heads/master`. When we wanted to switch to another branch, we did `ln -sf refs/heads/newbranch .git/HEAD`, and when we wanted to find out which branch we are on, we did `readlink .git/HEAD`. -This was fine, and internally that is what still happens by -default, but on platforms that do not have working symlinks, -or that do not have the `readlink(1)` command, this was a bit -cumbersome. On some platforms, `ln -sf` does not even work as -advertised (horrors). Therefore symbolic links are now deprecated -and symbolic refs are used by default. +But symbolic links are not entirely portable, so they are now +deprecated and symbolic refs (as described above) are used by +default. 'git symbolic-ref' will exit with status 0 if the contents of the symbolic ref were printed correctly, with status 1 if the requested -- cgit v0.10.2-6-g49f6 From 956d86d1c9078eba380eb2530b0ff577a85c2e69 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 8 Dec 2011 20:39:57 +0100 Subject: mingw: give waitpid the correct signature POSIX says that last parameter to waitpid should be 'int', so let's make it so. Signed-off-by: Erik Faye-Lund Signed-off-by: Junio C Hamano diff --git a/compat/mingw.c b/compat/mingw.c index 8947418..f899bf0 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1705,7 +1705,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 --git a/compat/mingw.h b/compat/mingw.h index ce9dd98..43e42f4 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -120,7 +120,7 @@ static inline int mingw_mkdir(const char *path, int mode) #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); -- cgit v0.10.2-6-g49f6 From 791970425431878c8abe71645a03f0f64e20e461 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Thu, 8 Dec 2011 23:30:45 -0800 Subject: am: don't persist keepcr flag The keepcr flag is only used in the split_patches function, which is only called before a patch application has to stopped for user input, not after resuming. It is therefore unnecessary to persist the flag. This seems to have been the case since it was introduced in ad2c928 (git-am: Add command line parameter `--keep-cr` passing it to git-mailsplit, 2010-02-27). Signed-off-by: Martin von Zweigbergk Signed-off-by: Junio C Hamano diff --git a/git-am.sh b/git-am.sh index 016b505..94f853f 100755 --- a/git-am.sh +++ b/git-am.sh @@ -496,7 +496,6 @@ else 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" @@ -542,12 +541,6 @@ if test "$(cat "$dotest/keep")" = t 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 ;; -- cgit v0.10.2-6-g49f6