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

2015-06-22 Thread Johannes Schindelin
Hi Junio, On 2015-06-19 21:26, 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

Re: [PATCH v4 08/19] parse-option: rename parse_opt_with_commit()

2015-06-22 Thread Junio C Hamano
On Mon, Jun 22, 2015 at 8:38 AM, Karthik Nayak karthik@gmail.com wrote: On Mon, Jun 22, 2015 at 6:34 AM, Junio C Hamano gits...@pobox.com wrote: On Sun, Jun 21, 2015 at 1:48 PM, Karthik Nayak karthik@gmail.com wrote: Rename parse_opt_with_commit() to parse_opt_commit_object_name() to

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

2015-06-22 Thread Johannes Schindelin
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-pack` when `receive.fsckObjects = true`. This is extremely handy in case of legacy repositories where it would cause

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

2015-06-22 Thread Johannes Schindelin
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 problem specifically. Technically, we could handle such repositories by setting receive.fsck.msg-id to

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

2015-06-22 Thread Johannes Schindelin
Identical to support in `git receive-pack for the config option `receive.fsck.skiplist`, we now support ignoring given objects in `git fsck` via `fsck.skiplist` altogether. This is extremely handy in case of legacy repositories where it would cause more pain to change incorrect objects than to

[PATCH v7 17/19] fsck: Introduce `git fsck --connectivity-only`

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

[PATCH v7 11/19] fsck: Add a simple test for receive.fsck.msg-id

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

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

2015-06-22 Thread Johannes Schindelin
When fsck_commit() identifies a problem with the commit, it should try to make it possible to continue checking the commit object, in case the user wants to demote the detected errors to mere warnings. Note that some problems are too problematic to simply ignore. For example, when the header

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

2015-06-22 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 v7 10/19] fsck: Make fsck_tag() warn-friendly

2015-06-22 Thread Johannes Schindelin
When fsck_tag() identifies a problem with the commit, it should try to make it possible to continue checking the commit object, in case the user wants to demote the detected errors to mere warnings. Just like fsck_commit(), there are certain problems that could hide other issues with the same tag

[PATCH v7 15/19] fsck: Document the new receive.fsck.msg-id options

2015-06-22 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 3e37b93..4e5fbea 100644 --- a/Documentation/config.txt +++

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

2015-06-22 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 +++--

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

2015-06-22 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 missingEmail, the user might want to call `git config --add receive.fsck.missingEmail=warn`). Signed-off-by: Johannes Schindelin

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

