From ebae9ff95de2d0b36b061c7db833df4f7e01a41d Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 18 Mar 2011 15:23:52 -0500 Subject: [PATCH 1/3] compat: add missing #include Starting with commit c793430 (Limit file descriptors used by packs, 2011-02-28), git uses getrlimit to tell how many file descriptors it can use. Unfortunately it does not include the header declaring that function, resulting in compilation errors: sha1_file.c: In function 'open_packed_git_1': sha1_file.c:718: error: storage size of 'lim' isn't known sha1_file.c:721: warning: implicit declaration of function 'getrlimit' sha1_file.c:721: error: 'RLIMIT_NOFILE' undeclared (first use in this function) sha1_file.c:718: warning: unused variable 'lim' The standard header to include for this is (which on some systems itself requires declarations from or ). Probably the problem was missed until now because in current glibc sys/resource.h happens to be included by sys/wait.h. MinGW does not provide sys/resource.h (and compat/mingw takes care of providing getrlimit some other way), so add the missing #include to the "#ifndef __MINGW32__" block in git-compat-util.h. Reported-by: Stefan Sperling Tested-by: Stefan Sperling [on OpenBSD] Tested-by: Arnaud Lacombe [on FreeBSD 8] Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- git-compat-util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/git-compat-util.h b/git-compat-util.h index bf947b1ec..79b5122b4 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -118,6 +118,7 @@ #endif #ifndef __MINGW32__ #include +#include #include #include #include From 8c8674fc954d8c4bc46f303a141f510ecf264fcd Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 25 Mar 2011 14:13:31 -0400 Subject: [PATCH 2/3] pull: do not clobber untracked files on initial pull For a pull into an unborn branch, we do not use "git merge" at all. Instead, we call read-tree directly. However, we used the --reset parameter instead of "-m", which turns off the safety features. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- git-pull.sh | 2 +- t/t5520-pull.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/git-pull.sh b/git-pull.sh index f6b7b8404..c98c0fc32 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -272,7 +272,7 @@ esac if test -z "$orig_head" then git update-ref -m "initial pull" HEAD $merge_head "$curr_head" && - git read-tree --reset -u HEAD || exit 1 + git read-tree -m -u HEAD || exit 1 exit fi diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 0470a81be..0e5eb678c 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -46,6 +46,17 @@ test_expect_success 'pulling into void using master:master' ' test_cmp file cloned-uho/file ' +test_expect_success 'pulling into void does not overwrite untracked files' ' + git init cloned-untracked && + ( + cd cloned-untracked && + echo untracked >file && + test_must_fail git pull .. master && + echo untracked >expect && + test_cmp expect file + ) +' + test_expect_success 'test . as a remote' ' git branch copy master && From 8e848868fff625a8dda92fb11edf2b7975827e1a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 3 Apr 2011 12:58:23 -0700 Subject: [PATCH 3/3] Start preparing for 1.7.4.4 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/1.7.4.4.txt | 37 ++++++++++++++++++++++++++++++ RelNotes | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 Documentation/RelNotes/1.7.4.4.txt diff --git a/Documentation/RelNotes/1.7.4.4.txt b/Documentation/RelNotes/1.7.4.4.txt new file mode 100644 index 000000000..e91490402 --- /dev/null +++ b/Documentation/RelNotes/1.7.4.4.txt @@ -0,0 +1,37 @@ +Git v1.7.4.4 Release Notes +========================== + +Fixes since v1.7.4.3 +-------------------- + + * Compilation of sha1_file.c on BSD platforms were broken due to our + recent use of getrlimit() without including . + + * "git config" did not diagnose incorrect configuration variable names. + + * "git format-patch" did not wrap a long subject line that resulted from + rfc2047 encoding. + + * "git instaweb" should work better again with plackup. + + * "git log --max-count=4 -Sfoobar" now shows 4 commits that changes the + number of occurrences of string "foobar"; it used to scan only for 4 + commits and then emitted only matching ones. + + * "git log --first-parent --boundary $c^..$c" segfaulted on a merge. + + * "git pull" into an empty branch should have behaved as if + fast-forwarding from emptiness to the version being pulled, with + the usual protection against overwriting untracked files. + + * "git status" spent all the effort to notice racily-clean index entries + but didn't update the index file to help later operations go faster in + some cases. + +And other minor fixes and documentation updates. + +--- +exec >/var/tmp/1 +O=v1.7.4.3-22-g8c8674f +echo O=$(git describe maint) +git shortlog --no-merges $O..maint diff --git a/RelNotes b/RelNotes index 5d988d6ab..d5ad5e14a 120000 --- a/RelNotes +++ b/RelNotes @@ -1 +1 @@ -Documentation/RelNotes/1.7.4.3.txt \ No newline at end of file +Documentation/RelNotes/1.7.4.4 \ No newline at end of file