Re: [PATCH v2 14/19] tree-diff: rework diff_tree interface to be sha1 based

2014-03-24 Thread Junio C Hamano
Kirill Smelkov k...@mns.spb.ru writes: The downside is that try_to_follow_renames(), if active, we cause re-reading of 2 initial trees, which was negligible based on my timings, That would depend on how often the codepath triggered in your test case, but is totally understandable. It fires

Re: [PATCH v2 16/19] tree-diff: reuse base str(buf) memory on sub-tree recursion

2014-03-24 Thread Junio C Hamano
Kirill Smelkov k...@mns.spb.ru writes: instead of allocating it all the time for every subtree in __diff_tree_sha1, let's allocate it once in diff_tree_sha1, and then all callee just use it in stacking style, without memory allocations. This should be faster, and for me this change gives the

Re: [PATCH 17/19] Portable alloca for Git

2014-03-24 Thread Junio C Hamano
Kirill Smelkov k...@mns.spb.ru writes: On Fri, Feb 28, 2014 at 06:19:58PM +0100, Erik Faye-Lund wrote: On Fri, Feb 28, 2014 at 6:00 PM, Kirill Smelkov k...@mns.spb.ru wrote: ... In fact that would be maybe preferred, for maintainers to enable alloca with knowledge and testing, as one

Re: [PATCH 03/12] t: drop useless sane_unset GIT_* calls

2014-03-24 Thread Junio C Hamano
Jeff King p...@peff.net writes: I do not have a problem with that, as it implicitly covers all of the tests following it. I do not think it is particularly necessary, though. Assuming we start with a known test environment and avoiding polluting it for further tests are basic principles of

Re: [PATCH 03/10] t4209: factor out helper function test_log_icase()