2015-06-22 Thread Johannes Schindelin
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, by allowing users to ignore known issues, or at least demote those issues to mere warnings. Example: `git -c

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

2015-06-22 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: diff --git a/fsck.c b/fsck.c index 1a3f7ce..e81a342 100644 --- a/fsck.c +++ b/fsck.c @@ -64,30 +64,29 @@ enum fsck_msg_id { #undef MSG_ID #define STR(x) #x -#define MSG_ID(id, msg_type) { STR(id), FSCK_##msg_type }, +#define

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

2015-06-22 Thread Johannes Schindelin
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 object that has been hand-crafted to list two authors. Often, it is not possible to fix those issues without disrupting

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

2015-06-22 Thread Johannes Schindelin
At the moment, the git-fsck's integrity checks are targeted toward the end user, i.e. the error messages are really just messages, intended for human consumption. Under certain circumstances, some of those errors should be allowed to be turned into mere warnings, though, because the cost of

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

2015-06-22 Thread Johannes Schindelin
These functions 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. The upcoming `fsck_set_msg_types()` function has to handle partial strings because we would like to be able to parse, say,

[PATCH v7 05/19] fsck (receive-pack): Allow demoting errors to warnings

2015-06-22 Thread Johannes Schindelin
For example, missing emails in commit and tag objects can be demoted to mere warnings with git config receive.fsck.missingemail=warn The value is actually a comma-separated list. In case that the same key is listed in multiple receive.fsck.msg-id lines in the config, the latter

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

2015-06-22 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 v7 02/19] fsck: Introduce identifiers for fsck messages

2015-06-22 Thread Johannes Schindelin
Instead of specifying whether a message by the fsck machinery constitutes an error or a warning, let's specify an identifier relating to the concrete problem that was encountered. This is necessary for upcoming support to be able to demote certain errors to warnings. In the process, simplify the

Re: [PATCH v4 05/19] ref-filter: add parse_opt_merge_filter()

2015-06-22 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Junio C Hamano gits...@pobox.com writes: This is copied from 'builtin/branch.c' which will eventually be removed when we port 'branch.c' to use ref-filter APIs. Hmph. I somehow thought Matthieu's instruction was to finish tag.c side first

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

2015-06-22 Thread Johannes Schindelin
An fsck issue in a legacy repository might be so common that one would like not to bother the user with mentioning it at all. With this change, that is possible by setting the respective message type to ignore. This change abuses the missingEmail=warn test to verify that ignore is also accepted

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

2015-06-22 Thread Johannes Schindelin
The 'invalid tag name' and 'missing tagger entry' warnings can now be upgraded to errors by specifying `invalidTagName` and `missingTaggerEntry` in the receive.fsck.msg-id config setting. Incidentally, the missing tagger warning is now really shown as a warning (as opposed to being reported with

Re: 'eol' documentation confusion

2015-06-22 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: eol=lf or eol=crlf are the only useful settings. Everything else is ignored because it does not make sense. See convert.c: static enum eol git_path_check_eol() That makes me wonder... The original reasoning behind the current behaviour that we

Re: [Question] Is it normal for accented characters to be shown as decomposed Unicode on GNU/Linux?

2015-06-22 Thread Bastien Traverse
Le 22/06/2015 17:04, Charles Bailey a écrit : Note that these aren't decomposed (in the unicode decomposition sense) but are merely octal escaped representations of the utf-8 encoded file names. Thanks, I had read that term in similar context (German umlaut) and thought it was correctly

Re: Submodule and proxy server.

2015-06-22 Thread Johannes Löthberg
On 22/06, Jamie Archibald wrote: fatal: unable to access 'http://http://path/to/submodule/MySubmodule.git/': The requested URL returned error: 502 Did you copy this error verbatim? -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/

Re: apply --cached --whitespace=fix now failing on items added with add -N

2015-06-22 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Mon, Jun 22, 2015 at 9:29 PM, Patrick Higgins phigg...@google.com wrote: I like to use git to remove trailing whitespace from my files. I use the following ~/.gitconfig to make this convenient: [alias] wsadd = !sh -c 'git diff -- \$@\ | git

Re: [PATCH v4 08/19] parse-option: rename parse_opt_with_commit()

2015-06-22 Thread Karthik Nayak
On Mon, Jun 22, 2015 at 6:34 AM, Junio C Hamano gits...@pobox.com wrote: On Sun, Jun 21, 2015 at 1:48 PM, Karthik Nayak karthik@gmail.com wrote: Rename parse_opt_with_commit() to parse_opt_commit_object_name() to show that it can be used to obtain a list of commits and is not constricted

Re: [PATCH v4 08/19] parse-option: rename parse_opt_with_commit()

2015-06-22 Thread Karthik Nayak
On Mon, Jun 22, 2015 at 9:57 PM, Junio C Hamano gits...@pobox.com wrote: On Mon, Jun 22, 2015 at 8:38 AM, Karthik Nayak karthik@gmail.com wrote: On Mon, Jun 22, 2015 at 6:34 AM, Junio C Hamano gits...@pobox.com wrote: On Sun, Jun 21, 2015 at 1:48 PM, Karthik Nayak karthik@gmail.com

Re: [PATCH v4 00/11] add options to for-each-ref

2015-06-22 Thread Karthik Nayak
Just FYI, you can git format-patch -11 my-work~8 or something like that and get 01/11 to 11/11 even if you have more commits that are not yet ready near the tip. I usually do a `git format-patch a..b` but I missed out the b it seems ;-) Thanks! -- Regards, Karthik Nayak -- To unsubscribe

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

2015-06-22 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: + git --git-dir=dst/.git branch -D bogus + git --git-dir=dst/.git config --add \ + receive.fsck.missingEmail ignore + git --git-dir=dst/.git config --add \ + receive.fsck.badDate warn Funny

Submodule and proxy server.

2015-06-22 Thread Jamie Archibald
I am behind a proxy at work and I've setup a git repo with a submodule. Here are the commands I'm executing. $ mkdir MyProject $ cd MyProject $ git init $ git remote add origin http://path/to/repo/MyProject.git $ git config —add remote.origin.proxy $ git pull origin master MyProject has a

Re: apply --cached --whitespace=fix now failing on items added with add -N

2015-06-22 Thread Duy Nguyen
On Mon, Jun 22, 2015 at 9:29 PM, Patrick Higgins phigg...@google.com wrote: I like to use git to remove trailing whitespace from my files. I use the following ~/.gitconfig to make this convenient: [alias] wsadd = !sh -c 'git diff -- \$@\ | git apply --cached --whitespace=fix;\

Re: [Question] Is it normal for accented characters to be shown as decomposed Unicode on GNU/Linux?

2015-06-22 Thread Charles Bailey
On Mon, Jun 22, 2015 at 03:17:40PM +0200, Bastien Traverse wrote: test case: $ mkdir accent-test cd !$ $ git init $ touch rêve réunion $ git status On branch master Initial commit Untracked files: (use git add file... to include in what will be committed) r\303\251union

Re: [PATCH v4 06/19] ref-filter: implement '--merged' and '--no-merged' options

2015-06-22 Thread Karthik Nayak
On Mon, Jun 22, 2015 at 6:30 AM, Junio C Hamano gits...@pobox.com wrote: On Sun, Jun 21, 2015 at 1:48 PM, Karthik Nayak karthik@gmail.com wrote: +static void do_merge_filter(struct ref_filter_cbdata *ref_cbdata) +{ + struct rev_info revs; + int i, old_nr; + struct

Re: [PATCH v4 04/19] for-each-ref: add '--points-at' option

2015-06-22 Thread Karthik Nayak
On Tue, Jun 23, 2015 at 12:54 AM, Junio C Hamano gits...@pobox.com wrote: Matthieu Moy matthieu@grenoble-inp.fr writes: Karthik Nayak karthik@gmail.com writes: On Mon, Jun 22, 2015 at 6:15 AM, Junio C Hamano gits...@pobox.com wrote: 3 4 as a single patch may make more sense, if we

Re: Fast enumeration of objects

2015-06-22 Thread Junio C Hamano
Jeff King p...@peff.net writes: ... So my conclusions are: 1. Yes, the pipe/parsing overhead of a separate processor really is measurable. That's hidden in the wall-clock time if you have multiple cores, but you may care more about CPU time. I still think the flexibility

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Charles Bailey
On Mon, Jun 22, 2015 at 06:33:21AM -0400, Jeff King wrote: On Mon, Jun 22, 2015 at 04:38:22AM -0400, Jeff King wrote: + prepare_packed_git(); + for (p = packed_git; p; p = p-next) { + open_pack_index(p); + } Yikes. The fact that you need to do this means that

Re: [PATCH v3 12/19] initial_ref_transaction_commit(): check for duplicate refs

2015-06-22 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Error out if the ref_transaction includes more than one update for any refname. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 11 +++ 1 file changed, 11 insertions(+) This somehow feels like ehh, I now know better

Re: [PATCH v3 19/19] delete_ref(): use the usual convention for old_sha1

2015-06-22 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: The ref_transaction_update() family of functions use the following convention for their old_sha1 parameters: * old_sha1 == NULL: Don't check the old value at all. * is_null_sha1(old_sha1): Ensure that the reference didn't exist before the

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

2015-06-22 Thread Johannes Schindelin
Hi Junio, On 2015-06-22 20:04, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: +git --git-dir=dst/.git branch -D bogus +git --git-dir=dst/.git config --add \ +receive.fsck.missingEmail ignore +git --git-dir=dst/.git config --add \ +

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

2015-06-22 Thread Johannes Schindelin
Hi Junio, On 2015-06-22 20:02, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: Changes since v6: - camelCased message IDs - multiple author checking now as suggested by Junio - renamed `--quick` to `--connectivity-only`, better commit message -

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Mon, Jun 22, 2015 at 04:38:22AM -0400, Jeff King wrote: + prepare_packed_git(); + for (p = packed_git; p; p = p-next) { + open_pack_index(p); + } Yikes. The fact that you need to do this means that for_each_packed_object is buggy, IMHO.

[PATCHv6 1/3] git-rebase -i: add command drop to remove a commit

2015-06-22 Thread Galan Rémi
Instead of removing a line to remove the commit, you can use the command drop (just like pick or edit). It has the same effect as deleting the line (removing the commit) except that you keep a visual trace of your actions, allowing a better control and reducing the possibility of removing a commit

[PATCHv6 2/3] git rebase -i: warn about removed commits

2015-06-22 Thread Galan Rémi
Check if commits were removed (i.e. a line was deleted) and print warnings or stop git rebase depending on the value of the configuration variable rebase.missingCommitsCheck. This patch gives the user the possibility to avoid silent loss of information (losing a commit through deleting the line

[PATCHv6 3/3] git rebase -i: add static check for commands and SHA-1

2015-06-22 Thread Galan Rémi
Check before the start of the rebasing if the commands exists, and for the commands expecting a SHA-1, check if the SHA-1 is present and corresponds to a commit. In case of error, print the error, stop git rebase and prompt the user to fix with 'git rebase --edit-todo' or to abort. This allows to

Re: [PATCH v4 03/19] ref-filter: implement '--points-at' option

2015-06-22 Thread Eric Sunshine
On Sun, Jun 21, 2015 at 4:48 PM, Karthik Nayak karthik@gmail.com wrote: In 'tag -l' we have '--points-at' option which lets users list only tags which point to a particular commit. Implement this option in 'ref-filter.{c,h}' so that other commands can benefit from this. This is

Re: [PATCH v4 07/19] for-each-ref: add '--merged' and '--no-merged' options

2015-06-22 Thread Eric Sunshine
On Sun, Jun 21, 2015 at 4:48 PM, Karthik Nayak karthik@gmail.com wrote: Add the '--merged' and '--no-merged' options provided by 'ref-filter'. The '--merged' option lets the user to only list refs merged into the named commit. The '--no-merged' option lets the user to only list refs not

Re: [PATCH 2/2] Move unsigned long option parsing out of pack-objects.c

2015-06-22 Thread Junio C Hamano
Charles Bailey char...@hashpling.org writes: On Sun, Jun 21, 2015 at 07:25:44PM +0100, Charles Bailey wrote: From: Charles Bailey cbaile...@bloomberg.net diff --git a/parse-options.c b/parse-options.c index 80106c0..101b649 100644 --- a/parse-options.c +++ b/parse-options.c @@ -180,6

Re: [PATCH 8/7] cat-file: sort and de-dup output of --batch-all-objects

2015-06-22 Thread Charles Bailey
On Mon, Jun 22, 2015 at 07:06:32AM -0400, Jeff King wrote: On Mon, Jun 22, 2015 at 06:33:21AM -0400, Jeff King wrote: By the way, in addition to not showing objects in order, list-all-objects (and my cat-file option) may show duplicates. Do we want to sort -u for the user? It might be

Re: [PATCH v4 04/19] for-each-ref: add '--points-at' option

2015-06-22 Thread Eric Sunshine
On Sun, Jun 21, 2015 at 4:48 PM, Karthik Nayak karthik@gmail.com wrote: Add the '--points-at' option provided by 'ref-filter'. The option lets the user to pick only refs which point to a particular commit. Add documentation and tests for the same. Based-on-patch-by: Jeff King

Re: [PATCH 1/3] contrib/subtree: Use tabs consitently for indentation in tests

2015-06-22 Thread Eric Sunshine
On Mon, Jun 22, 2015 at 9:53 AM, Charles Bailey char...@hashpling.org wrote: contrib/subtree: Use tabs consitently for indentation in tests s/consitently/consistently/ Although subtrees tests uses more spaces for indentation than tabs, there are still quite a lot of lines indented with tabs.

Re: Improvements to integer option parsing

2015-06-22 Thread Charles Bailey
On 22 Jun 2015, at 23:09, Junio C Hamano gits...@pobox.com wrote: Charles Bailey char...@hashpling.org writes: - marginally improved the opterror message on failed parses I'd queue with s/a integer/a non-negative integer/. Ha! That's what I had before I submitted, but then the source

Re: [PATCH 8/7] cat-file: sort and de-dup output of --batch-all-objects

2015-06-22 Thread Jeff King
On Mon, Jun 22, 2015 at 11:03:50PM +0100, Charles Bailey wrote: The patch below does the sort/de-dup. I'd probably just squash it into patch 7, though. Woah, 8 out of 7! Did you get a chance to measure the performance hit of the sort? If not, I may test it out when I next get the chance.

config commands not working _Noobe question

2015-06-22 Thread Greg Ledger
after adding git config ‹global user.name Greg Ledger and git config ‹global user.email gled...@glcdelivers.com, when I run: source ~/.gitconfig I get -bash: [user]: command not found -bash: name: command not found -bash: email: command not found -bash: [color]: command not found -bash: ui:

Re: Improvements to integer option parsing

2015-06-22 Thread Junio C Hamano
Charles Bailey char...@hashpling.org writes: This is a re-roll of the first two patches in my previous series which used to include filter-objects which is now a separate topic. [PATCH 1/2] Correct test-parse-options to handle negative ints The first one has changed only in that I've moved

Re: [PATCH 2/2] Move unsigned long option parsing out of pack-objects.c

2015-06-22 Thread Junio C Hamano
Charles Bailey char...@hashpling.org writes: From: Charles Bailey cbaile...@bloomberg.net The unsigned long option parsing (including 'k'/'m'/'g' suffix parsing) is more widely applicable. Add support for OPT_MAGNITUDE to parse-options.h and change pack-objects.c use this support. The

What's cooking in git.git (Jun 2015, #05; Mon, 22)

2015-06-22 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'. Some of the topics in flight have overlaps with each other and have been excluded from 'pu'; most notably, I think the remainder of

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Jeff King
On Mon, Jun 22, 2015 at 02:50:10PM -0700, Junio C Hamano wrote: We may want to take patch 1 separately for the maint-track, as it is really a bug-fix (albeit one that I do not think actually affects anyone in practice right now). Hmph, add_unseen_recent_objects_to_traversal() is the only

RFC/Pull Request: Refs db backend

2015-06-22 Thread David Turner
I've revived and modified Ronnie Sahlberg's work on the refs db backend. The work is on top of be3c13e5564, Junio's First batch for 2.5 cycle. I recognize that there have been changes to the refs code since then, and that there are some further changes in-flight from e.g. Michael Haggerty. If

Re: 'eol' documentation confusion

2015-06-22 Thread Torsten Bögershausen
On 06/21/2015 04:16 PM, Robert Dailey wrote: On Sun, Jun 21, 2015 at 9:04 AM, Robert Dailey rcdailey.li...@gmail.com wrote: Upon inspection of the gitattributes documentation page here: https://git-scm.com/docs/gitattributes When comparing the documentation for 'text' with 'eol', I see the

Re: Sporadic test failures on OSX 10.10.3

2015-06-22 Thread Eric Sunshine
On Sat, Jun 20, 2015 at 5:47 AM, Heiko Voigt hvo...@hvoigt.net wrote: I am currently experiencing sporadic test failures on Mac OS X 10.10.3: Test Summary Report --- t7503-pre-commit-hook.sh (Wstat: 256 Tests: 11 Failed: 1) Failed test: 9

[PATCH 6/7] cat-file: split batch_one_object into two stages

2015-06-22 Thread Jeff King
There are really two things going on in this function: 1. We convert the name we got on stdin to a sha1. 2. We look up and print information on the sha1. Let's split out the second half so that we can call it separately. Signed-off-by: Jeff King p...@peff.net --- builtin/cat-file.c | 39

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Jeff King
On Mon, Jun 22, 2015 at 04:38:22AM -0400, Jeff King wrote: + prepare_packed_git(); + for (p = packed_git; p; p = p-next) { + open_pack_index(p); + } Yikes. The fact that you need to do this means that for_each_packed_object is buggy, IMHO. I'll send a patch. Here's

[PATCH 1/7] for_each_packed_object: automatically open pack index

2015-06-22 Thread Jeff King
When for_each_packed_object is called, we call prepare_packed_git() to make sure we have the actual list of packs. But the latter does not actually open the pack indices, meaning that pack-nr_objects may simply be 0 if the pack has not otherwise been used since the program started. In practice,

[PATCH 3/7] cat-file: move batch_options definition to top of file

2015-06-22 Thread Jeff King
That way all of the functions can make use of it. Signed-off-by: Jeff King p...@peff.net --- builtin/cat-file.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 6cb..d4101b7 100644 --- a/builtin/cat-file.c +++

[PATCH 2/7] cat-file: minor style fix in options list

2015-06-22 Thread Jeff King
We do not put extra whitespace before the first macro argument. Signed-off-by: Jeff King p...@peff.net --- builtin/cat-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 049a95f..6cb 100644 --- a/builtin/cat-file.c +++

[PATCH 8/7] cat-file: sort and de-dup output of --batch-all-objects

2015-06-22 Thread Jeff King
On Mon, Jun 22, 2015 at 06:33:21AM -0400, Jeff King wrote: By the way, in addition to not showing objects in order, list-all-objects (and my cat-file option) may show duplicates. Do we want to sort -u for the user? It might be nice for them to always get a de-duped and sorted list. Aside from

Re: [PATCH v4 05/19] ref-filter: add parse_opt_merge_filter()

2015-06-22 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: This is copied from 'builtin/branch.c' which will eventually be removed when we port 'branch.c' to use ref-filter APIs. Hmph. I somehow thought Matthieu's instruction was to finish tag.c side first I would call in advice rather than instruction. I

[PATCH 7/7] cat-file: add --batch-all-objects option

2015-06-22 Thread Jeff King
It can sometimes be useful to examine all objects in the repository. Normally this is done with git rev-list --all --objects, but: 1. That shows only reachable objects. You may want to look at all available objects. 2. It's slow. We actually open each object to walk the graph. If

[PATCH 4/7] cat-file: add --buffer option

2015-06-22 Thread Jeff King
We use a direct write() to output the results of --batch and --batch-check. This is good for processes feeding the input and reading the output interactively, but it introduces measurable overhead if you do not want this feature. For example, on linux.git: $ git rev-list --objects --all | cut

[PATCH 5/7] cat-file: stop returning value from batch_one_object

2015-06-22 Thread Jeff King
If batch_one_object returns an error code, we stop reading input. However, it will only do so if we feed it NULL, which cannot happen; we give it the buf member of a strbuf, which is always non-NULL. We did originally stop on other errors (like a missing object), but this was changed in 3c076db

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Jeff King
On Sun, Jun 21, 2015 at 08:20:31PM +0100, Charles Bailey wrote: +OPTIONS +--- + +-v:: +--verbose:: + Output in the followin format instead of just printing object ids: + sha1 SP type SP size s/followin/g/ +int cmd_list_all_objects(int argc, const char **argv, const char

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Duy Nguyen
On Mon, Jun 22, 2015 at 2:20 AM, Charles Bailey char...@hashpling.org wrote: From: Charles Bailey cbaile...@bloomberg.net list-all-objects is a command to print the ids of all objects in the object database of a repository. It is designed as a low overhead interface for scripts that want to

Re: broken repo after power cut

2015-06-22 Thread Richard Weinberger
Am 22.06.2015 um 02:35 schrieb Theodore Ts'o: On Sun, Jun 21, 2015 at 03:07:41PM +0200, Richard Weinberger wrote: I was then shocked to learn that ext4 apparently has a default setting that allows it to truncate files upon power failure (something about a full journal vs a fast journal or

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Charles Bailey
On Mon, Jun 22, 2015 at 04:38:22AM -0400, Jeff King wrote: On Sun, Jun 21, 2015 at 08:20:31PM +0100, Charles Bailey wrote: + prepare_packed_git(); + for (p = packed_git; p; p = p-next) { + open_pack_index(p); + } Yikes. The fact that you need to do this means that

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

2015-06-22 Thread Johannes Schindelin
Hi Junio, On 2015-06-22 06:21, Junio C Hamano wrote: On Fri, Jun 19, 2015 at 6:35 AM, Johannes Schindelin johannes.schinde...@gmx.de wrote: @@ -227,6 +277,10 @@ static int report(struct fsck_options *options, struct object *object, if (msg_type == FSCK_IGNORE)

Re: Fast enumeration of objects

2015-06-22 Thread Jeff King
On Sun, Jun 21, 2015 at 08:20:30PM +0100, Charles Bailey wrote: I performed some test timings of some different commands on a clone of the Linux kernel which was completely packed. Thanks for timing things. I think we can fairly easily improve a bit on what you have here. I'll go through my

Re: [PATCH] Add list-all-objects command

2015-06-22 Thread Jeff King
On Mon, Jun 22, 2015 at 04:57:28PM +0700, Duy Nguyen wrote: On Mon, Jun 22, 2015 at 2:20 AM, Charles Bailey char...@hashpling.org wrote: From: Charles Bailey cbaile...@bloomberg.net list-all-objects is a command to print the ids of all objects in the object database of a repository. It

[PATCH v3 3/6] bisect: simplify the addition of new bisect terms

2015-06-22 Thread Antoine Delaite
We create a file BISECT_TERMS in the repository .git to be read during a bisection. The fonctions to be changed if we add new terms are quite few. In git-bisect.sh : check_and_set_terms bisect_voc Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr

[PATCH v3 2/6] bisect: replace hardcoded bad|good by variables

2015-06-22 Thread Antoine Delaite
To add new tags like old/new and have keywords less confusing, the first step is to avoid hardcoding the keywords. The default mode is still bad/good. Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Louis Stuber stub...@ensimag.grenoble-inp.fr Signed-off-by:

[PATCH v3 6/6] bisect: allows any terms set by user

2015-06-22 Thread Antoine Delaite
Introduction of the git bisect terms function. The user can set its own terms. It will work exactly like before. The terms must be set before the start. Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr Signed-off-by: Louis Stuber stub...@ensimag.grenoble-inp.fr ---

[PATCH v3 5/6] revision: fix rev-list --bisect in old/new mode

2015-06-22 Thread Antoine Delaite
From: Louis Stuber stub...@ensimag.grenoble-inp.fr Calling git rev-list --bisect when an old/new mode bisection was started shows the help notice. This has been fixed by reading BISECT_TERMS in revision.c to find the correct bisect refs path (which was always refs/bisect/bad (or good) before and

[PATCH v3 4/6] bisect: add the terms old/new

2015-06-22 Thread Antoine Delaite
When not looking for a regression during a bisect but for a fix or a change in another given property, it can be confusing to use 'good' and 'bad'. This patch introduce `git bisect new` and `git bisect old` as an alternative to 'bad' and good': the commits which have a certain property must be

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

2015-06-22 Thread Johannes Schindelin
Hi Junio, On 2015-06-22 19:37, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: diff --git a/fsck.c b/fsck.c index 1a3f7ce..e81a342 100644 --- a/fsck.c +++ b/fsck.c @@ -64,30 +64,29 @@ enum fsck_msg_id { #undef MSG_ID #define STR(x) #x -#define MSG_ID(id,

[PATCH v3 1/6] bisect: correction of typo

2015-06-22 Thread Antoine Delaite
Signed-off-by: Antoine Delaite antoine.dela...@ensimag.grenoble-inp.fr --- bisect.c|2 +- t/t6030-bisect-porcelain.sh |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bisect.c b/bisect.c index 03d5cd9..5b8357d 100644 --- a/bisect.c +++ b/bisect.c

Re: [PATCH v4 04/19] for-each-ref: add '--points-at' option

2015-06-22 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: I have a slight preference for keeping the pairs not squashed. This way, we have a clear separation write reusable library code / use it. But I'm fine with squashing if others prefer. As I cannot firmly say that copy paste first and then later

Re: [PATCH v4 05/19] ref-filter: add parse_opt_merge_filter()

2015-06-22 Thread Karthik Nayak
On Mon, Jun 22, 2015 at 6:25 AM, Junio C Hamano gits...@pobox.com wrote: Why SHOUT here? Just used to typing macros in caps. Will change! This is copied from 'builtin/branch.c' which will eventually be removed when we port 'branch.c' to use ref-filter APIs. Hmph. I somehow thought

Re: [PATCH v4 04/19] for-each-ref: add '--points-at' option

2015-06-22 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Karthik Nayak karthik@gmail.com writes: On Mon, Jun 22, 2015 at 6:15 AM, Junio C Hamano gits...@pobox.com wrote: 3 4 as a single patch may make more sense, if we were to tolerate the let's copy paste first and then later remove the

Re: [PATCH v4 04/19] for-each-ref: add '--points-at' option

2015-06-22 Thread Karthik Nayak
On Mon, Jun 22, 2015 at 6:15 AM, Junio C Hamano gits...@pobox.com wrote: 3 4 as a single patch may make more sense, if we were to tolerate the let's copy paste first and then later remove the duplicate as a way to postpone touching tag.c side in order to first concentrate on for-each-ref.

Re: [PATCH v4 04/19] for-each-ref: add '--points-at' option

2015-06-22 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com writes: On Mon, Jun 22, 2015 at 6:15 AM, Junio C Hamano gits...@pobox.com wrote: 3 4 as a single patch may make more sense, if we were to tolerate the let's copy paste first and then later remove the duplicate as a way to postpone touching tag.c side in

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

2015-06-22 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: Changes since v6: - camelCased message IDs - multiple author checking now as suggested by Junio - renamed `--quick` to `--connectivity-only`, better commit message - `fsck.skipList` is now handled correctly (and not mistaken for a

Re: config commands not working _Noobe question

2015-06-22 Thread Christian Couder
On Tue, Jun 23, 2015 at 1:31 AM, Greg Ledger gled...@glcdelivers.com wrote: after adding git config ‹global user.name Greg Ledger and git config ‹global user.email gled...@glcdelivers.com, when I run: source ~/.gitconfig The ~/.gitconfig file is not a shell script. You should not source it. It

Re: RFC/Pull Request: Refs db backend

2015-06-22 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: I've revived and modified Ronnie Sahlberg's work on the refs db backend. The work is on top of be3c13e5564, Junio's First batch for 2.5 cycle. I recognize that there have been changes to the refs code since then, and that there are some

[PATCH v2 2/7] bisect: replace hardcoded bad|good by variables

2015-06-22 Thread Antoine Delaite
Matthieu Moy matthieu@grenoble-inp.fr wrote: Being an acceptable ref name is a constraint you have to check (Junio already mentionned check-ref-format). I think quoting variables makes sense too I don't get how 'git check-ref-format' works exactly. It says it needs at least one slash in

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

2015-06-22 Thread Johannes Schindelin
Hi Junio, On 2015-06-21 22:35, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: On 2015-06-21 19:15, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: That's brilliant. Just to make sure I am reading you correctly, you mean the current

Re: broken repo after power cut

2015-06-22 Thread Theodore Ts'o
On Mon, Jun 22, 2015 at 01:19:59PM +0200, Richard Weinberger wrote: The bottome lins is that if you care about files being written, you need to use fsync(). Should git use fsync() by default? Well, if you are willing to accept that if your system crashes within a second or so of your

[Question] Is it normal for accented characters to be shown as decomposed Unicode on GNU/Linux?

2015-06-22 Thread Bastien Traverse
Hi everybody, I have a repository where some files and folders contain accented characters due to being in French. Such names include rêve (dream), réunion (meeting) etc. Whether already in version control or not, git tools only show their *decomposed* representation (I use a UTF-8 locale, see

[PATCH 2/3] contrib/subtree: Fix broken -chains and revealed test error

2015-06-22 Thread Charles Bailey
From: Charles Bailey cbaile...@bloomberg.net This fixes two instances where a -chain was broken in the subtree tests and fixes a test error that was revealed because of this. Many tests in t7900-subtree.sh make a commit and then use 'undo' to reset the state for the next test. In the 'check hash

  1   2   >