[PATCH 10/18] Make fsck_tag() warn-friendly

2014-12-08 Thread Johannes Schindelin
object. For example, if the 'type' line is not encountered in the correct position, the 'tag' line – if there is any – would not be handled at all. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fsck.c

[PATCH 04/18] Offer a function to demote fsck errors to warnings

2014-12-08 Thread Johannes Schindelin
. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 58 ++ fsck.h | 7 +-- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/fsck.c b/fsck.c index 05b146c..9e6d70f 100644 --- a/fsck.c +++ b/fsck.c

[PATCH 06/18] fsck: report the ID of the error/warning

2014-12-08 Thread Johannes Schindelin
Some legacy code has objects with non-fatal fsck issues; To enable the user to ignore those issues, let's print out the ID (e.g. when encountering missing-email, the user might want to call `git config receive.fsck.missing-email warn`). Signed-off-by: Johannes Schindelin johannes.schinde

[PATCH 11/18] Add a simple test for receive.fsck.*

2014-12-08 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- t/t5504-fetch-receive-strict.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh index 69ee13c..db79e56 100755 --- a/t/t5504-fetch-receive

[PATCH 13/18] Optionally ignore specific fsck issues completely

2014-12-08 Thread Johannes Schindelin
and works correctly. And while at it, it makes sure that multiple options work, too (they are passed to unpack-objects or index-pack as a comma-separated list via the --strict=... command-line option). Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 5

[PATCH 12/18] Disallow demoting grave fsck errors to warnings

2014-12-08 Thread Johannes Schindelin
Some kinds of errors are intrinsically unrecoverable (e.g. errors while uncompressing objects). It does not make sense to allow demoting them to mere warnings. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 8 ++-- t/t5504-fetch-receive

[PATCH 18/18] git receive-pack: support excluding objects from fsck'ing

2014-12-08 Thread Johannes Schindelin
' SHA-1 to a (preferably sorted) file when the objects are legitimate, i.e. when it is determined that those problematic objects should be allowed to enter the server. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- builtin/receive-pack.c | 9 +++ fsck.c

[PATCH 14/18] fsck: allow upgrading fsck warnings to errors

2014-12-08 Thread Johannes Schindelin
with the error: prefix, as it used to be the case before this commit). Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c| 24 t/t5302-pack-index.sh | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/fsck.c b/fsck.c index

[PATCH 17/18] Introduce `git fsck --quick`

2014-12-08 Thread Johannes Schindelin
This option avoids unpacking each and all objects, and just verifies the connectivity. In particular with large repositories, this speeds up the operation, at the expense of missing corrupt blobs and ignoring unreachable objects, if any. Signed-off-by: Johannes Schindelin johannes.schinde

[PATCH 16/18] fsck: support demoting errors to warnings