2014-03-24 Thread Junio C Hamano
René Scharfe l@web.de writes: Am 24.03.2014 22:10, schrieb Jeff King: On Mon, Mar 24, 2014 at 11:22:30AM -0700, Junio C Hamano wrote: +test_log_icase() { + test_log $@ --regexp-ignore-case + test_log $@ -i -cascade broken? Will squash in an obvious fix. I don't think so

Re: Git push race condition?

2014-03-24 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: What you describe really looks like a force-push, or a hook doing a ref update (e.g. a hook on a dev branch that updates master if the code passes tests or so). ... or a filesystem that is broken. But I thought this is just a plain-vanilla

Re: [PATCH] builtin/apply.c: use iswspace() to detect line-ending-like chars

2014-03-24 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: -while ((*last1 == '\r') || (*last1 == '\n')) +while (iswspace(*last1)) last1--; -while ((*last2 == '\r') || (*last2 == '\n')) +while (iswspace(*last2)) last2--; /* skip leading whitespace */

Re: [PATCH 03/12] t: drop useless sane_unset GIT_* calls

2014-03-24 Thread Junio C Hamano
Jeff King p...@peff.net writes: Hmph. I am looking at git show HEAD^:t/t0001-init.sh after applying this patch, and it does look consistently done with GIT_CONFIG and GIT_DIR (I am not sure about GIT_WORK_TREE but from a cursory read it is done consistently for tests on non-bare

Re: [RFC/PATCH] Better control of the tests run by a test suite

2014-03-24 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Mar 24, 2014 at 01:49:44AM -0700, Ilya Bobyr wrote: Here are some examples of how functionality added by the patch could be used. In order to run setup tests and then only a specific test (use case 1) one can do: $ ./t-init.sh --run='1 2

Re: [PATCH] Allow --pretty to be passed to git-describe.

2014-03-24 Thread Junio C Hamano
Cyril Roelandt tipec...@gmail.com writes: In some cases, ony may want to find the the most recent tag that is reachable from a commit and have it pretty printed, using the formatting options available in git-log and git-show. Sorry, but I do not understand the motivation I can read from

Re: [PATCH 000/144] Use the $( ... ) construct for command substitution instead of using the back-quotes

2014-03-25 Thread Junio C Hamano
Elia Pinto gitter.spi...@gmail.com writes: The patch is simple but involves a large number of files with different authors. Being simple I think it is wasteful to cc a large number of different people for doing a review. We'd somehow need a way to parallelize the reviews, though. Being

Re: What's cooking in git.git (Mar 2014, #05; Mon, 24)

2014-03-25 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: On 03/24/2014 09:27 PM, Junio C Hamano wrote: [...] * an/branch-config-message (2014-03-24) 1 commit - branch.c: install_branch_config: simplify if chain Will merge to 'next'. The Signed-off-by line in this commit shows the name as only

Re: Borrowing objects from nearby repositories

2014-03-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason ava...@gmail.com writes: 1) Introduce '--borrow' to `git-fetch`. This would behave similarly to '--reference', except that it operates on a temporary basis, and does not assume that the reference repository will exist after the operation completes, so any used objects

Re: [PATCH v3] Clarify pre-push hook documentation

2014-03-25 Thread Junio C Hamano
David Cowden dco...@gmail.com writes: The documentation as-is does not mention that the pre-push hook is executed even when there is nothing to push. This can lead a new reader to believe there will always be lines fed to the script's standard input and cause minor confusion as to what is

Re: [PATCH 1/3] test-lib: Document short options in t/README

2014-03-25 Thread Junio C Hamano
Ilya Bobyr ilya.bo...@gmail.com writes: On 3/24/2014 4:39 AM, Ramsay Jones wrote: On 24/03/14 08:49, Ilya Bobyr wrote: Most arguments that could be provided to a test have short forms. Unless documented the only way to learn then is to read the code. Signed-off-by: Ilya Bobyr

Re: [PATCH 12/19] tree-diff: remove special-case diff-emitting code for empty-tree cases

2014-03-25 Thread Junio C Hamano
Kirill Smelkov k...@navytux.spb.ru writes: static int tree_entry_pathcmp(struct tree_desc *t1, struct tree_desc *t2) { struct name_entry *e1, *e2; int cmp; + if (!t1-size) + return t2-size ? +1 /* +∞ c */ : 0 /* +∞ = +∞ */; + else if (!t2-size) +

Re: [PATCH v2 14/19] tree-diff: rework diff_tree interface to be sha1 based

2014-03-25 Thread Junio C Hamano
Kirill Smelkov k...@navytux.spb.ru writes: What are the downsides of __ prefix by the way? Aren't these names reserved for compiler/runtime implementations? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH v2 000/142] Use the $( ... ) construct for command substitution instead of using the back-quotes

2014-03-25 Thread Junio C Hamano
Elia Pinto gitter.spi...@gmail.com writes: This is a second reroll after the Matthieu Moy review. Changes from v1: - Dropped the silly patches to t6111-rev-list-treesame.sh, t0204-gettext-reencode-sanity.sh. - Simple reformatting of the commit message. - added the toy script used for

Re: [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution

2014-03-25 Thread Junio C Hamano
Elia Pinto gitter.spi...@gmail.com writes: The Git CodingGuidelines prefer the $( ... ) construct for command substitution instead of using the back-quotes, or grave accents (`..`). The backquoted form is the historical method for command substitution, and is supported by POSIX. However, all

Re: [PATCH v2 009/142] t0001-init.sh: use the $( ... ) construct for command substitution

2014-03-25 Thread Junio C Hamano
This conflicts with a topic in flight. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

What's cooking in git.git (Mar 2014, #06; Tue, 25)

2014-03-25 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. More topics merged to 'master', many of which are fallouts from GSoC microprojects. You can find the changes described here in the integration

Re: [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution

2014-03-25 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Elia Pinto gitter.spi...@gmail.com writes: The Git CodingGuidelines prefer the $( ... ) construct for command substitution instead of using the back-quotes, or grave accents (`..`). The backquoted form is the historical method for command

Re: [PATCH v2 001/142] check-builtins.sh: use the $( ... ) construct for command substitution

2014-03-25 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: I've reworded the above like so: check-builtins.sh: use the $(...) construct for command substitution The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes, or grave accents

Re: [RFC/PATCH 1/4] test-lib: add test_dir_is_empty()

2014-03-25 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: For the upcoming submodule test framework we often need to assert that an empty directory exists in the work tree. Add the test_dir_is_empty() function which asserts that the given argument is an empty directory. Signed-off-by: Jens Lehmann

Re: [PATCH 12/19] tree-diff: remove special-case diff-emitting code for empty-tree cases

2014-03-25 Thread Junio C Hamano
Kirill Smelkov k...@navytux.spb.ru writes: On Mon, Mar 24, 2014 at 02:18:10PM -0700, Junio C Hamano wrote: Kirill Smelkov k...@mns.spb.ru writes: via teaching tree_entry_pathcmp() how to compare empty tree descriptors: Drop this line, as you explain the pretend empty compares bigger

Re: Borrowing objects from nearby repositories

2014-03-25 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Ævar Arnfjörð Bjarmason ava...@gmail.com writes: 1) Introduce '--borrow' to `git-fetch`. This would behave similarly to '--reference', except that it operates on a temporary basis, and does not assume that the reference repository will exist after

Re: [PATCH v4 2/2] log: add --show-linear-break to help see non-linear history

2014-03-25 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: Option explanation is in rev-list-options.txt. The interaction with -z is left undecided. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- On Fri, Mar 21, 2014 at 2:15 AM, Junio C Hamano gits...@pobox.com wrote: * Get rid

Re: Borrowing objects from nearby repositories

2014-03-26 Thread Junio C Hamano
Andrew Keller and...@kellerfarm.com writes: On Mar 25, 2014, at 6:17 PM, Junio C Hamano gits...@pobox.com wrote: ... I think that the standard practice with the existing toolset is to clone with reference and then repack. That is: $ git clone --reference borrowee git://over/there mine

Re: [PATCH/RFC 0/6] reuse deltas found by bitmaps

2014-03-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: 2. When considering whether a delta can be reused, check the bitmaps to see if the client has the base. If so, allow reuse. ... The implementation I'm including here is the one I've shown before, which does (2). Part of the reason that I'm reposting it

Re: [PATCH] builtin/apply.c: use iswspace() to detect line-ending-like chars

2014-03-26 Thread Junio C Hamano
George Papanikolaou g3orge@gmail.com writes: On Tue, Mar 25, 2014 at 6:54 AM, Junio C Hamano gits...@pobox.com wrote: As a tangent, I have a suspicion that the current implementation may be wrong at the beginning of the string. Wouldn't it match abc and abc, even though these two

Re: [PATCH 5/5] log: do not segfault on gmtime errors

2014-03-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Wed, Mar 26, 2014 at 11:05:59AM +, Charles Bailey wrote: On Mon, Feb 24, 2014 at 02:49:05AM -0500, Jeff King wrote: +# date is within 2^63-1, but enough to choke glibc's gmtime +test_expect_success 'absurdly far-in-future dates produce sentinel' ' +

Re: [PATCH] t4212: handle systems with post-apocalyptic gmtime

2014-03-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: +cmp_one_of () { + for candidate in $@; do Style ;-) + echo $candidate expect + test_cmp expect actual + return 0 + done + return 1 +} It actually may be easier to understand if you write a trivial case

Re: [PATCH 5/5] log: do not segfault on gmtime errors

2014-03-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Wed, Mar 26, 2014 at 11:58:49AM -0700, Junio C Hamano wrote: Unlike the FreeBSD thing that René brought up, this is not a problem in the code, but just in the test. So I think our options are basically: 1. Scrap the test as unportable. 2. Hard

Re: [PATCH v3 18/25] setup.c: support multi-checkout repo setup

2014-03-26 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Tue, Mar 25, 2014 at 08:52:13PM +0700, Duy Nguyen wrote: On Mon, Mar 24, 2014 at 9:52 PM, Torsten Bögershausen tbo...@web.de wrote: Did I report that t1501 fails when there is a softlink in $PWD ? /home/tb/projects is a softlink to /disc5/projects/

[PATCH] apply --ignore-space-change: lines with and without leading whitespaces do not match

2014-03-26 Thread Junio C Hamano
whitespace distributions literally into the patched result. But as long as we keep it, we should make it do its insane thing consistently. Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/apply.c| 12 +++- t/t4107-apply-ignore-whitespace.sh | 12 2

Re: [PATCH v2 14/19] tree-diff: rework diff_tree interface to be sha1 based

2014-03-26 Thread Junio C Hamano
Kirill Smelkov k...@navytux.spb.ru writes: On Tue, Mar 25, 2014 at 10:46:32AM -0700, Junio C Hamano wrote: Kirill Smelkov k...@navytux.spb.ru writes: What are the downsides of __ prefix by the way? Aren't these names reserved for compiler/runtime implementations? Yes

Re: [PATCH/RFC 0/6] reuse deltas found by bitmaps

2014-03-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: Just looking at the 128-day case again, using bitmaps increased our server CPU time _and_ made a much bigger pack. This series not only fixes the CPU time regression, but it also drops the server CPU time to almost nothing. That's a nice improvement, and it

Re: [PATCH 1/6] t/perf-lib: factor boilerplate out of test_perf

2014-03-26 Thread Junio C Hamano
Jeff King p...@peff.net writes: About half of test_perf() is boilerplate, and half is actually related to running the perf test. Let's split it into two functions, so that we can reuse the boilerplate in future commits. Signed-off-by: Jeff King p...@peff.net --- t/perf/perf-lib.sh | 61

Re: [PATCH v8 01/12] Add data structures and basic functions for commit trailers

2014-03-26 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: Subject: Re: [PATCH v8 01/12] Add data structures and basic functions for commit trailers As pointed out many times for GSoC microprojects students, limit the scope with area: prefix for the commit title, e.g. Subject: trailers: add data

Re: [PATCH v8 00/12] Add interpret-trailers builtin

2014-03-26 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: Until now git commit has only supported the well known Signed-off-by: trailer, that is used by many projects like the Linux kernel and Git. It is better to implement features for these trailers first in a new command rather than in

Re: [PATCH v8 03/12] Move lower case functions into wrapper.c

2014-03-26 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: diff --git a/wrapper.c b/wrapper.c index 0cc5636..c46026a 100644 --- a/wrapper.c +++ b/wrapper.c @@ -455,3 +455,17 @@ struct passwd *xgetpwuid_self(void) errno ? strerror(errno) : _(no such user)); return pw; } +

