[PATCH] Add failing test: "fsck survives inflate errors"

2014-07-19 Thread Samuel Bronson
While inflate errors are obviously NOT GOOD, and should perhaps be fatal for most commands, git fsck is something of a special case because it is useful to have *it* report as many corrupt objects as possible in one run. Signed-off-by: Samuel Bronson --- t/t1450-fsck.sh | 17

Re: [PATCH] Add failing test: "fsck survives inflate errors"

2014-07-20 Thread Samuel Bronson
The following message is a courtesy copy of an article that has been posted to gmane.comp.version-control.git as well. Oh, I forgot to provide any analysis of the problem. Oops. It may be just as well, though; I was tired enough that I might have botched it in any case. So, have an analysis: W

[BUG] parse_object() does not behave as documented

2014-07-29 Thread Samuel Bronson
[Hmm, nobody seems ot have commented on this analysis; maybe reposting it with a subject containing [BUG] will help?] Samuel Bronson writes: > The following message is a courtesy copy of an article > that has been posted to gmane.comp.version-control.git as well. > > Oh, I forgot to

Re: [PATCH v3 1/6] alias.c: replace `git_config()` with `git_config_get_string()`

2014-07-31 Thread Samuel Bronson
Ramsay Jones writes: > On 21/07/14 12:12, Tanay Abhra wrote: >> -char *alias_lookup(const char *alias) >> +char *alias_lookup(const char* alias) > > No, this is not C++. :-D Why would C++ make a difference? Shouldn't you *never* do that? -- Hi! I'm a .signature virus! Copy me into your ~/.sign

Re: [BUG] parse_object() does not behave as documented

2014-08-08 Thread Samuel Bronson
Ping? Samuel Bronson writes: > [Hmm, nobody seems ot have commented on this analysis; maybe reposting > it with a subject containing [BUG] will help?] > > Samuel Bronson writes: > >> The following message is a courtesy copy of an article >> that has been p

[PATCH v2] diff: Add diff.orderfile configuration variable