2014-12-08 Thread Johannes Schindelin
fsck.missing-email=ignore fsck` would hide problems with missing emails in author, committer and tagger lines. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- Documentation/config.txt | 13 + builtin/fsck.c | 15 +++ t/t1450-fsck.sh | 11

[PATCH 08/18] Make fsck_commit() warn-friendly

2014-12-08 Thread Johannes Schindelin
lines are mixed up, we punt after encountering an incorrect line. Therefore, demoting certain warnings to errors can hide other problems. Example: demoting the missing-author error to a warning would hide a problematic committer line. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de

[PATCH 15/18] Document the new receive.fsck.* options.

2014-12-08 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- Documentation/config.txt | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 7deae0b..b3276ee 100644 --- a/Documentation/config.txt +++ b/Documentation

[PATCH] Avoid gcc compiler warning

2014-12-08 Thread Johannes Schindelin
perf_hashmap() which accepts an unchecked integer value from the command line, the warning appears to be legitimate, even if the test-hashmap command is only called from the test suite. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- test-hashmap.c | 2 ++ 1 file changed, 2

Re: [PATCH] Avoid gcc compiler warning

2014-12-09 Thread Johannes Schindelin
Hi Peff, On Tue, 9 Dec 2014, Jeff King wrote: On Mon, Dec 08, 2014 at 05:38:59PM +0100, Johannes Schindelin wrote: At least on this developer's MacOSX (Snow Leopard, gcc-4.2.1), GCC prints a warning that 'hash' may be used uninitialized when compiling test-hashmap that 'hash' may

Re: [PATCH] doc: core.ignoreStat clarify the --assume-unchanged effect

2014-12-12 Thread Johannes Schindelin
Hi Philip, On Thu, 11 Dec 2014, Philip Oakley wrote: diff --git a/Documentation/config.txt b/Documentation/config.txt index c26a7c8..81570b7 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -354,10 +354,11 @@ proxy use, while defaulting to a common proxy for

Re: [PATCH] remote: allow adding remote w same name as alias

2014-12-16 Thread Johannes Schindelin
Hi Anastas, On Tue, 16 Dec 2014, Anastas Dancha wrote: When ~/.gitconfig contains an alias (i.e. myremote) and you are adding a new remote using the same name for remote, Git will refuse to add the remote with the same name as one of the aliases, even though the remote with such name is not

Announcing Git for Windows 1.9.5

2014-12-18 Thread Johannes Schindelin
Dear users of Git for Windows, a new Git for Windows version has been released, and we urge everybody to update because it fixes some critical bugs. Please download the new version from: https://github.com/msysgit/msysgit/releases/Git-1.9.5-preview20141217 The installer is called

Re: [msysGit] Re: Announcing Git for Windows 1.9.5

2014-12-18 Thread Johannes Schindelin
Hi Stanzilla, On Thu, 18 Dec 2014, Stanzilla wrote: Release notes at https://github.com/msysgit/msysgit/raw/master/share/WinGit/ReleaseNotes.rtf are *not* up to date. Yep, the 'master' branch is intentionally behind. It will be updated tomorrow, as well as the msysgit/git.git repository. The

Re: [ANNOUNCE] Git v2.2.1 (and updates to older maintenance tracks)

2014-12-19 Thread Johannes Schindelin
Hi Max, On Fri, 19 Dec 2014, Max Kirillov wrote: Hello. Thank you for the fix. You are welcome. Would it be more reliable to compare inode of directory in question and .git? (there is [*] for windows). So that any unspotted name equivalence is prevented to cause any harm. *)

Re: [PATCH] remote: allow adding remote w same name as alias

2014-12-19 Thread Johannes Schindelin
Hi Anastas, On Tue, 16 Dec 2014, Anastas Dancha wrote: Then I wrote alias, I've meant the following: ``` [url g...@githost.com] insteadOf = myalias pushInsteadOf = myalias ``` Unfortunately, your suggested fix will not allow my [poorly] described use case. There is one bit left to

Re: [PATCH] remote: allow adding remote w same name as alias

2014-12-21 Thread Johannes Schindelin
Hi Anastas, On Fri, 19 Dec 2014, Anastas Dancha wrote: On Fri, Dec 19, 2014 at 4:37 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: [...] There is one bit left to clarify: let me guess, you have a $HOME/.gitconfig like this: [url anas...@company.com

[PATCH 0/2] Let `git remote add` play nicer with url.url.insteadOf

2014-12-22 Thread Johannes Schindelin
adding a remote when it is actually the same that was specified in the config. Therefore we add just another check that let's `git remote add` continue when the existing remote's URL is identical to the specified one. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de Johannes Schindelin

[PATCH 2/2] Add a regression test for 'git remote add existing same-url'

2014-12-22 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- t/t5505-remote.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index ac79dd9..17c6330 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -1113,4 +1113,9 @@ test_extra_arg set

[PATCH 1/2] git remote add: allow re-adding remotes with the same URL

2014-12-22 Thread Johannes Schindelin
verifying that remote-url_nr =1, but at this point a missing URL has been filled by the name already, therefore url_nr cannot be zero. Noticed by Anastas Dancha. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- builtin/remote.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

Re: [PATCH 01/18] Introduce fsck options

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Wed, 10 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Subject: Re: [PATCH 01/18] Introduce fsck options please make it easier to cluster and spot the series in the eventual shortlog by giving a common prefix to the patches, e.g

Re: [PATCH 03/18] Provide a function to parse fsck message IDs

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Wed, 10 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: This function will be used in the next commits to allow the user to ask fsck to handle specific problems differently, e.g. demoting certain errors to warnings. It has to handle

Re: [PATCH 04/18] Offer a function to demote fsck errors to warnings

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Wed, 10 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: There are legacy repositories out there whose older commits and tags have issues that prevent pushing them when 'receive.fsckObjects' is set. One real-life example is a commit

Re: [PATCH 05/18] Allow demoting errors to warnings via receive.fsck.key = warn

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Wed, 10 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: For example, missing emails in commit and tag objects can be demoted to mere warnings with git config receive.fsck.missing-email warn No punctuations in the first

Re: [PATCH 09/18] fsck: handle multiple authors in commits specially

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Wed, 10 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: This problem has been detected in the wild, and is the primary reason to introduce an option to demote certain fsck errors to warnings. Let's offer to ignore this particular

Re: [PATCH 12/18] Disallow demoting grave fsck errors to warnings

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Wed, 10 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Some kinds of errors are intrinsically unrecoverable (e.g. errors while uncompressing objects). It does not make sense to allow demoting them to mere warnings. Makes sense

Re: [PATCH 14/18] fsck: allow upgrading fsck warnings to errors

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Wed, 10 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: The 'invalid tag name' and 'missing tagger entry' warnings can now be upgraded to errors by setting receive.fsck.invalid-tag-name and receive.fsck.missing-tagger-entry to 'error

Re: [PATCH 18/18] git receive-pack: support excluding objects from fsck'ing

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Wed, 10 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: The optional new config option `receive.fsck.skip-list` specifies the path to a file listing the names, i.e. SHA-1s, one per line, of objects that are to be ignored by `git