Re: [PATCH 1/3] test-lib: Document short options in t/README

2014-03-27 Thread Junio C Hamano
Ilya Bobyr ilya.bo...@gmail.com writes: If there is decision on how shortening should work for all the options, maybe I could add a paragraph on that and make existing options more consistent. We should strive to make the following from gitcli.txt apply throughout the system: * many

Re: [PATCH/RFC 0/6] reuse deltas found by bitmaps

2014-03-27 Thread Junio C Hamano
Jeff King p...@peff.net writes: But for a small fetch... 5311.3: server (1 days)0.20(0.17+0.03) 4.39(4.03+6.59) +2095.0% 5311.4: size (1 days) 57.2K 59.5K +4.1% 5311.5: client (1 days)0.08(0.08+0.00) 0.08(0.08+0.00) +0.0% Nice ;-) So this

Re: [PATCH v8 03/12] Move lower case functions into wrapper.c

2014-03-27 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: Yeah, but it seems a bit wasteful to allocate memory for a new string, then downcase it, then compare it with strcmp() and then free it, instead of just using strcasecmp() on the original string. I wasn't looking at the caller (and I haven't).

Re: [PATCH] MSVC: added missing include so `make INLINE=__inline` is no longer required

2014-03-27 Thread Junio C Hamano
Marat Radchenko ma...@slonopotamus.org writes: Signed-off-by: Marat Radchenko ma...@slonopotamus.org --- xdiff/xutils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xdiff/xutils.c b/xdiff/xutils.c index 62cb23d..a21a835 100644 --- a/xdiff/xutils.c +++ b/xdiff/xutils.c @@ -23,6

