{"thread":{"id":"23908","subject":"[PATCH 094/104] diff: fix coloring of extended diff headers","startedAt":"2010-05-26T06:00:45Z","lastAt":"2010-05-26T07:46:46Z","messageCount":23,"participants":["Sam Vilain","Sverre Rabbelier"],"isPatch":true,"patchVersion":1,"patchTotal":104},"messages":[{"id":"142337","messageId":"1274853674-18521-75-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 075/104] tests: chmod +x t5150","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:00:45Z","receivedAt":"2010-05-26T06:00:45Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Jeff King <peff@peff.net>\n\nSigned-off-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n 0 files changed, 0 insertions(+), 0 deletions(-)\n mode change 100644 => 100755 t/t5150-request-pull.sh\n\ndiff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh\nold mode 100644\nnew mode 100755\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142324","messageId":"1274853674-18521-76-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 076/104] t7604-merge-custom-message: shift expected output creation","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:00:46Z","receivedAt":"2010-05-26T06:00:46Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Tay Ray Chuan <rctay89@gmail.com>\n\nSquash in a minor rename too.\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t7604-merge-custom-message.sh |   12 ++++++++----\n 1 files changed, 8 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t7604-merge-custom-message.sh b/t/t7604-merge-custom-message.sh\nindex 269cfdf..d79542d 100755\n--- a/t/t7604-merge-custom-message.sh\n+++ b/t/t7604-merge-custom-message.sh\n@@ -6,6 +6,10 @@ Testing merge when using a custom message for the merge commit.'\n \n . ./test-lib.sh\n \n+create_merge_msgs() {\n+\techo >exp.subject \"custom message\"\n+}\n+\n test_expect_success 'setup' '\n \techo c0 > c0.c &&\n \tgit add c0.c &&\n@@ -19,16 +23,16 @@ test_expect_success 'setup' '\n \techo c2 > c2.c &&\n \tgit add c2.c &&\n \tgit commit -m c2 &&\n-\tgit tag c2\n+\tgit tag c2 &&\n+\tcreate_merge_msgs\n '\n \n \n test_expect_success 'merge c2 with a custom message' '\n \tgit reset --hard c1 &&\n-\techo >expected \"custom message\" &&\n-\tgit merge -m \"custom message\" c2 &&\n+\tgit merge -m \"$(cat exp.subject)\" c2 &&\n \tgit cat-file commit HEAD | sed -e \"1,/^$/d\" >actual &&\n-\ttest_cmp expected actual\n+\ttest_cmp exp.subject actual\n '\n \n test_done\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142328","messageId":"1274853674-18521-82-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 082/104] fmt-merge-msg: add function to append shortlog only","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:00:52Z","receivedAt":"2010-05-26T06:00:52Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Tay Ray Chuan <rctay89@gmail.com>\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin.h               |    1 +\n builtin/fmt-merge-msg.c |   13 +++++++++----\n 2 files changed, 10 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin.h b/builtin.h\nindex 464588b..322901f 100644\n--- a/builtin.h\n+++ b/builtin.h\n@@ -16,6 +16,7 @@ extern const char *help_unknown_cmd(const char *cmd);\n extern void prune_packed_objects(int);\n extern int fmt_merge_msg(int merge_summary, struct strbuf *in,\n \tstruct strbuf *out);\n+extern int fmt_merge_msg_shortlog(struct strbuf *in, struct strbuf *out);\n extern int commit_tree(const char *msg, unsigned char *tree,\n \t\tstruct commit_list *parents, unsigned char *ret,\n \t\tconst char *author);\ndiff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c\nindex d0160cb..48548cf 100644\n--- a/builtin/fmt-merge-msg.c\n+++ b/builtin/fmt-merge-msg.c\n@@ -255,8 +255,8 @@ static void do_fmt_merge_msg_title(struct strbuf *out,\n \t\tstrbuf_addf(out, \" into %s\\n\", current_branch);\n }\n \n-static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,\n-\tstruct strbuf *out) {\n+static int do_fmt_merge_msg(int merge_title, int merge_summary,\n+\tstruct strbuf *in, struct strbuf *out) {\n \tint limit = 20, i = 0, pos = 0;\n \tunsigned char head_sha1[20];\n \tconst char *current_branch;\n@@ -285,7 +285,8 @@ static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,\n \tif (!srcs.nr)\n \t\treturn 0;\n \n-\tdo_fmt_merge_msg_title(out, current_branch);\n+\tif (merge_title)\n+\t\tdo_fmt_merge_msg_title(out, current_branch);\n \n \tif (merge_summary) {\n \t\tstruct commit *head;\n@@ -305,7 +306,11 @@ static int do_fmt_merge_msg(int merge_summary, struct strbuf *in,\n }\n \n int fmt_merge_msg(int merge_summary, struct strbuf *in, struct strbuf *out) {\n-\treturn do_fmt_merge_msg(merge_summary, in, out);\n+\treturn do_fmt_merge_msg(1, merge_summary, in, out);\n+}\n+\n+int fmt_merge_msg_shortlog(struct strbuf *in, struct strbuf *out) {\n+\treturn do_fmt_merge_msg(0, 1, in, out);\n }\n \n int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142330","messageId":"1274853674-18521-84-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 084/104] autocrlf: Make it work also for un-normalized repositories","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:00:54Z","receivedAt":"2010-05-26T06:00:54Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Finn Arne Gangstad <finnag@pvv.org>\n\nPreviously, autocrlf would only work well for normalized\nrepositories. Any text files that contained CRLF in the repository\nwould cause problems, and would be modified when handled with\ncore.autocrlf set.\n\nChange autocrlf to not do any conversions to files that in the\nrepository already contain a CR. git with autocrlf set will never\ncreate such a file, or change a LF only file to contain CRs, so the\n(new) assumption is that if a file contains a CR, it is intentional,\nand autocrlf should not change that.\n\nThe following sequence should now always be a NOP even with autocrlf\nset (assuming a clean working directory):\n\ngit checkout <something>\ntouch *\ngit add -A .    (will add nothing)\ngit commit      (nothing to commit)\n\nPreviously this would break for any text file containing a CR.\n\nSome of you may have been folowing Eyvind's excellent thread about\ntrying to make end-of-line translation in git a bit smoother.\n\nI decided to attack the problem from a different angle: Is it possible\nto make autocrlf behave non-destructively for all the previous problem cases?\n\nStealing the problem from Eyvind's initial mail (paraphrased and\nsummarized a bit):\n\n1. Setting autocrlf globally is a pain since autocrlf does not work well\n   with CRLF in the repo\n2. Setting it in individual repos is hard since you do it \"too late\"\n   (the clone will get it wrong)\n3. If someone checks in a file with CRLF later, you get into problems again\n4. If a repository once has contained CRLF, you can't tell autocrlf\n   at which commit everything is sane again\n5. autocrlf does needless work if you know that all your users want\n   the same EOL style.\n\nI belive that this patch makes autocrlf a safe (and good) default\nsetting for Windows, and this solves problems 1-4 (it solves 2 by being\nset by default, which is early enough for clone).\n\nI implemented it by looking for CR charactes in the index, and\naborting any conversion attempt if this is found.\n\nSigned-off-by: Finn Arne Gangstad <finag@pvv.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n convert.c       |   49 +++++++++++++++++++++++++++++++++++++++++++++++++\n t/t0020-crlf.sh |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 101 insertions(+), 0 deletions(-)\n\ndiff --git a/convert.c b/convert.c\nindex 27acce5..a54c5fc 100644\n--- a/convert.c\n+++ b/convert.c\n@@ -120,6 +120,43 @@ static void check_safe_crlf(const char *path, int action,\n \t}\n }\n \n+static int has_cr_in_index(const char *path)\n+{\n+\tint pos, len;\n+\tunsigned long sz;\n+\tenum object_type type;\n+\tvoid *data;\n+\tint has_cr;\n+\tstruct index_state *istate = &the_index;\n+\n+\tlen = strlen(path);\n+\tpos = index_name_pos(istate, path, len);\n+\tif (pos < 0) {\n+\t\t/*\n+\t\t * We might be in the middle of a merge, in which\n+\t\t * case we would read stage #2 (ours).\n+\t\t */\n+\t\tint i;\n+\t\tfor (i = -pos - 1;\n+\t\t     (pos < 0 && i < istate->cache_nr &&\n+\t\t      !strcmp(istate->cache[i]->name, path));\n+\t\t     i++)\n+\t\t\tif (ce_stage(istate->cache[i]) == 2)\n+\t\t\t\tpos = i;\n+\t}\n+\tif (pos < 0)\n+\t\treturn 0;\n+\tdata = read_sha1_file(istate->cache[pos]->sha1, &type, &sz);\n+\tif (!data || type != OBJ_BLOB) {\n+\t\tfree(data);\n+\t\treturn 0;\n+\t}\n+\n+\thas_cr = memchr(data, '\\r', sz) != NULL;\n+\tfree(data);\n+\treturn has_cr;\n+}\n+\n static int crlf_to_git(const char *path, const char *src, size_t len,\n                        struct strbuf *buf, int action, enum safe_crlf checksafe)\n {\n@@ -145,6 +182,13 @@ static int crlf_to_git(const char *path, const char *src, size_t len,\n \t\t */\n \t\tif (is_binary(len, &stats))\n \t\t\treturn 0;\n+\n+\t\t/*\n+\t\t * If the file in the index has any CR in it, do not convert.\n+\t\t * This is the new safer autocrlf handling.\n+\t\t */\n+\t\tif (has_cr_in_index(path))\n+\t\t\treturn 0;\n \t}\n \n \tcheck_safe_crlf(path, action, &stats, checksafe);\n@@ -203,6 +247,11 @@ static int crlf_to_worktree(const char *path, const char *src, size_t len,\n \t\treturn 0;\n \n \tif (action == CRLF_GUESS) {\n+\t\t/* If we have any CR or CRLF line endings, we do not touch it */\n+\t\t/* This is the new safer autocrlf-handling */\n+\t\tif (stats.cr > 0 || stats.crlf > 0)\n+\t\t\treturn 0;\n+\n \t\t/* If we have any bare CR characters, we're not going to touch it */\n \t\tif (stats.cr != stats.crlf)\n \t\t\treturn 0;\ndiff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh\nindex c3e7e32..234a94f 100755\n--- a/t/t0020-crlf.sh\n+++ b/t/t0020-crlf.sh\n@@ -453,5 +453,57 @@ test_expect_success 'invalid .gitattributes (must not crash)' '\n \tgit diff\n \n '\n+# Some more tests here to add new autocrlf functionality.\n+# We want to have a known state here, so start a bit from scratch\n+\n+test_expect_success 'setting up for new autocrlf tests' '\n+\tgit config core.autocrlf false &&\n+\tgit config core.safecrlf false &&\n+\trm -rf .????* * &&\n+\tfor w in I am all LF; do echo $w; done >alllf &&\n+\tfor w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >mixed &&\n+\tfor w in I am all CRLF; do echo $w; done | append_cr >allcrlf &&\n+\tgit add -A . &&\n+\tgit commit -m \"alllf, allcrlf and mixed only\" &&\n+\tgit tag -a -m \"message\" autocrlf-checkpoint\n+'\n+\n+test_expect_success 'report no change after setting autocrlf' '\n+\tgit config core.autocrlf true &&\n+\ttouch * &&\n+\tgit diff --exit-code\n+'\n+\n+test_expect_success 'files are clean after checkout' '\n+\trm * &&\n+\tgit checkout -f &&\n+\tgit diff --exit-code\n+'\n+\n+cr_to_Q_no_NL () {\n+    tr '\\015' Q | tr -d '\\012'\n+}\n+\n+test_expect_success 'LF only file gets CRLF with autocrlf' '\n+\ttest \"$(cr_to_Q_no_NL < alllf)\" = \"IQamQallQLFQ\"\n+'\n+\n+test_expect_success 'Mixed file is still mixed with autocrlf' '\n+\ttest \"$(cr_to_Q_no_NL < mixed)\" = \"OhhereisCRLFQintext\"\n+'\n+\n+test_expect_success 'CRLF only file has CRLF with autocrlf' '\n+\ttest \"$(cr_to_Q_no_NL < allcrlf)\" = \"IQamQallQCRLFQ\"\n+'\n+\n+test_expect_success 'New CRLF file gets LF in repo' '\n+\ttr -d \"\\015\" < alllf | append_cr > alllf2 &&\n+\tgit add alllf2 &&\n+\tgit commit -m \"alllf2 added\" &&\n+\tgit config core.autocrlf false &&\n+\trm * &&\n+\tgit checkout -f &&\n+\ttest_cmp alllf alllf2\n+'\n \n test_done\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142327","messageId":"1274853674-18521-86-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 086/104] gitweb: Use @diff_opts while using format-patch","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:00:56Z","receivedAt":"2010-05-26T06:00:56Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>\n\nMake git-format-patch (used by 'patch' and 'patches' views) use the\nsame rename detection options that git-diff and git-diff-tree (used\nby 'commitdiff', 'blobdiff', etc.) use.\n\nSigned-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>\nAcked-by: Jakub Narebski <jnareb@gmail.com>\nAcked-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n gitweb/gitweb.perl |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex c356e95..77e5f79 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -6117,8 +6117,8 @@ sub git_commitdiff {\n \t\t\t}\n \t\t\tpush @commit_spec, '--root', $hash;\n \t\t}\n-\t\topen $fd, \"-|\", git_cmd(), \"format-patch\", '--encoding=utf8',\n-\t\t\t'--stdout', @commit_spec\n+\t\topen $fd, \"-|\", git_cmd(), \"format-patch\", @diff_opts,\n+\t\t\t'--encoding=utf8', '--stdout', @commit_spec\n \t\t\tor die_error(500, \"Open git-format-patch failed\");\n \t} else {\n \t\tdie_error(400, \"Unknown commitdiff format\");\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142321","messageId":"1274853674-18521-87-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 087/104] hash_object: correction for zero length file","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:00:57Z","receivedAt":"2010-05-26T06:00:57Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Dmitry Potapov <dpotapov@gmail.com>\n\nThe check whether size is zero was done after if size <= SMALL_FILE_SIZE,\nas result, zero size case was never triggered. Instead zero length file\nwas treated as any other small file. This did not caused any problem, but\nif we have a special case for size equal to zero, it is better to make it\nwork and avoid redundant malloc().\n\nSigned-off-by: Dmitry Potapov <dpotapov@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n sha1_file.c |    7 ++++---\n 1 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/sha1_file.c b/sha1_file.c\nindex ff65328..1b551e4 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -2448,6 +2448,8 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object,\n \t\telse\n \t\t\tret = -1;\n \t\tstrbuf_release(&sbuf);\n+\t} else if (!size) {\n+\t\tret = index_mem(sha1, NULL, size, write_object, type, path);\n \t} else if (size <= SMALL_FILE_SIZE) {\n \t\tchar *buf = xmalloc(size);\n \t\tif (size == read_in_full(fd, buf, size))\n@@ -2456,12 +2458,11 @@ int index_fd(unsigned char *sha1, int fd, struct stat *st, int write_object,\n \t\telse\n \t\t\tret = error(\"short read %s\", strerror(errno));\n \t\tfree(buf);\n-\t} else if (size) {\n+\t} else {\n \t\tvoid *buf = xmmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);\n \t\tret = index_mem(sha1, buf, size, write_object, type, path);\n \t\tmunmap(buf, size);\n-\t} else\n-\t\tret = index_mem(sha1, NULL, size, write_object, type, path);\n+\t}\n \tclose(fd);\n \treturn ret;\n }\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142320","messageId":"1274853674-18521-88-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 088/104] for-each-ref: Field with abbreviated objectname","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:00:58Z","receivedAt":"2010-05-26T06:00:58Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Michael J Gruber <git@drmicha.warpmail.net>\n\nIntroduce a :short modifier to objectname which outputs the abbreviated\nobject name.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\nReviewed-by: Jeff King <peff@peff.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/git-for-each-ref.txt |    1 +\n builtin/for-each-ref.c             |    3 +++\n t/t6300-for-each-ref.sh            |    9 +++++++++\n 3 files changed, 13 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt\nindex 7e83288..390d85c 100644\n--- a/Documentation/git-for-each-ref.txt\n+++ b/Documentation/git-for-each-ref.txt\n@@ -86,6 +86,7 @@ objectsize::\n \n objectname::\n \tThe object name (aka SHA-1).\n+\tFor a non-ambiguous abbreviation of the object name append `:short`.\n \n upstream::\n \tThe name of a local ref which can be considered ``upstream''\ndiff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c\nindex 62be1bb..3a97953 100644\n--- a/builtin/for-each-ref.c\n+++ b/builtin/for-each-ref.c\n@@ -227,6 +227,9 @@ static void grab_common_values(struct atom_value *val, int deref, struct object\n \t\t\tstrcpy(s, sha1_to_hex(obj->sha1));\n \t\t\tv->s = s;\n \t\t}\n+\t\telse if (!strcmp(name, \"objectname:short\")) {\n+\t\t\tv->s = find_unique_abbrev(obj->sha1, DEFAULT_ABBREV);\n+\t\t}\n \t}\n }\n \ndiff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh\nindex 8052c86..7dc8a51 100755\n--- a/t/t6300-for-each-ref.sh\n+++ b/t/t6300-for-each-ref.sh\n@@ -295,6 +295,15 @@ test_expect_success 'Check short upstream format' '\n \ttest_cmp expected actual\n '\n \n+cat >expected <<EOF\n+67a36f1\n+EOF\n+\n+test_expect_success 'Check short objectname format' '\n+\tgit for-each-ref --format=\"%(objectname:short)\" refs/heads >actual &&\n+\ttest_cmp expected actual\n+'\n+\n test_expect_success 'Check for invalid refname format' '\n \ttest_must_fail git for-each-ref --format=\"%(refname:INVALID)\"\n '\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142329","messageId":"1274853674-18521-90-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 090/104] Documentation: rebase -i ignores options passed to \"git am\"","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:00Z","receivedAt":"2010-05-26T06:01:00Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Markus Heidelberg <markus.heidelberg@web.de>\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/git-rebase.txt |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt\nindex 0d07b1b..5863dec 100644\n--- a/Documentation/git-rebase.txt\n+++ b/Documentation/git-rebase.txt\n@@ -295,6 +295,7 @@ link:howto/revert-a-faulty-merge.txt[revert-a-faulty-merge How-To] for details).\n --ignore-date::\n \tThese flags are passed to 'git am' to easily change the dates\n \tof the rebased commits (see linkgit:git-am[1]).\n+\tIncompatible with the --interactive option.\n \n -i::\n --interactive::\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142326","messageId":"1274853674-18521-91-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 091/104] Documentation: fix minor inconsistency","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:01Z","receivedAt":"2010-05-26T06:01:01Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Michael J Gruber <git@drmicha.warpmail.net>\n\nWhile we don't always write out commands in full (`git command`) we\nshould do it consistently in adjacent paragraphs.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/config.txt |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 8f86050..c3ebd4d 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -1516,7 +1516,7 @@ receive.denyDeletes::\n \tthe ref. Use this to prevent such a ref deletion via a push.\n \n receive.denyCurrentBranch::\n-\tIf set to true or \"refuse\", receive-pack will deny a ref update\n+\tIf set to true or \"refuse\", git-receive-pack will deny a ref update\n \tto the currently checked out branch of a non-bare repository.\n \tSuch a push is potentially dangerous because it brings the HEAD\n \tout of sync with the index and working tree. If set to \"warn\",\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142334","messageId":"1274853674-18521-92-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 092/104] Documentation/gitdiffcore: fix order in pickaxe description","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:02Z","receivedAt":"2010-05-26T06:01:02Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Michael J Gruber <git@drmicha.warpmail.net>\n\nReverse the order of \"origin\" and \"result\" so that the sentence\nreally describes an addition rather than a removal.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/gitdiffcore.txt |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/gitdiffcore.txt b/Documentation/gitdiffcore.txt\nindex 9de8caf..5d91a7e 100644\n--- a/Documentation/gitdiffcore.txt\n+++ b/Documentation/gitdiffcore.txt\n@@ -227,8 +227,8 @@ changes that touch a specified string, and is controlled by the\n commands.\n \n When diffcore-pickaxe is in use, it checks if there are\n-filepairs whose \"original\" side has the specified string and\n-whose \"result\" side does not.  Such a filepair represents \"the\n+filepairs whose \"result\" side has the specified string and\n+whose \"origin\" side does not.  Such a filepair represents \"the\n string appeared in this changeset\".  It also checks for the\n opposite case that loses the specified string.\n \n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142332","messageId":"1274853674-18521-93-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 093/104] post-receive-email: document command-line mode","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:03Z","receivedAt":"2010-05-26T06:01:03Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Jonathan Nieder <jrnieder@gmail.com>\n\nAccording to the default hooks/post-receive file, the hook is called\nwith three arguments on stdin:\n\n  <oldrev> <newrev> <refname>\n\nIn command-line mode, the arguments come in a different order, because\nthe email hook instead calls:\n\n  generate_email $2 $3 $1\n\nAdd a comment to explain why, based on comments from the mailing list\nand the commit message to v1.5.1~9.  Thanks to Andy for the\nexplanation.\n\nRequested-by: martin f. krafft <madduck@debian.org>\nCc: Andy Parkins <andyparkins@gmail.com>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n contrib/hooks/post-receive-email |    7 +++++++\n 1 files changed, 7 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex 58a35c8..30ae63d 100755\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -23,6 +23,13 @@\n # possible for the email to be from someone other than the person doing the\n # push.\n #\n+# To help with debugging and use on pre-v1.5.1 git servers, this script will\n+# also obey the interface of hooks/update, taking its arguments on the\n+# command line.  Unfortunately, hooks/update is called once for each ref.\n+# To avoid firing one email per ref, this script just prints its output to\n+# the screen when used in this mode.  The output can then be redirected if\n+# wanted.\n+#\n # Config\n # ------\n # hooks.mailinglist\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142319","messageId":"1274853674-18521-94-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 094/104] diff: fix coloring of extended diff headers","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:04Z","receivedAt":"2010-05-26T06:01:04Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Bert Wesarg <bert.wesarg@googlemail.com>\n\nColoring the extended headers where done as a whole not per line. less with\noption -R (which is the default from git) does not support this coloring\nmode because of performance reasons. The -r option would be an alternative\nbut has problems with lines that are longer than the screen. Therefore\nstick to the idiom to color each line separately. The problem is, that the\nresult of ill_metainfo() will also be used as an parameter to an external\ndiff driver, so we need to disable coloring in this case.\n\nBecause coloring is now done inside fill_metainfo() we can simply add this\nstring to the diff header and therefore keep the last newline in the\nextended header. This results also into the fact that the external diff\ndriver now gets this last newline too. Which is a change in behavior\nbut a good one.\n\nSigned-off-by: Bert Wesarg <bert.wesarg@googlemail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n diff.c |   61 +++++++++++++++++++++++++++++++++++--------------------------\n 1 files changed, 35 insertions(+), 26 deletions(-)\n\ndiff --git a/diff.c b/diff.c\nindex d0ecbc3..7e508dd 100644\n--- a/diff.c\n+++ b/diff.c\n@@ -1650,21 +1650,21 @@ static void builtin_diff(const char *name_a,\n \tif (lbl[0][0] == '/') {\n \t\t/* /dev/null */\n \t\tstrbuf_addf(&header, \"%snew file mode %06o%s\\n\", set, two->mode, reset);\n-\t\tif (xfrm_msg && xfrm_msg[0])\n-\t\t\tstrbuf_addf(&header, \"%s%s%s\\n\", set, xfrm_msg, reset);\n+\t\tif (xfrm_msg)\n+\t\t\tstrbuf_addstr(&header, xfrm_msg);\n \t}\n \telse if (lbl[1][0] == '/') {\n \t\tstrbuf_addf(&header, \"%sdeleted file mode %06o%s\\n\", set, one->mode, reset);\n-\t\tif (xfrm_msg && xfrm_msg[0])\n-\t\t\tstrbuf_addf(&header, \"%s%s%s\\n\", set, xfrm_msg, reset);\n+\t\tif (xfrm_msg)\n+\t\t\tstrbuf_addstr(&header, xfrm_msg);\n \t}\n \telse {\n \t\tif (one->mode != two->mode) {\n \t\t\tstrbuf_addf(&header, \"%sold mode %06o%s\\n\", set, one->mode, reset);\n \t\t\tstrbuf_addf(&header, \"%snew mode %06o%s\\n\", set, two->mode, reset);\n \t\t}\n-\t\tif (xfrm_msg && xfrm_msg[0])\n-\t\t\tstrbuf_addf(&header, \"%s%s%s\\n\", set, xfrm_msg, reset);\n+\t\tif (xfrm_msg)\n+\t\t\tstrbuf_addstr(&header, xfrm_msg);\n \n \t\t/*\n \t\t * we do not run diff between different kind\n@@ -2323,30 +2323,36 @@ static void fill_metainfo(struct strbuf *msg,\n \t\t\t  struct diff_filespec *one,\n \t\t\t  struct diff_filespec *two,\n \t\t\t  struct diff_options *o,\n-\t\t\t  struct diff_filepair *p)\n+\t\t\t  struct diff_filepair *p,\n+\t\t\t  int use_color)\n {\n+\tconst char *set = diff_get_color(use_color, DIFF_METAINFO);\n+\tconst char *reset = diff_get_color(use_color, DIFF_RESET);\n+\n \tstrbuf_init(msg, PATH_MAX * 2 + 300);\n \tswitch (p->status) {\n \tcase DIFF_STATUS_COPIED:\n-\t\tstrbuf_addf(msg, \"similarity index %d%%\", similarity_index(p));\n-\t\tstrbuf_addstr(msg, \"\\ncopy from \");\n+\t\tstrbuf_addf(msg, \"%ssimilarity index %d%%\",\n+\t\t\t    set, similarity_index(p));\n+\t\tstrbuf_addf(msg, \"%s\\n%scopy from \", reset, set);\n \t\tquote_c_style(name, msg, NULL, 0);\n-\t\tstrbuf_addstr(msg, \"\\ncopy to \");\n+\t\tstrbuf_addf(msg, \"%s\\n%scopy to \", reset, set);\n \t\tquote_c_style(other, msg, NULL, 0);\n-\t\tstrbuf_addch(msg, '\\n');\n+\t\tstrbuf_addf(msg, \"%s\\n\", reset);\n \t\tbreak;\n \tcase DIFF_STATUS_RENAMED:\n-\t\tstrbuf_addf(msg, \"similarity index %d%%\", similarity_index(p));\n-\t\tstrbuf_addstr(msg, \"\\nrename from \");\n+\t\tstrbuf_addf(msg, \"%ssimilarity index %d%%\",\n+\t\t\t    set, similarity_index(p));\n+\t\tstrbuf_addf(msg, \"%s\\n%srename from \", reset, set);\n \t\tquote_c_style(name, msg, NULL, 0);\n-\t\tstrbuf_addstr(msg, \"\\nrename to \");\n+\t\tstrbuf_addf(msg, \"%s\\n%srename to \", reset, set);\n \t\tquote_c_style(other, msg, NULL, 0);\n-\t\tstrbuf_addch(msg, '\\n');\n+\t\tstrbuf_addf(msg, \"%s\\n\", reset);\n \t\tbreak;\n \tcase DIFF_STATUS_MODIFIED:\n \t\tif (p->score) {\n-\t\t\tstrbuf_addf(msg, \"dissimilarity index %d%%\\n\",\n-\t\t\t\t    similarity_index(p));\n+\t\t\tstrbuf_addf(msg, \"%sdissimilarity index %d%%%s\\n\",\n+\t\t\t\t    set, similarity_index(p), reset);\n \t\t\tbreak;\n \t\t}\n \t\t/* fallthru */\n@@ -2363,15 +2369,13 @@ static void fill_metainfo(struct strbuf *msg,\n \t\t\t    (!fill_mmfile(&mf, two) && diff_filespec_is_binary(two)))\n \t\t\t\tabbrev = 40;\n \t\t}\n-\t\tstrbuf_addf(msg, \"index %.*s..%.*s\",\n+\t\tstrbuf_addf(msg, \"%sindex %.*s..%.*s\", set,\n \t\t\t    abbrev, sha1_to_hex(one->sha1),\n \t\t\t    abbrev, sha1_to_hex(two->sha1));\n \t\tif (one->mode == two->mode)\n \t\t\tstrbuf_addf(msg, \" %06o\", one->mode);\n-\t\tstrbuf_addch(msg, '\\n');\n+\t\tstrbuf_addf(msg, \"%s\\n\", reset);\n \t}\n-\tif (msg->len)\n-\t\tstrbuf_setlen(msg, msg->len - 1);\n }\n \n static void run_diff_cmd(const char *pgm,\n@@ -2387,11 +2391,6 @@ static void run_diff_cmd(const char *pgm,\n \tconst char *xfrm_msg = NULL;\n \tint complete_rewrite = (p->status == DIFF_STATUS_MODIFIED) && p->score;\n \n-\tif (msg) {\n-\t\tfill_metainfo(msg, name, other, one, two, o, p);\n-\t\txfrm_msg = msg->len ? msg->buf : NULL;\n-\t}\n-\n \tif (!DIFF_OPT_TST(o, ALLOW_EXTERNAL))\n \t\tpgm = NULL;\n \telse {\n@@ -2400,6 +2399,16 @@ static void run_diff_cmd(const char *pgm,\n \t\t\tpgm = drv->external;\n \t}\n \n+\tif (msg) {\n+\t\t/*\n+\t\t * don't use colors when the header is intended for an\n+\t\t * external diff driver\n+\t\t */\n+\t\tfill_metainfo(msg, name, other, one, two, o, p,\n+\t\t\t      DIFF_OPT_TST(o, COLOR_DIFF) && !pgm);\n+\t\txfrm_msg = msg->len ? msg->buf : NULL;\n+\t}\n+\n \tif (pgm) {\n \t\trun_external_diff(pgm, name, other, one, two, xfrm_msg,\n \t\t\t\t  complete_rewrite);\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142338","messageId":"1274853674-18521-95-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 095/104] Fix \"Out of memory? mmap failed\" for files larger than 4GB on Windows","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:05Z","receivedAt":"2010-05-26T06:01:05Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Ian McLean <ian.mclean@gmail.com>\n\nThe git_mmap implementation was broken for file sizes that wouldn't fit\ninto a size_t (32 bits).  This was caused by intermediate variables that\nwere only 32 bits wide when they should be 64 bits.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n compat/win32mmap.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/compat/win32mmap.c b/compat/win32mmap.c\nindex 1c5a149..b58aa69 100644\n--- a/compat/win32mmap.c\n+++ b/compat/win32mmap.c\n@@ -4,19 +4,19 @@ void *git_mmap(void *start, size_t length, int prot, int flags, int fd, off_t of\n {\n \tHANDLE hmap;\n \tvoid *temp;\n-\tsize_t len;\n+\toff_t len;\n \tstruct stat st;\n \tuint64_t o = offset;\n \tuint32_t l = o & 0xFFFFFFFF;\n \tuint32_t h = (o >> 32) & 0xFFFFFFFF;\n \n \tif (!fstat(fd, &st))\n-\t\tlen = xsize_t(st.st_size);\n+\t\tlen = st.st_size;\n \telse\n \t\tdie(\"mmap: could not determine filesize\");\n \n \tif ((length + offset) > len)\n-\t\tlength = len - offset;\n+\t\tlength = xsize_t(len - offset);\n \n \tif (!(flags & MAP_PRIVATE))\n \t\tdie(\"Invalid usage of mmap when built with USE_WIN32_MMAP\");\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142322","messageId":"1274853674-18521-96-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 096/104] start_command: close cmd->err descriptor when fork/spawn fails","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:06Z","receivedAt":"2010-05-26T06:01:06Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: bert Dvornik <dvornik+git@gmail.com>\n\nFix the problem where the cmd->err passed into start_command wasn't\nbeing properly closed when certain types of errors occurr.  (Compare\nthe affected code with the clean shutdown code later in the function.)\n\nOn Windows, this problem would be triggered if mingw_spawnvpe()\nfailed, which would happen if the command to be executed was malformed\n(e.g. a text file that didn't start with a #! line).  If cmd->err was\na pipe, the failure to close it could result in a hang while the other\nside was waiting (forever) for either input or pipe close, e.g. while\ntrying to shove the output into the side band.  On msysGit, this\nproblem was causing a hang in t5516-fetch-push.\n\n[J6t: With a slight adjustment of the test case, the hang is also\nobserved on Linux.]\n\nSigned-off-by: bert Dvornik <dvornik+git@gmail.com>\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n run-command.c         |    2 ++\n t/t5516-fetch-push.sh |    2 +-\n 2 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/run-command.c b/run-command.c\nindex eb5c575..c7793f5 100644\n--- a/run-command.c\n+++ b/run-command.c\n@@ -383,6 +383,8 @@ fail_pipe:\n \t\t\tclose(cmd->out);\n \t\tif (need_err)\n \t\t\tclose_pair(fderr);\n+\t\telse if (cmd->err)\n+\t\t\tclose(cmd->err);\n \t\terrno = failed_errno;\n \t\treturn -1;\n \t}\ndiff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh\nindex 2de98e6..6a37a4d 100755\n--- a/t/t5516-fetch-push.sh\n+++ b/t/t5516-fetch-push.sh\n@@ -528,7 +528,7 @@ test_expect_success 'push does not update local refs on failure' '\n \tmk_test heads/master &&\n \tmk_child child &&\n \tmkdir testrepo/.git/hooks &&\n-\techo exit 1 >testrepo/.git/hooks/pre-receive &&\n+\techo \"#!/no/frobnication/today\" >testrepo/.git/hooks/pre-receive &&\n \tchmod +x testrepo/.git/hooks/pre-receive &&\n \t(cd child &&\n \t\tgit pull .. master\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142333","messageId":"1274853674-18521-97-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 097/104] Fix checkout of large files to network shares on Windows XP","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:07Z","receivedAt":"2010-05-26T06:01:07Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: René Scharfe <rene.scharfe@lsrfire.ath.cx>\n\nBigger writes to network drives on Windows XP fail.  Cap them at 31MB to\nallow them to succeed.  Callers need to be prepared for write() calls\nthat do less work than requested anyway.\n\nOn local drives, write() calls are translated to WriteFile() calls with\na cap of 64KB on Windows XP and 256KB on Vista.  Thus a cap of 31MB won't\naffect the number of WriteFile() calls which do the actual work.  There's\nstill room for some other version of Windows to use a chunk size of 1MB\nwithout increasing the number of system calls.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n compat/mingw.c       |   17 +++++++++++++++++\n compat/mingw.h       |    3 +++\n t/t5705-clone-2gb.sh |   12 +++++++++---\n 3 files changed, 29 insertions(+), 3 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex f90a114..9a8e336 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -140,6 +140,23 @@ int mingw_open (const char *filename, int oflags, ...)\n \treturn fd;\n }\n \n+#undef write\n+ssize_t mingw_write(int fd, const void *buf, size_t count)\n+{\n+\t/*\n+\t * While write() calls to a file on a local disk are translated\n+\t * into WriteFile() calls with a maximum size of 64KB on Windows\n+\t * XP and 256KB on Vista, no such cap is placed on writes to\n+\t * files over the network on Windows XP.  Unfortunately, there\n+\t * seems to be a limit of 32MB-28KB on X64 and 64MB-32KB on x86;\n+\t * bigger writes fail on Windows XP.\n+\t * So we cap to a nice 31MB here to avoid write failures over\n+\t * the net without changing the number of WriteFile() calls in\n+\t * the local case.\n+\t */\n+\treturn write(fd, buf, min(count, 31 * 1024 * 1024));\n+}\n+\n #undef fopen\n FILE *mingw_fopen (const char *filename, const char *otype)\n {\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 7c2ab64..0e3e743 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -170,6 +170,9 @@ int link(const char *oldpath, const char *newpath);\n int mingw_open (const char *filename, int oflags, ...);\n #define open mingw_open\n \n+ssize_t mingw_write(int fd, const void *buf, size_t count);\n+#define write mingw_write\n+\n FILE *mingw_fopen (const char *filename, const char *otype);\n #define fopen mingw_fopen\n \ndiff --git a/t/t5705-clone-2gb.sh b/t/t5705-clone-2gb.sh\nindex adfaae8..8afbdd4 100755\n--- a/t/t5705-clone-2gb.sh\n+++ b/t/t5705-clone-2gb.sh\n@@ -12,7 +12,7 @@ test_expect_success 'setup' '\n \n \tgit config pack.compression 0 &&\n \tgit config pack.depth 0 &&\n-\tblobsize=$((20*1024*1024)) &&\n+\tblobsize=$((100*1024*1024)) &&\n \tblobcount=$((2*1024*1024*1024/$blobsize+1)) &&\n \ti=1 &&\n \t(while test $i -le $blobcount\n@@ -36,9 +36,15 @@ test_expect_success 'setup' '\n \n '\n \n-test_expect_success 'clone' '\n+test_expect_success 'clone - bare' '\n \n-\tgit clone --bare --no-hardlinks . clone\n+\tgit clone --bare --no-hardlinks . clone-bare\n+\n+'\n+\n+test_expect_success 'clone - with worktree, file:// protocol' '\n+\n+\tgit clone file://. clone-wt\n \n '\n \n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142325","messageId":"1274853674-18521-98-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 098/104] mingw: use _commit to implement fsync","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:08Z","receivedAt":"2010-05-26T06:01:08Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Erik Faye-Lund <kusmabite@googlemail.com>\n\nSigned-off-by: Erik Faye-Lund <kusmabite@gmail.com>\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n compat/mingw.h |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 0e3e743..f465566 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -80,7 +80,7 @@ static inline int fork(void)\n static inline unsigned int alarm(unsigned int seconds)\n { return 0; }\n static inline int fsync(int fd)\n-{ return 0; }\n+{ return _commit(fd); }\n static inline int getppid(void)\n { return 1; }\n static inline void sync(void)\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142331","messageId":"1274853674-18521-99-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 099/104] Recent MinGW has a C99 implementation of snprintf functions","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:09Z","receivedAt":"2010-05-26T06:01:09Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nStarting with MinGW 3.14, released end of 2007, a working snprintf\nis available. This means we do not need our own replacement that works\naround the broken implementation in Microsoft's C runtime.\n\nPeople who build git in an old MinGW environment are expected to set\nSNPRINTF_RETURNS_BOGUS in their config.mak. msysgit is sufficiently\nrecent, of course.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Makefile |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex eb1d162..7a014b1 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1026,7 +1026,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tNO_STRTOUMAX = YesPlease\n \tNO_MKDTEMP = YesPlease\n \tNO_MKSTEMPS = YesPlease\n-\tSNPRINTF_RETURNS_BOGUS = YesPlease\n \tNO_SVN_TESTS = YesPlease\n \tNO_PERL_MAKEMAKER = YesPlease\n \tRUNTIME_PREFIX = YesPlease\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142339","messageId":"1274853674-18521-100-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 100/104] Complete prototype of git_config_from_parameters()","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:10Z","receivedAt":"2010-05-26T06:01:10Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Thomas Rast <trast@student.ethz.ch>\n\nAdd the missing argument list.  (Its lack triggered a compiler warning\nfor me.)\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\nAcked-by: Alex Riesen <raa.lkml@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n cache.h |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/cache.h b/cache.h\nindex 4a0c75d..73f0f7b 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -933,7 +933,7 @@ typedef int (*config_fn_t)(const char *, const char *, void *);\n extern int git_default_config(const char *, const char *, void *);\n extern int git_config_from_file(config_fn_t fn, const char *, void *);\n extern int git_config_parse_parameter(const char *text);\n-extern int git_config_from_parameters();\n+extern int git_config_from_parameters(config_fn_t fn, void *data);\n extern int git_config(config_fn_t fn, void *);\n extern int git_parse_ulong(const char *, unsigned long *);\n extern int git_config_int(const char *, const char *);\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142323","messageId":"1274853674-18521-101-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 101/104] test get_git_work_tree() return value for NULL","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:11Z","receivedAt":"2010-05-26T06:01:11Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Clemens Buchacher <drizzd@aon.at>\n\nIf we are in a git directory, get_git_work_tree() can return NULL.\nWhile trying to determine whether or not the given paths are outside\nthe work tree, the following command would read from it anyways and\ntrigger a segmentation fault.\n\n git diff / /\n\nSigned-off-by: Clemens Buchacher <drizzd@aon.at>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n diff-no-index.c |    6 ++----\n 1 files changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/diff-no-index.c b/diff-no-index.c\nindex aae8e7a..4cd9dac 100644\n--- a/diff-no-index.c\n+++ b/diff-no-index.c\n@@ -150,16 +150,14 @@ static int queue_diff(struct diff_options *o,\n \n static int path_outside_repo(const char *path)\n {\n-\t/*\n-\t * We have already done setup_git_directory_gently() so we\n-\t * know we are inside a git work tree already.\n-\t */\n \tconst char *work_tree;\n \tsize_t len;\n \n \tif (!is_absolute_path(path))\n \t\treturn 0;\n \twork_tree = get_git_work_tree();\n+\tif (!work_tree)\n+\t\treturn 1;\n \tlen = strlen(work_tree);\n \tif (strncmp(path, work_tree, len) ||\n \t    (path[len] != '\\0' && path[len] != '/'))\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142341","messageId":"1274853674-18521-102-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 102/104] t7502-commit: fix spelling","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:12Z","receivedAt":"2010-05-26T06:01:12Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Tay Ray Chuan <rctay89@gmail.com>\n\ns/subdirecotry/subdirectory/\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t7502-commit.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t7502-commit.sh b/t/t7502-commit.sh\nindex 844fb43..9504466 100755\n--- a/t/t7502-commit.sh\n+++ b/t/t7502-commit.sh\n@@ -35,7 +35,7 @@ test_expect_success 'partial' '\n \n '\n \n-test_expect_success 'partial modification in a subdirecotry' '\n+test_expect_success 'partial modification in a subdirectory' '\n \n \ttest_tick &&\n \tgit commit -m \"partial commit to subdirectory\" not &&\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142340","messageId":"1274853674-18521-103-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 103/104] show-branch: use DEFAULT_ABBREV instead of 7","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:13Z","receivedAt":"2010-05-26T06:01:13Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Tay Ray Chuan <rctay89@gmail.com>\n\nSigned-off-by: Tay Ray Chuan <rctay89@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n builtin/show-branch.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/show-branch.c b/builtin/show-branch.c\nindex e20fcf3..e8719aa 100644\n--- a/builtin/show-branch.c\n+++ b/builtin/show-branch.c\n@@ -313,7 +313,8 @@ static void show_one_commit(struct commit *commit, int no_name)\n \t\t}\n \t\telse\n \t\t\tprintf(\"[%s] \",\n-\t\t\t       find_unique_abbrev(commit->object.sha1, 7));\n+\t\t\t       find_unique_abbrev(commit->object.sha1,\n+\t\t\t\t\t\t  DEFAULT_ABBREV));\n \t}\n \tputs(pretty_str);\n \tstrbuf_release(&pretty);\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142336","messageId":"1274853674-18521-104-git-send-email-sam.vilain@catalyst.net.nz","threadId":"23908","inReplyTo":"1274853674-18521-1-git-send-email-sam.vilain@catalyst.net.nz","subject":"[PATCH 104/104] Documentation/SubmittingPatches: clarify GMail section and SMTP","fromName":"Sam Vilain","fromEmail":"sam.vilain@catalyst.net.nz","sentAt":"2010-05-26T06:01:14Z","receivedAt":"2010-05-26T06:01:14Z","isPatch":true,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"From: Michael J Gruber <git@drmicha.warpmail.net>\n\nWe keep getting mangled submissions from GMail's web interface. Try to\nbe more proactive in SubmittingPatches by\n\n- pointing to MUA specific instructions early on,\n- structuring the GMail section more clearly,\n- putting send-email/SMTP before imap-send/IMAP.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/SubmittingPatches |   40 ++++++++++++++++++++------------------\n 1 files changed, 21 insertions(+), 19 deletions(-)\n\ndiff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches\nindex abc65de..22e3808 100644\n--- a/Documentation/SubmittingPatches\n+++ b/Documentation/SubmittingPatches\n@@ -41,6 +41,7 @@ Checklist (and a short version for the impatient):\n \t  maintainer (gitster@pobox.com) if (and only if) the patch\n \t  is ready for inclusion. If you use git-send-email(1),\n \t  please test it first by sending email to yourself.\n+\t- see below for instructions specific to your mailer\n \n Long version:\n \n@@ -519,9 +520,27 @@ Gmail\n \n GMail does not appear to have any way to turn off line wrapping in the web\n interface, so this will mangle any emails that you send.  You can however\n-use any IMAP email client to connect to the google imap server, and forward\n+use \"git send e-mail\" and send your patches through the GMail SMTP server, or\n+use any IMAP email client to connect to the google IMAP server and forward\n the emails through that.\n \n+To use \"git send-email\" and send your patches through the GMail SMTP server,\n+edit ~/.gitconfig to specify your account settings:\n+\n+[sendemail]\n+\tsmtpencryption = tls\n+\tsmtpserver = smtp.gmail.com\n+\tsmtpuser = user@gmail.com\n+\tsmtppass = p4ssw0rd\n+\tsmtpserverport = 587\n+\n+Once your commits are ready to be sent to the mailing list, run the\n+following commands:\n+\n+  $ git format-patch --cover-letter -M origin/master -o outgoing/\n+  $ edit outgoing/0000-*\n+  $ git send-email outgoing/*\n+\n To submit using the IMAP interface, first, edit your ~/.gitconfig to specify your\n account settings:\n \n@@ -537,8 +556,7 @@ You might need to instead use: folder = \"[Google Mail]/Drafts\" if you get an err\n that the \"Folder doesn't exist\".\n \n Once your commits are ready to be sent to the mailing list, run the\n-following command to send the patch emails to your Gmail Drafts\n-folder.\n+following commands:\n \n   $ git format-patch --cover-letter -M --stdout origin/master | git imap-send\n \n@@ -546,19 +564,3 @@ Just make sure to disable line wrapping in the email client (GMail web\n interface will line wrap no matter what, so you need to use a real\n IMAP client).\n \n-Alternatively, you can use \"git send-email\" and send your patches\n-through the GMail SMTP server.  edit ~/.gitconfig to specify your\n-account settings:\n-\n-[sendemail]\n-\tsmtpencryption = tls\n-\tsmtpserver = smtp.gmail.com\n-\tsmtpuser = user@gmail.com\n-\tsmtppass = p4ssw0rd\n-\tsmtpserverport = 587\n-\n-Once your commits are ready to be sent to the mailing list, run the\n-following commands:\n-\n-  $ git format-patch --cover-letter -M origin/master -o outgoing/\n-  $ git send-email outgoing/*\n-- \n1.7.1.rc2.333.gb2668\n"},{"id":"142349","messageId":"AANLkTinhtH5ySZvScEo_Kjr707BwEPQNYBcBhc_WLIsc@mail.gmail.com","threadId":"23908","inReplyTo":"1274853674-18521-22-git-send-email-sam.vilain@catalyst.net.nz","subject":"Re: [PATCH 022/104] Gitweb: ignore built file","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-05-26T07:46:46Z","receivedAt":"2010-05-26T07:46:46Z","isPatch":true,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Wed, May 26, 2010 at 07:59, Sam Vilain <sam.vilain@catalyst.net.nz> wrote:\n> From: Sverre Rabbelier <srabbelier@gmail.com>\n\nI think this is in git.git already, somewhere? Also, what's up with\nthe 022/104? ;)\n\nhttp://repo.or.cz/w/git.git/commit/493429b89600daf43a818701ba7011b8e538f7b0\n\n-- \nCheers,\n\nSverre Rabbelier\n"}]}