Re: [PATCH 16/18] fsck: support demoting errors to warnings

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Wed, 10 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: We already have support in `git receive-pack` to deal with some legacy repositories which have non-fatal issues. Let's make `git fsck` itself useful with such repositories, too

Re: [PATCH 04/18] Offer a function to demote fsck errors to warnings

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Mon, 22 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: In other words, at some point wouldn't we be better off with something like this struct { enum id; const char *id_string

Re: [PATCH 14/18] fsck: allow upgrading fsck warnings to errors

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Mon, 22 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: On Wed, 10 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: The 'invalid tag name' and 'missing tagger entry' warnings can now

Re: [PATCH 16/18] fsck: support demoting errors to warnings

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Mon, 22 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Or do you want the error messages to also use camelCased IDs, i.e. warning in tag $tag: missingTaggerEntry: invalid format ... instead of warning in tag $tag

Re: [PATCH 04/18] Offer a function to demote fsck errors to warnings

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Mon, 22 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: On Mon, 22 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: In other words, at some point wouldn't we be better off with something

Re: [PATCH 16/18] fsck: support demoting errors to warnings

2014-12-22 Thread Johannes Schindelin
Hi Junio, On Mon, 22 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Of course you can say that! ;-) The problem these ugly messages try to solve is to give the user a hint which setting to change if they want to override the default behavior

Re: [PATCH 16/18] fsck: support demoting errors to warnings

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Mon, 22 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: On Mon, 22 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Of course you can say that! ;-) The problem these ugly messages try