Re: [PATCH 1/3] patch-id: make it stable against hunk reordering

2014-03-27 Thread Junio C Hamano
Michael S. Tsirkin m...@redhat.com writes: Patch id changes if you reorder hunks in a diff. If you reorder hunks, the patch should no longer apply [*1*], so a feature to make patch-id stable across such move would have no practical use ;-), but I am guessing you meant something else. Perhaps

Re: Possible regression in master? (submodules without a master branch)

2014-03-27 Thread Junio C Hamano
Johan Herland jo...@herland.net writes: I just found a failure to checkout a project with submodules where there is no explicit submodule branch configuration, and the submodules happen to not have a master branch: git clone git://gitorious.org/qt/qt5.git qt5 cd qt5 git submodule

Re: Git feature request: Option to force Git to abort a checkout if working directory is dirty (i.e. disregarding the check for conflicts)

2014-03-27 Thread Junio C Hamano
Jonas Bang em...@jonasbang.dk writes: Hi Git developers, This is my first Git feature request, I hope it won’t get me hanged on the gallows ;o) *Git feature request:* Add an option to Git config to configure the criteria for when a git checkout should abort. *Name proposal and

Re: [PATCH 1/3] patch-id: make it stable against hunk reordering

2014-03-27 Thread Junio C Hamano
Michael S. Tsirkin m...@redhat.com writes: I started to remove that code, but then I recalled why I did it like this. There is a good reason. Yes, you can't simply reorder hunks just like this. But you can get the same effect by prefixing the header: Yes, that is one of the things I

Re: Possible regression in master? (submodules without a master branch)