2013-12-05 Thread Samuel Bronson
From: Anders Waldenborg diff.orderfile acts as a default for the -O command line option. [sb: fixed testcases & revised docs based on Jonathan Nieder's suggestions] Signed-off-by: Anders Waldenborg Thanks-to: Jonathan Nieder Signed-off-by: Samuel Bronson --- *I* even verified that

Re: [PATCH v2] diff: Add diff.orderfile configuration variable

2013-12-06 Thread Samuel Bronson
On Fri, Dec 6, 2013 at 1:11 PM, Junio C Hamano wrote: > Samuel Bronson writes: > Thanks for reviving a stalled topic. I was asking about such a feature in #git and jrnieder was nice enough to point me at the stalled patch. >> *I* even verified that the tests do fail properly when

[BUG] "echo HEAD | git cat-file --batch=''" fails catastrophically

2013-12-10 Thread Samuel Bronson
Observe: % echo HEAD | git cat-file --batch= fatal: object fde075cb72fc0773d8e8ca93d55a35d77bb6688b changed type!? Without the =, it works fine; with a string that has both "%(objecttype)" and "%(objectsize)", it's fine; but when you don't include both, it complains about one of the values that

[PATCH v3 2/3] diff: Let "git diff -O" read orderfile from any file, failing when appropriate

2013-12-14 Thread Samuel Bronson
of that logic to get the file mmapped and just use strbuf_read_file() instead, which gives us decent error handling practically for free. Signed-off-by: Samuel Bronson --- diffcore-order.c | 23 --- t/t4056-diff-order.sh | 23 +++ 2 files changed, 31 ins

[RFC v3 3/3] diff: Add diff.orderfile configuration variable

2013-12-14 Thread Samuel Bronson
ff-by: Samuel Bronson --- Documentation/diff-config.txt | 5 + Documentation/diff-options.txt | 3 +++ diff.c | 5 + t/t4056-diff-order.sh | 10 ++ 4 files changed, 23 insertions(+) diff --git a/Documentation/diff-config.txt b/Documentation

[PATCH v3 0/3] diff: Add diff.orderfile configuration variable

2013-12-14 Thread Samuel Bronson
ful [PATCH 1]. I also noticed that -O had terrible error handling and could only read mmappable files, so I fixed that [PATCH 2]. Samuel Bronson (3): diff: Tests for "git diff -O" diff: Let "git diff -O" read orderfile from any file, failing when appropriate

[PATCH v3 1/3] diff: Tests for "git diff -O"

2013-12-14 Thread Samuel Bronson
Heavily adapted from Anders' patch: "diff: Add diff.orderfile configuration variable" Signed-off-by: Anders Waldenborg Signed-off-by: Samuel Bronson --- t/t4056-diff-order.sh | 72 +++ 1 file changed, 72 insertions(+) create mode

Re: [RFC v3 3/3] diff: Add diff.orderfile configuration variable

2013-12-16 Thread Samuel Bronson
On Mon, Dec 16, 2013 at 1:53 PM, Junio C Hamano wrote: > Samuel Bronson writes: > Path-like parameters and values given by the end user should be > relative to the directory where the end user is (i.e. both -O > parameters in the above example name docs/orderfile). All Git >

[PATCH v4 0/3] diff: Add diff.orderfile configuration variable

2013-12-16 Thread Samuel Bronson
XME from patch 3's commit message. Samuel Bronson (3): diff: Tests for "git diff -O" diff: Let "git diff -O" read orderfile from any file, fail properly diff: Add diff.orderfile configuration variable Documentation/diff-config.txt | 5 +

[PATCH v4 2/3] diff: Let "git diff -O" read orderfile from any file, fail properly

2013-12-16 Thread Samuel Bronson
this was probably more coincidence than anything else.) So, lets toss all of that logic to get the file mmapped and just use strbuf_read_file() instead, which gives us decent error handling practically for free. Signed-off-by: Samuel Bronson --- diffcore-order.c | 23 --- t/

[PATCH v4 1/3] diff: Tests for "git diff -O"

2013-12-16 Thread Samuel Bronson
Heavily adapted from Anders' patch: "diff: Add diff.orderfile configuration variable" Signed-off-by: Anders Waldenborg Signed-off-by: Samuel Bronson --- t/t4056-diff-order.sh | 72 +++ 1 file changed, 72 insertions(+) create mode

[PATCH v4 3/3] diff: Add diff.orderfile configuration variable