Re: [PATCH 04/18] Offer a function to demote fsck errors to warnings

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Mon, 22 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: For example, try to spot the error here: ... F(ALMOST_HAPPY, INFO) \ F(CANNOT_RECOVER, ERROR) \ F(COFFEE_IS_EMPTY, WARN) \ F(JUST_BEING_CHATTY, INFO

[PATCH v2 2/2] Add a regression test for 'git remote add existing same-url'

2014-12-23 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- t/t5505-remote.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index ac79dd9..17c6330 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -1113,4 +1113,9 @@ test_extra_arg set

[PATCH v2 0/2] Let `git remote add` play nicer with url.url.insteadOf

2014-12-23 Thread Johannes Schindelin
pretending that we allow adding a remote twice when the URL did not change). Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de Johannes Schindelin (2): git remote: allow adding remotes agreeing with url.insteadOf Add a regression test for 'git remote add existing same-url' builtin

[PATCH v2 1/2] git remote: allow adding remotes agreeing with url.....insteadOf

2014-12-23 Thread Johannes Schindelin
. Noticed by Anastas Dancha. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- builtin/remote.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/remote.c b/builtin/remote.c index 46ecfd9..b4ff468 100644 --- a/builtin/remote.c +++ b/builtin/remote.c

Re: [PATCH 1/2] git remote add: allow re-adding remotes with the same URL

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Mon, 22 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: When adding a remote, we make sure that the remote does not exist already. For convenience, we allow re-adding remotes with the same URLs. This also handles the case

Re: [PATCH 04/18] Offer a function to demote fsck errors to warnings

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Tue, 23 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: However, if we had to change the lookup such that it uses an array always, we would have to introduce a function to initialize the struct, always, in particular we would have

Re: [PATCH 16/18] fsck: support demoting errors to warnings

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Tue, 23 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Of course you can say that! ;-) The problem these ugly messages try to solve is to give the user a hint which setting to change if they want to override the default behavior

Re: [PATCH 04/18] Offer a function to demote fsck errors to warnings

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Tue, 23 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: And *still*, this is *just* a global table with defaults. I would *still* need to copy-on-write when the first customization of the severity level takes place because I cannot