2014-03-27 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: Am 27.03.2014 16:52, schrieb W. Trevor King: On Thu, Mar 27, 2014 at 03:21:49PM +0100, Johan Herland wrote: I just found a failure to checkout a project with submodules where there is no explicit submodule branch configuration, and the submodules

Re: [PATCH v2 14/19] tree-diff: rework diff_tree interface to be sha1 based

2014-03-27 Thread Junio C Hamano
Kirill Smelkov k...@navytux.spb.ru writes: (please keep author email) 8 From: Kirill Smelkov k...@mns.spb.ru Date: Mon, 24 Feb 2014 20:21:46 +0400 Subject: [PATCH v3a] tree-diff: rework diff_tree interface to be sha1 based git am -c will discard everything above the scissors and

Re: Possible regression in master? (submodules without a master branch)

2014-03-27 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: On Thu, Mar 27, 2014 at 06:31:27PM +0100, Jens Lehmann wrote: Am 27.03.2014 18:16, schrieb Junio C Hamano: Johan Herland jo...@herland.net writes: I just found a failure to checkout a project with submodules where there is no explicit submodule

Re: submodule.path.branch vs. submodule.name.branch

2014-03-27 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: [side note] Isn't that a typo of submodule.name.branch? Good catch. The transition from submodule.path.* to submodule.name.* happened in 73b0898d (Teach git submodule add the --name option, 2012-09-30), which landed in v1.8.1-rc0 on 2012-12-03.

Re: [PATCH v8 03/12] Move lower case functions into wrapper.c

2014-03-27 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Christian Couder chrisc...@tuxfamily.org writes: Yeah, but it seems a bit wasteful to allocate memory for a new string, then downcase it, then compare it with strcmp() and then free it, instead of just using strcasecmp() on the original string. I

Re: [PATCH v8 03/12] Move lower case functions into wrapper.c

2014-03-27 Thread Junio C Hamano
Jeff King p...@peff.net writes: All bool config values allow tRuE. I was expecting somebody will bring it up, but think about it. Bool is a very special case. Even among CS folks, depending on your background, true may be True may be TRUE may be 1. Conflating it with some random enum does

Re: Borrowing objects from nearby repositories

2014-03-28 Thread Junio C Hamano
Andrew Keller and...@kellerfarm.com writes: Okay, so to re-frame my idea, like you said, the goal is to find a user- friendly way for the user to tell git-clone to set up the alternates file (or perhaps just use the --alternates parameter), and run a repack, and disconnect the alternate. And

Re: SSL_CTX leak?

2014-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, Mar 27, 2014 at 10:37:07AM -0300, Thiago Farina wrote: Do we leak the context we allocate in imap-send.c:280 intentionally? It was never mentioned on the mailing list when the patches came originally, so I suspect is just an omission. Presumably the

Re: [PATCH] t4212: handle systems with post-apocalyptic gmtime

2014-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: Sat Jan 25 10:46:39 316889355 -0700 9 Wed Sep 6 02:46:39 -1126091476 -0700 99 Thu Oct 24 18:46:39 1623969404 -0700 Thanks. Given the value where it fails, it kind of looks like there is some signed 32-bit value

Re: [RFC] submodule: change submodule.name.branch default from master to HEAD

2014-03-28 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: Am 28.03.2014 04:58, schrieb W. Trevor King: On Thu, Mar 27, 2014 at 08:52:55PM -0700, W. Trevor King wrote: On Thu, Mar 27, 2014 at 11:43:47PM -0400, Eric Sunshine wrote: On Thu, Mar 27, 2014 at 11:36 PM, W. Trevor King wk...@tremily.us wrote:

Re: [PATCH v8 03/12] Move lower case functions into wrapper.c

2014-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: But I also do not overly care. Literally zero people have complained that [log]date = RFC822 is not accepted, so it is probably not a big deal either way. That is most likely because we do not advertise these enum values spelled in random cases in our

Re: [PATCH] gitweb: gpg signature status indication for commits