2013-12-16 Thread Samuel Bronson
diff.orderfile acts as a default for the -O command line option. [sb: split up aw's original patch; reworked tests and docs, treat option as pathname] Signed-off-by: Anders Waldenborg Signed-off-by: Samuel Bronson --- Documentation/diff-config.txt | 5 + Documentation/diff-option

Re: [PATCH v4 2/3] diff: Let "git diff -O" read orderfile from any file, fail properly

2013-12-16 Thread Samuel Bronson
On Mon, Dec 16, 2013 at 4:09 PM, Junio C Hamano wrote: > Samuel Bronson writes: >> +test_expect_success 'unreadable orderfile' ' >> + touch unreadable_file && >> + chmod -r unreadable_file && > - this test probably needs re

Re: [PATCH v4 2/3] diff: Let "git diff -O" read orderfile from any file, fail properly

2013-12-16 Thread Samuel Bronson
On Mon, Dec 16, 2013 at 4:32 PM, Junio C Hamano wrote: > Samuel Bronson writes: > >> for i in 1 2 >> do >> test_expect_success "orderfile using option ($i)" ' >> git diff -Oorder_file_$i --name-only HEAD^..HEAD >actual &&

Re: [PATCH v4 2/3] diff: Let "git diff -O" read orderfile from any file, fail properly

2013-12-17 Thread Samuel Bronson
On Tue, Dec 17, 2013 at 5:09 PM, Junio C Hamano wrote: > My point was that I did not see much value in reading the orderfile > data from anything but a file. At that point, you are not testing > the "diff -O" orderfile option, but if strbuf_readline() reads from > a non-regular file. Oh, good po

[PATCH v5 1/3] diff: Tests for "git diff -O"

2013-12-18 Thread Samuel Bronson
Heavily adapted from Anders' patch: "diff: Add diff.orderfile configuration variable" Signed-off-by: Anders Waldenborg Signed-off-by: Samuel Bronson --- t/t4056-diff-order.sh | 70 +++ 1 file changed, 70 insertions(+) create mode

[PATCH v5 3/3] diff: Add diff.orderfile configuration variable

2013-12-18 Thread Samuel Bronson
diff.orderfile acts as a default for the -O command line option. [sb: split up aw's original patch; rework tests and docs, treat option as pathname] Signed-off-by: Anders Waldenborg Signed-off-by: Samuel Bronson --- Documentation/diff-config.txt | 5 + Documentation/diff-option

[PATCH v5 2/3] diff: Let "git diff -O" read orderfile from any file, fail properly

2013-12-18 Thread Samuel Bronson
this was probably more coincidence than anything else.) So, lets toss all of that logic to get the file mmapped and just use strbuf_read_file() instead, which gives us decent error handling practically for free. Signed-off-by: Samuel Bronson --- diffcore-order.c | 23 --

[PATCH v5 0/3] diff: Add diff.orderfile configuration variable

2013-12-18 Thread Samuel Bronson
I expect you've figured out what this patch series is about by now. In this version, I've applied Junio's suggestions from the last version, and also the stuff from the FIXUP commit he made after my stuff in the branch he merged into 'pu'. Samuel Bronson (3): dif

[PATCH] git-cherry.txt: cross reference "git log --cherry"

2013-12-19 Thread Samuel Bronson
I learned of "git cherry" some days ago, but only learned of --cherry and related options to "git log" today[1] (more-or-less by chance). If the git-cherry(1) manpage had mentioned --cherry, I would have learned of these options sooner. [1]: Thu, 11 Apr 2013 Signed-of

Re: [PATCH 3/3] Makefile: add commented out 's for Emacs here, too

2013-12-19 Thread Samuel Bronson
On Sat, May 30, 2009 at 6:01 PM, Markus Heidelberg wrote: > In the buildroot project (it consists of Makefiles) there a lots of > those workarounds. There was a patch on the list to replace all > $(strip $(subst ",,$(FOO))) with $(call strip_dquotes, $(FOO)), but > $(call) is not allowed in git f

[PATCH] wt-status.c: disable those distracting -Wformat-zero-length warnings

2013-12-20 Thread Samuel Bronson
These warnings don't really seem to make much sense for this file. Signed-off-by: Samuel Bronson --- wt-status.c | 5 + 1 file changed, 5 insertions(+) diff --git a/wt-status.c b/wt-status.c index 4e55810..542cc65 100644 --- a/wt-status.c +++ b/wt-status.c @@ -17,6 +17,11 @@ #in

Re: [PATCH] wt-status.c: disable those distracting -Wformat-zero-length warnings

2013-12-21 Thread Samuel Bronson
On Sat, Dec 21, 2013 at 4:42 AM, Jeff King wrote: > On Fri, Dec 20, 2013 at 10:45:01AM -0500, Samuel Bronson wrote: > >> These warnings don't really seem to make much sense for this file. > > Agreed, though the advice so far has been to put -Wno-format-zero-length >

[PATCH] git-cherry.txt: cross reference "git log --cherry"

2013-04-11 Thread Samuel Bronson
I learned of "git cherry" some days ago, but only learned of --cherry and related options to "git log" today (more-or-less by chance). If the git-cherry(1) manpage had mentioned --cherry, I would have learned of these options sooner. Signed-off-by: Samuel Bronson --