Re: [PATCH 16/18] fsck: support demoting errors to warnings

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Tue, 23 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: The parser I wrote actually accepts both versions, allowing me to skip the tedious step to convert the camelCased config setting into a lower-case-dashed version to pass to `index

Re: [PATCH 16/18] fsck: support demoting errors to warnings

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Tue, 23 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Okay, so just to clarify: you want me to - split the parser into - a parser that accepts only camelCased variable names when they come from the config (for use

Re: [PATCH 16/18] fsck: support demoting errors to warnings

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Tue, 23 Dec 2014, Junio C Hamano wrote: Having said that, I think missingTags etc. should not be configuration variable names (instead, they should be values). Because of that, I do not think we need consistency between the way these tokens that denote kinds of errors fsck

Re: [PATCH 04/18] Offer a function to demote fsck errors to warnings

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Tue, 23 Dec 2014, Junio C Hamano wrote: On Tue, Dec 23, 2014 at 9:28 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: And *still*, this is *just* a global table with defaults. I would *still* need to copy

Re: [PATCH 1/2] git remote add: allow re-adding remotes with the same URL

2014-12-23 Thread Johannes Schindelin
Hi Junio, [re-Cc:ing the list] On Tue, 23 Dec 2014, Junio C Hamano wrote: On Tue, Dec 23, 2014 at 5:25 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: On Mon, 22 Dec 2014, Junio C Hamano wrote: So, it is an error if we have remote and if (1) URL for the remote

Re: [PATCH 16/18] fsck: support demoting errors to warnings

2014-12-23 Thread Johannes Schindelin
Hi Junio, On Tue, 23 Dec 2014, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: On Tue, 23 Dec 2014, Junio C Hamano wrote: Having said that, I think missingTags etc. should not be configuration variable names (instead, they should be values). Because

Re: Git compile warnings (under mac/clang)

2015-01-23 Thread Johannes Schindelin
Hi Peff, On 2015-01-23 19:37, Jeff King wrote: On Fri, Jan 23, 2015 at 10:07:18AM -0800, Junio C Hamano wrote: [...] one thing that puzzles me is that the current code looks like: if (options-msg_severity msg_id = 0 msg_id FSCK_MSG_MAX) severity =

Re: Git compile warnings (under mac/clang)

2015-01-23 Thread Johannes Schindelin
Hi Peff, On 2015-01-23 19:55, Jeff King wrote: On Fri, Jan 23, 2015 at 07:46:36PM +0100, Johannes Schindelin wrote: ? And then you can spell that first part as assert(), which I suspect (but did not test) may shut up clang's warnings. To be quite honest, I assumed that Git's source code

Re: [PATCH 3/3] CodingGuidelines: describe naming rules for configuration variables

2015-02-02 Thread Johannes Schindelin
Hi, On 2015-02-01 23:34, Junio C Hamano wrote: Jeff King p...@peff.net writes: 1. I'm a user who has set my preferred core.whitespace in my ~/.gitconfig. A particular project I am working on uses an alternate tabwidth. How do I set that in the repo config without repeating

Re: [PATCH v4 00/19] Introduce an internal API to interact with the fsck machinery

2015-02-02 Thread Johannes Schindelin
Hi all (in particular Junio), On 2015-01-31 22:04, Johannes Schindelin wrote: [...] switch to fsck.severity to address Michael's concerns that letting fsck.(error|warn|ignore)'s comma-separated lists possibly overriding each other partially; Having participated in the CodingStyle thread, I

Re: [PATCH v4 00/19] Introduce an internal API to interact with the fsck machinery

2015-02-02 Thread Johannes Schindelin
Hi Michael, On 2015-02-02 13:43, Michael Haggerty wrote: On 02/02/2015 12:41 PM, Johannes Schindelin wrote: Hi all (in particular Junio), On 2015-01-31 22:04, Johannes Schindelin wrote: [...] switch to fsck.severity to address Michael's concerns that letting fsck.(error|warn|ignore)'s

Re: [PATCH v4 00/19] Introduce an internal API to interact with the fsck machinery

2015-02-03 Thread Johannes Schindelin
Hi Michael, On 2015-02-03 16:11, Michael Haggerty wrote: On 02/02/2015 05:48 PM, Johannes Schindelin wrote: On 2015-02-02 13:43, Michael Haggerty wrote: On 02/02/2015 12:41 PM, Johannes Schindelin wrote: Hi all (in particular Junio), On 2015-01-31 22:04, Johannes Schindelin wrote

Re: [PATCH v4 00/19] Introduce an internal API to interact with the fsck machinery

2015-02-04 Thread Johannes Schindelin
Hi Junio, On 2015-02-04 04:50, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: [fsck level] missingAuthor = error , which looks funny. level is a constant, so it seems superfluous. Yes, it is superfluous, but is one way to avoid the ambiguity

Re: [PATCH v2 15/18] fsck: Document the new receive.fsck.* options.

2015-01-19 Thread Johannes Schindelin
Hi Eric, On 2015-01-19 23:44, Eric Sunshine wrote: On Mon, Jan 19, 2015 at 10:51 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- diff --git a/Documentation/config.txt b/Documentation/config.txt index ae6791d

Re: [PATCH v2 05/18] fsck: Allow demoting errors to warnings via receive.fsck.warn = key

2015-01-21 Thread Johannes Schindelin
Hi Junio, On 2015-01-21 09:54, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: +if (starts_with(var, receive.fsck.)) { +if (fsck_severity.len) +strbuf_addch(fsck_severity, ','); +strbuf_addf(fsck_severity, %s=%s

Re: [PATCH v2 11/18] fsck: Add a simple test for receive.fsck.*

2015-01-21 Thread Johannes Schindelin
Hi Junio, On 2015-01-21 09:59, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- t/t5504-fetch-receive-strict.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t5504

[PATCH v3 13/19] fsck: Optionally ignore specific fsck issues completely

2015-01-21 Thread Johannes Schindelin
and works correctly. And while at it, it makes sure that multiple options work, too (they are passed to unpack-objects or index-pack as a comma-separated list via the --strict=... command-line option). Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 5

[PATCH v3 12/19] fsck: Disallow demoting grave fsck errors to warnings

2015-01-21 Thread Johannes Schindelin
Some kinds of errors are intrinsically unrecoverable (e.g. errors while uncompressing objects). It does not make sense to allow demoting them to mere warnings. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 13 +++-- t/t5504-fetch

[PATCH v3 14/19] fsck: Allow upgrading fsck warnings to errors

2015-01-21 Thread Johannes Schindelin
with the error: prefix, as it used to be the case before this commit). Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c| 24 +--- t/t5302-pack-index.sh | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/fsck.c b/fsck.c

[PATCH v3 15/19] fsck: Document the new receive.fsck.* options.

2015-01-21 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- Documentation/config.txt | 28 1 file changed, 28 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index ae6791d..cc4cd91 100644 --- a/Documentation/config.txt +++ b

[PATCH v3 06/19] fsck: Report the ID of the error/warning

2015-01-21 Thread Johannes Schindelin
Some legacy code has objects with non-fatal fsck issues; To enable the user to ignore those issues, let's print out the ID (e.g. when encountering missing-email, the user might want to call `git config receive.fsck.warn missing-email`). Signed-off-by: Johannes Schindelin johannes.schinde

[PATCH v3 05/19] fsck: Allow demoting errors to warnings via receive.fsck.warn = key

2015-01-21 Thread Johannes Schindelin
receive.fsck.* lines in the config, the latter configuration wins. As git receive-pack does not actually perform the checks, it hands off the setting to index-pack or unpack-objects in the form of an optional argument to the --strict option. Signed-off-by: Johannes Schindelin johannes.schinde

[PATCH v3 10/19] fsck: Make fsck_tag() warn-friendly

2015-01-21 Thread Johannes Schindelin
object. For example, if the 'type' line is not encountered in the correct position, the 'tag' line – if there is any – would not be handled at all. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fsck.c

[PATCH v3 08/19] fsck: Make fsck_commit() warn-friendly

2015-01-21 Thread Johannes Schindelin
lines are mixed up, we punt after encountering an incorrect line. Therefore, demoting certain warnings to errors can hide other problems. Example: demoting the missing-author error to a warning would hide a problematic committer line. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de

[PATCH v3 07/19] fsck: Make fsck_ident() warn-friendly

2015-01-21 Thread Johannes Schindelin
When fsck_ident() identifies a problem with the ident, it should still advance the pointer to the next line so that fsck can continue in the case of a mere warning. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 49 +++-- 1

[PATCH v3 03/19] fsck: Provide a function to parse fsck message IDs

2015-01-21 Thread Johannes Schindelin
. To make the parsing robust, we generate strings from the enum keys, and using these keys, we will map lower-case, dash-separated strings values to the corresponding enum values. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 27 +-- 1 file changed

[PATCH v3 16/19] fsck: Support demoting errors to warnings

2015-01-21 Thread Johannes Schindelin
receive.fsckObjects = true, for example – we strictly separate the fsck.* from the receive.fsck.* settings. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- Documentation/config.txt | 15 +++ builtin/fsck.c | 15 +++ t/t1450-fsck.sh | 11

[PATCH v3 17/19] fsck: Introduce `git fsck --quick`

2015-01-21 Thread Johannes Schindelin
This option avoids unpacking each and all objects, and just verifies the connectivity. In particular with large repositories, this speeds up the operation, at the expense of missing corrupt blobs and ignoring unreachable objects, if any. Signed-off-by: Johannes Schindelin johannes.schinde

[PATCH v3 18/19] fsck: git receive-pack: support excluding objects from fsck'ing

2015-01-21 Thread Johannes Schindelin
' SHA-1 to a (preferably sorted) file when the objects are legitimate, i.e. when it is determined that those problematic objects should be allowed to enter the server. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- Documentation/config.txt| 7 ++ builtin/receive-pack.c

Re: [PATCH v2 18/18] fsck: git receive-pack: support excluding objects from fsck'ing

2015-01-21 Thread Johannes Schindelin
Hi Junio, On 2015-01-21 10:02, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: The optional new config option `receive.fsck.skiplist` specifies the path to a file listing the names, i.e. SHA-1s, one per line, of objects that are to be ignored by `git receive