2014-03-28 Thread Junio C Hamano
Victor Kartashov v.kartas...@npo-echelon.ru writes: show gpg signature (if any) for commit message in gitweb in case of valid signature highlight it with green in case of invalid signature highlight it with red If that is a single sentence, please write it as such: Show gpg signature (if

Re: git commit vs. ignore-submodules

2014-03-28 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: .. but it's less clear if one explicitely stages an updated submodule using git add. Git commit will ignore it anyway, if ignore=all is configured in .gitmodules. Maybe that's correct too That definitely smells like a bug to me. Excluding modified

Re: [PATCH] MSVC: fix t0040-parse-options

2014-03-28 Thread Junio C Hamano
Marat Radchenko ma...@slonopotamus.org writes: Signed-off-by: Marat Radchenko ma...@slonopotamus.org --- test-parse-options.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test-parse-options.c b/test-parse-options.c index 434e8b8..7840493 100644 ---

Re: [PATCH v2 1/3] patch-id: make it stable against hunk reordering

2014-03-28 Thread Junio C Hamano
Michael S. Tsirkin m...@redhat.com writes: Patch id changes if you reorder hunks in a diff. Reording files is fine, and as we discussed, having multiple patches that touch the same path is fine, but do not sound as if you are allowing to reorder hunks inside a single patch that touch a single

Re: [PATCH] MSVC: link in invalidcontinue.obj for better POSIX compatibility

2014-03-28 Thread Junio C Hamano
Marat Radchenko ma...@slonopotamus.org writes: This patch fixes crashes caused by quitting from PAGER. Can you elaborate a bit more on the underlying cause, summarizing what you learned from this discussion, so that those who read git log output two weeks from now do not have to come back to

Re: [PATCH] t4212: handle systems with post-apocalyptic gmtime

2014-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Fri, Mar 28, 2014 at 09:41:53AM -0700, Junio C Hamano wrote: Offhand, the three possible failure modes this thread identified sounds to me like the only plausible ones, and I think the best way forward might be to - teach the is the result sane, even

Re: [PATCH] MSVC: link in invalidcontinue.obj for better POSIX compatibility

2014-03-28 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Marat Radchenko ma...@slonopotamus.org writes: This patch fixes crashes caused by quitting from PAGER. Can you elaborate a bit more on the underlying cause, summarizing what you learned from this discussion, so that those who read git log output two

Re: [PATCH v2 1/3] patch-id: make it stable against hunk reordering

2014-03-28 Thread Junio C Hamano
Michael S. Tsirkin m...@redhat.com writes: Patch id changes if you reorder hunks in a diff. As the result is functionally equivalent, this is surprising to many people. In particular, reordering hunks is helpful to make patches more readable (e.g. API header diff before implementation diff).

Re: [PATCH] t4212: handle systems with post-apocalyptic gmtime

2014-03-28 Thread Junio C Hamano
Jeff King p...@peff.net writes: This (non-)issue has consumed a lot more brain power than it is probably worth. I'd like to figure out which patch to go with and be done. :) Let's just deal with a simple known cases (like FreeBSD) in the real code that everybody exercises at runtime, and have

Re: [PATCH v2 14/19] tree-diff: rework diff_tree interface to be sha1 based

2014-03-28 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: My reading of git-send-email is: * $time = time - scalar $#files prepares the initial timestamp, so that running two git send-email back to back will give timestamps to the series sent out by the first invocation that are older than the ones

Re: [PATCH v2] MSVC: link in invalidcontinue.obj for better POSIX compatibility

2014-03-28 Thread Junio C Hamano
Marat Radchenko ma...@slonopotamus.org writes: By default, Windows abort()'s instead of setting errno=EINVAL when invalid arguments are passed to standard functions. For example, when PAGER quits and git detects it with errno=EPIPE on write(), check_pipe() in write_or_die.c tries

Re: [PATCH v2 1/3] patch-id: make it stable against hunk reordering

2014-03-28 Thread Junio C Hamano
Michael S. Tsirkin m...@redhat.com writes: +static void flush_one_hunk(unsigned char *result, git_SHA_CTX *ctx) { - int patchlen = 0, found_next = 0; + unsigned char hash[20]; + unsigned short carry = 0; + int i; + + git_SHA1_Final(hash, ctx); +

What's cooking in git.git (Mar 2014, #07; Fri, 28)

2014-03-28 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. More topics merged to 'master', many of which are fallouts from GSoC microprojects. You can find the changes described here in the integration

Re: [PATCH v2 1/3] patch-id: make it stable against hunk reordering

2014-03-28 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: @@ -99,6 +116,18 @@ static int get_one_patchid(unsigned char *next_sha1, git_SHA_CTX *ctx, struct st if (!memcmp(line, @@ -, 4)) { /* Parse next hunk, but ignore line numbers

Re: [PATCH v3] MSVC: fix t0040-parse-options crash

2014-03-29 Thread Junio C Hamano
Marat Radchenko ma...@slonopotamus.org writes: On 64-bit MSVC, pointers are 64 bit but `long` is only 32. Thus, casting string to `unsigned long`, which is redundand on other platforms, throws away important bits and when later cast to `intptr_t` results in corrupt pointer. This patch fixes

Re: Git feature request: Option to force Git to abort a checkout if working directory is dirty (i.e. disregarding the check for conflicts)

2014-03-31 Thread Junio C Hamano
Jonas Bang em...@jonasbang.dk writes: For some people it is also a norm to keep files that have been modified from HEAD and/or index without committing for a long time (e.g. earlier, Linus said that the version in Makefile is updated and kept modified in the working tree long before a new

Re: [PATCH 3/3] test-lib: '--run' to run only specific tests

2014-03-31 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: Since the relational operators are fairly self-explanatory, you could drop the prose explanation, though that might make it too cryptic: A number prefixed with '', '=', '', or '=' matches test numbers meeting the specified relation. I

Re: [PATCH 1/2] commit: add --ignore-submodules[=when] parameter

2014-03-31 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: Changes in add.c and cache.h (and related compilo fix in checkout.c) are needed to make it work for commit -a too. Looking good so far, but we definitely need tests for this new option. But I wonder if it would make more sense to start by teaching

Re: [PATCH v4 2/3] parse-options: add cast to correct pointer type to OPT_SET_PTR

2014-03-31 Thread Junio C Hamano
. --- Signed-off-by (and probably From: too): Junio C Hamano gits...@pobox.com ;-) parse-options.h | 2 +- test-parse-options.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parse-options.h b/parse-options.h index 8fa02dc..54099d9 100644 --- a/parse-options.h +++ b/parse

Re: [PATCH v4 0/3] Take four on fixing OPT_SET_PTR issues

2014-03-31 Thread Junio C Hamano
Marat Radchenko ma...@slonopotamus.org writes: Patches summary: 1. Fix initial issue (incorrect cast causing crash on 64-bit MSVC) 2. Improve OPT_SET_PTR to prevent same errors in future 3. Purge OPT_SET_PTR away since nobody uses it *Optional* patch №3 is separated from №1 and №2 so that

Re: [PATCH 2/2] Don't rely on strerror text when testing rmdir failure

2014-03-31 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: Am 29.03.2014 16:39, schrieb Charles Bailey: AIX doesn't make a distiction between EEXIST and ENOTEMPTY so relying on the strerror string for the rmdir failure is fragile. Just test that the start of the string matches the Git controlled failed to

Re: Bug report: Git 1.8 on Ubuntu 13.10 refs not valid

2014-03-31 Thread Junio C Hamano
Jeff King p...@peff.net writes: That being said, git _could_ be more liberal in accepting a content-type with parameters (even though it does not know about any parameters, and charset here is completely meaningless). I have mixed feelings on that. It may be just a matter of replacing

Re: Odd git diff breakage

2014-03-31 Thread Junio C Hamano
Linus Torvalds torva...@linux-foundation.org writes: I hit this oddity when not remembering the right syntax for --color-words.. Try this (outside of a git repository): touch a b git diff -u --color=words a b and watch it scroll (infinitely) printing out error: option `color'

Re: Odd git diff breakage

2014-03-31 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Linus Torvalds torva...@linux-foundation.org writes: I hit this oddity when not remembering the right syntax for --color-words.. Try this (outside of a git repository): touch a b git diff -u --color=words a b and watch it scroll (infinitely

[PATCH] diff-no-index: correctly diagnose error return from diff_opt_parse()

2014-03-31 Thread Junio C Hamano
... Instead, make it act like so: $ git diff --no-index --color=words a b error: option `color' expects always, auto, or never fatal: invalid diff option/value: --color=words Reported-by: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Junio C Hamano gits...@pobox.com

Re: [PATCH v3 2/3] patch-id: document new behaviour

2014-03-31 Thread Junio C Hamano
Michael S. Tsirkin m...@redhat.com writes: Clarify that patch ID is now a sum of hashes, not a hash. Document --stable and --unstable flags. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- changes from v2: explicitly list the kinds of changes against which patch ID is stable

Re: [PATCH v3 3/3] patch-id-test: test --stable and --unstable flags

2014-03-31 Thread Junio C Hamano
Michael S. Tsirkin m...@redhat.com writes: Verify that patch ID is now stable against diff split and reordering. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Changes from v2: added test to verify patch ID is stable against diff splitting t/t4204-patch-id.sh | 117

Re: [PATCH v3 1/3] patch-id: make it stable against hunk reordering

2014-03-31 Thread Junio C Hamano
Michael S. Tsirkin m...@redhat.com writes: though it does look like an unrelated enhancement to me. Agree? Yes, that is exactly why I said opens interesting opportunity and making it possible ;-) They are all very related, but they do not have to graduate as parts of the same series. The

Re: [PATCH v3 2/3] patch-id: document new behaviour

2014-03-31 Thread Junio C Hamano
Michael S. Tsirkin m...@redhat.com writes: The hash used is mostly an internal implementation detail, isn't it? Yes, but that does not mean we can break people who keep an external database indexed with the patch-id by changing the default under them, and they can give --unstable option to work

Re: [RFC] submodule: change submodule.name.branch default from master to HEAD

2014-03-31 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: I'd prefer a solution that doesn't change any defaults for the checkout use case (again). Maybe it is a better route to revert this series, then add tests describing the current behavior for checkout submodules as a next step before adding the branch

Re: socket_perror() bug?

2014-03-31 Thread Junio C Hamano
Thiago Farina tfrans...@gmail.com writes: In imap-send.c:socket_perror() we pass |func| as a parameter, which I think it is the name of the function that called socket_perror, or the name of the function which generated an error. But at line 184 and 187 it always assume it was SSL_connect.

Re: [PATCH v2 02/27] t1400: Provide more usual input to the command

2014-03-31 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Subject: Re: [PATCH v2 02/27] t1400: Provide more usual input to the command This applies to the patches throughout the series, but during the microproject reviews, Eric pointed out that we seem to start the summary after area: on the subject with

Re: [PATCH v2 01/27] t1400: Fix name and expected result of one test

2014-03-31 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: The test stdin -z create ref fails with zero new value actually passes an empty new value, not a zero new value. So rename the test s/zero/empty/, and change the expected error from fatal: create $c given zero new value to

Re: [PATCH v2 03/27] parse_arg(): Really test that argument is properly terminated

2014-03-31 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Test that the argument is properly terminated by either whitespace or a NUL character, even if it is quoted, to be consistent with the non-quoted case. Adjust the tests to expect the new error message. Add a docstring to the function,

Re: [PATCH v2 06/27] update_refs(): Fix constness

2014-03-31 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Since full const correctness is beyond the ability of C's type system, just put the const where it doesn't do any harm. A (struct ref_update **) can be passed to a (struct ref_update * const *) argument, but not to a (const struct ref_update **)

Re: [PATCH v2 13/27] t1400: Test that stdin -z update treats empty newvalue as zeros

2014-03-31 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: This is the (slightly inconsistent) status quo; make sure it doesn't change by accident. Interesting. So oldvalue being empty is we do not care what it is (as opposed to we know it must not exist yet aka 0{40}), and newvalue being empty is the

Re: [PATCH v2 15/27] update-ref --stdin -z: Deprecate interpreting the empty string as zeros

2014-03-31 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: In the original version of this command, for the single case of the update command's newvalue, the empty string was interpreted as being equivalent to 40 0s. This shorthand is unnecessary (binary input will usually be generated programmatically

Re: [PATCH v2 18/27] update-ref --stdin: Harmonize error messages

2014-03-31 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Make (most of) the error messages for invalid input have the same format [1]: $COMMAND [SP $REFNAME]: $MESSAGE Update the tests accordingly. [1] A few error messages are left with their old form, because $COMMAND and $REFNAME aren't

Re: [PATCH 3/4] Fix misuses of nor in comments. (v3)

2014-03-31 Thread Junio C Hamano
Justin Lebar jle...@google.com writes: Thanks; fixed in v4 (just sent out). I only saw [3/4] that was marked with (v3) at the end, without [{1,2,4}/4]. As you seem to be renumbering from the very original (which had l10n at number 3), only sending out what you changed, expecting that everybody

Re: What's cooking in git.git (Mar 2014, #07; Fri, 28)

2014-03-31 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Sat, Mar 29, 2014 at 5:21 AM, Junio C Hamano gits...@pobox.com wrote: * nd/gc-aggressive (2014-03-17) 4 commits - gc --aggressive: three phase repacking - gc --aggressive: make --depth configurable - pack-objects: support --keep - environment.c

<    5   6   7   8   9   10   11   12   13   14   >