Re: [PATCH v2 00/18] Introduce an internal API to interact with the fsck machinery

2015-01-21 Thread Johannes Schindelin
Hi Junio, On 2015-01-21 10:17, Junio C Hamano wrote: The documentation did not format well. Tentatively I added the attached fix-up on top of the series before merging to 'pu'. [...] Sorry for that! I have to admit that I did not even build the documentation :-( I incorporated your fixes

[PATCH v3 04/19] fsck: Offer a function to demote fsck errors to warnings

2015-01-21 Thread Johannes Schindelin
. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 64 +--- fsck.h | 7 +-- 2 files changed, 66 insertions(+), 5 deletions(-) diff --git a/fsck.c b/fsck.c index 2d91e28..02715ee 100644 --- a/fsck.c +++ b

[PATCH v3 02/19] fsck: Introduce identifiers for fsck messages

2015-01-21 Thread Johannes Schindelin
severity levels. Besides, we want to introduce a parser in the next commit that maps the string representation to the enum value, hence we use the slightly ugly preprocessor construct that is extensible for use with said parser. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de

[PATCH v3 01/19] fsck: Introduce fsck options

2015-01-21 Thread Johannes Schindelin
Just like the diff machinery, we are about to introduce more settings, therefore it makes sense to carry them around as a (pointer to a) struct containing all of them. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- builtin/fsck.c | 20 +-- builtin/index-pack.c

[PATCH v3 00/19] Introduce an internal API to interact with the fsck machinery

2015-01-21 Thread Johannes Schindelin
. Johannes Schindelin (19): fsck: Introduce fsck options fsck: Introduce identifiers for fsck messages fsck: Provide a function to parse fsck message IDs fsck: Offer a function to demote fsck errors to warnings fsck: Allow demoting errors to warnings via receive.fsck.warn = key fsck: Report

[PATCH v3 19/19] fsck: support ignoring objects in `git fsck` via fsck.skiplist

2015-01-21 Thread Johannes Schindelin
. a duplicate 'author' line in an early commit object). Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- Documentation/config.txt | 7 +++ builtin/fsck.c | 10 ++ 2 files changed, 17 insertions(+) diff --git a/Documentation/config.txt b/Documentation

Re: [PATCH v2 04/18] fsck: Offer a function to demote fsck errors to warnings

2015-01-21 Thread Johannes Schindelin
Hi Junio, On 2015-01-21 09:49, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: +static inline int substrcmp(const char *string, int len, const char *match) +{ +int match_len = strlen(match); +if (match_len != len) +return -1; +return

[PATCH v3 09/19] fsck: Handle multiple authors in commits specially

2015-01-21 Thread Johannes Schindelin
, but that could hide missing tree objects in the same commit because we cannot continue verifying any commit object after encountering a missing committer line, while we can continue in the case of multiple author lines. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 9

[PATCH v3 11/19] fsck: Add a simple test for receive.fsck.*

2015-01-21 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- t/t5504-fetch-receive-strict.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh index 69ee13c..40c7557 100755 --- a/t/t5504-fetch-receive

Re: [PATCH v2 05/18] fsck: Allow demoting errors to warnings via receive.fsck.warn = key

2015-01-22 Thread Johannes Schindelin
Hi Junio, On 2015-01-21 22:47, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: @@ -1488,8 +1501,13 @@ static const char *unpack(int err_fd, struct shallow_info *si) argv_array_pushl(child.args, index-pack, --stdin

[PATCH v2 17/18] fsck: Introduce `git fsck --quick`

2015-01-19 Thread Johannes Schindelin
This option avoids unpacking each and all objects, and just verifies the connectivity. In particular with large repositories, this speeds up the operation, at the expense of missing corrupt blobs and ignoring unreachable objects, if any. Signed-off-by: Johannes Schindelin johannes.schinde

[PATCH v2 00/18] Introduce an internal API to interact with the fsck machinery

2015-01-19 Thread Johannes Schindelin
. Sorry for the size; the comments I received for v1 made it necessary to change the patch series rather extensively (I rebased the branch twenty-five times since sending off the first version of the patch series, which might also serve as an apology for not getting v2 out sooner). Johannes Schindelin

[PATCH v2 04/18] fsck: Offer a function to demote fsck errors to warnings

2015-01-19 Thread Johannes Schindelin
. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 64 +--- fsck.h | 7 +-- 2 files changed, 66 insertions(+), 5 deletions(-) diff --git a/fsck.c b/fsck.c index 2d91e28..7d4c22c 100644 --- a/fsck.c +++ b

[PATCH v2 14/18] fsck: Allow upgrading fsck warnings to errors

2015-01-19 Thread Johannes Schindelin
with the error: prefix, as it used to be the case before this commit). Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c| 24 +--- t/t5302-pack-index.sh | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/fsck.c b/fsck.c

[PATCH v2 18/18] fsck: git receive-pack: support excluding objects from fsck'ing

2015-01-19 Thread Johannes Schindelin
' SHA-1 to a (preferably sorted) file when the objects are legitimate, i.e. when it is determined that those problematic objects should be allowed to enter the server. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- builtin/receive-pack.c | 9 +++ fsck.c

[PATCH v2 01/18] fsck: Introduce fsck options

2015-01-19 Thread Johannes Schindelin
Just like the diff machinery, we are about to introduce more settings, therefore it makes sense to carry them around as a (pointer to a) struct containing all of them. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- builtin/fsck.c | 20 +-- builtin/index-pack.c

[PATCH v2 02/18] fsck: Introduce identifiers for fsck messages

2015-01-19 Thread Johannes Schindelin
severity levels. Besides, we want to introduce a parser in the next commit that maps the string representation to the enum value, hence we use the slightly ugly preprocessor construct that is extensible for use with said parser. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de

[PATCH v2 06/18] fsck: Report the ID of the error/warning

2015-01-19 Thread Johannes Schindelin
Some legacy code has objects with non-fatal fsck issues; To enable the user to ignore those issues, let's print out the ID (e.g. when encountering missing-email, the user might want to call `git config receive.fsck.warn missing-email`). Signed-off-by: Johannes Schindelin johannes.schinde

[PATCH v2 08/18] fsck: Make fsck_commit() warn-friendly

2015-01-19 Thread Johannes Schindelin
lines are mixed up, we punt after encountering an incorrect line. Therefore, demoting certain warnings to errors can hide other problems. Example: demoting the missing-author error to a warning would hide a problematic committer line. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de

[PATCH v2 07/18] fsck: Make fsck_ident() warn-friendly

2015-01-19 Thread Johannes Schindelin
When fsck_ident() identifies a problem with the ident, it should still advance the pointer to the next line so that fsck can continue in the case of a mere warning. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 49 +++-- 1

[PATCH v2 13/18] fsck: Optionally ignore specific fsck issues completely

2015-01-19 Thread Johannes Schindelin
and works correctly. And while at it, it makes sure that multiple options work, too (they are passed to unpack-objects or index-pack as a comma-separated list via the --strict=... command-line option). Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 5

[PATCH v2 09/18] fsck: Handle multiple authors in commits specially

2015-01-19 Thread Johannes Schindelin
, but that could hide missing tree objects in the same commit because we cannot continue verifying any commit object after encountering a missing committer line, while we can continue in the case of multiple author lines. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 9

[PATCH v2 12/18] fsck: Disallow demoting grave fsck errors to warnings

2015-01-19 Thread Johannes Schindelin
Some kinds of errors are intrinsically unrecoverable (e.g. errors while uncompressing objects). It does not make sense to allow demoting them to mere warnings. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 13 +++-- t/t5504-fetch

<    1   2   3   4   5   6   7   8   9   10   >