Re: RFC/Pull Request: Refs db backend

2015-06-22 Thread Junio C Hamano
David Turner 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 further changes in-flig

Re: config commands not working _Noobe question

2015-06-22 Thread Christian Couder
On Tue, Jun 23, 2015 at 1:31 AM, Greg Ledger 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 is a text file that

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

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: comman

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 t

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 ch

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 bc/object-id

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 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. As tabs conform > w

Re: Improvements to integer option parsing

2015-06-22 Thread Charles Bailey
> On 22 Jun 2015, at 23:09, Junio C Hamano wrote: > > Charles Bailey 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 line got quite long (which c

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 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 merged into the name

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 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 > Mentored-by: Christian

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 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 duplicated from tag.c, we

Re: Improvements to integer option parsing

2015-06-22 Thread Junio C Hamano
Charles Bailey 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 the additional

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

2015-06-22 Thread Junio C Hamano
Charles Bailey writes: > From: Charles Bailey > > 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 error behavior on parse errors follows tha

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 mig

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

2015-06-22 Thread Junio C Hamano
Charles Bailey writes: > On Sun, Jun 21, 2015 at 07:25:44PM +0100, Charles Bailey wrote: >> From: Charles Bailey >> >> diff --git a/parse-options.c b/parse-options.c >> index 80106c0..101b649 100644 >> --- a/parse-options.c >> +++ b/parse-options.c >> @@ -180,6 +180,23 @@ static int get_value(s

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

2015-06-22 Thread Junio C Hamano
Jeff King 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

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 mea

[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

[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 c

[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 in

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 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 v3 19/19] delete_ref(): use the usual convention for old_sha1

2015-06-22 Thread Junio C Hamano
Michael Haggerty 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 transaction. > * ot

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 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

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

2015-06-22 Thread Junio C Hamano
Michael Haggerty writes: > Error out if the ref_transaction includes more than one update for any > refname. > > Signed-off-by: Michael Haggerty > --- > refs.c | 11 +++ > 1 file changed, 11 insertions(+) This somehow feels like "ehh, I now know better and this function should have bee

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 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_ty

[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 Signed-off-by: Louis Stuber --- Documentation/git-bisect.txt | 19 git-bisect.sh

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

2015-06-22 Thread Antoine Delaite
From: Louis Stuber 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 can be refs/bisect/new (old) now

[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 mar

[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 Signed-off-by: Louis Stuber Signed-off-by: Valentin

[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 Signed-off-by: Louis Stuber Signed-off-by: Valentin Duperray Signed-off-by: Franck Jonas Signed-off-by: Lucien

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

2015-06-22 Thread Antoine Delaite
Signed-off-by: Antoine Delaite --- 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 @@ -743,7 +743,7 @@ static void handle_ba

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

2015-06-22 Thread Junio C Hamano
Junio C Hamano 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 > clean-up

Re: Fast enumeration of objects

2015-06-22 Thread Junio C Hamano
Jeff King 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 is worth

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 wrote: > Matthieu Moy writes: > >> Karthik Nayak writes: >> >>> On Mon, Jun 22, 2015 at 6:15 AM, Junio C Hamano 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 rem

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

2015-06-22 Thread Junio C Hamano
Matthieu Moy writes: > Karthik Nayak writes: > >> On Mon, Jun 22, 2015 at 6:15 AM, Junio C Hamano 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

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

2015-06-22 Thread Matthieu Moy
Karthik Nayak writes: > On Mon, Jun 22, 2015 at 6:15 AM, Junio C Hamano 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

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 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. > > I have

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 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 Matthieu's ins

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

2015-06-22 Thread Junio C Hamano
Johannes Schindelin 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 double-SP (will local

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

2015-06-22 Thread Junio C Hamano
Johannes Schindelin 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 message > type se

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

2015-06-22 Thread Junio C Hamano
Johannes Schindelin 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 MSG_ID(id, msg_type)

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

2015-06-22 Thread Junio C Hamano
Duy Nguyen writes: > On Mon, Jun 22, 2015 at 9:29 PM, Patrick Higgins 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 >> --white

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 wrote: > On Mon, Jun 22, 2015 at 8:38 AM, Karthik Nayak wrote: >> On Mon, Jun 22, 2015 at 6:34 AM, Junio C Hamano wrote: >>> On Sun, Jun 21, 2015 at 1:48 PM, Karthik Nayak >>> wrote: Rename parse_opt_with_commit() to parse_opt_commit_object_

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 wrote: > On Mon, Jun 22, 2015 at 6:34 AM, Junio C Hamano wrote: >> On Sun, Jun 21, 2015 at 1:48 PM, Karthik Nayak 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

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

2015-06-22 Thread Junio C Hamano
Matthieu Moy writes: > Junio C Hamano 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" rath

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 de

Re: 'eol' documentation confusion

2015-06-22 Thread Junio C Hamano
Torsten Bögershausen 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 ignore unkno

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/ signatur

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 wrote: > On Sun, Jun 21, 2015 at 1:48 PM, Karthik Nayak 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 to usage of '--contains' option.

[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 accep

[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. config setting. Incidentally, the missing tagger warning is now really shown as a warning (as opposed to being reported with the "er

[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 --- fsck.c | 13 +++-- t/t5504-fetch-receive-strict.sh | 11

[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 --- fsck.c

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

2015-06-22 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- 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 +++ b/Documentation/config.txt @@ -2205,6 +2205,20 @

[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 fsck.missi

[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 11/19] fsck: Add a simple test for receive.fsck.

2015-06-22 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- 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 --- a/t/t5504-fetch-receive-strict.sh +++ b/t/t5504-fet

[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 lines

[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 --- fsck.c | 49 +++-- 1 file changed, 27 insertions

[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 liv

[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 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 m

[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. to missingCommitter=warn, but

[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 r

[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 fixing

[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 th

[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. lines in the config, the latter configuration w

[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 --- builtin/fsck.c | 20 +-- builtin/index-pack.c | 9 +-- builtin/unpac

[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, 'missingemail=

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 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 memcmp(string,

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 wrote: > On Sun, Jun 21, 2015 at 1:48 PM, Karthik Nayak wrote: >> +static void do_merge_filter(struct ref_filter_cbdata *ref_cbdata) >> +{ >> + struct rev_info revs; >> + int i, old_nr; >> + struct ref_filter *filter = ref_cbdata->

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 ..." to include in what will be committed) > > "r\30

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 unsubscr

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 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;\ >

git gui is not GIT_TRACE=1 compatible

2015-06-22 Thread anatoly techtonik
https://github.com/git-for-windows/git/issues/218#issuecomment-114085764 -- To unsubscribe from this list: send the line "unsubscribe git" in

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

2015-06-22 Thread Patrick Higgins
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;\ git checkout -- ${1-.} \"$@\"' -" The wsadd alias doesn't work with

[PATCH v3 02/19] remove_branches(): remove temporary

2015-06-22 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- builtin/remote.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/remote.c b/builtin/remote.c index f4a6ec9..53b8e13 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -756,8 +756,7 @@ static int remove_branches(struct string_l

[PATCH v3 10/19] initial_ref_transaction_commit(): function for initial ref creation

2015-06-22 Thread Michael Haggerty
"git clone" uses shortcuts when creating the initial set of references: * It writes them directly to packed-refs. * It doesn't lock the individual references (though it does lock the packed-refs file). * It doesn't check for refname conflicts between two new references or between one new ref

[PATCH v3 09/19] repack_without_refs(): make function private

2015-06-22 Thread Michael Haggerty
It is no longer called from outside of the refs module. Also move its docstring and change it to imperative voice. Signed-off-by: Michael Haggerty --- refs.c | 9 - refs.h | 11 --- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/refs.c b/refs.c index 19afc4d..b2

[PATCH v3 18/19] cmd_update_ref(): make logic more straightforward

2015-06-22 Thread Michael Haggerty
Restructure the code to avoid clearing oldsha1 when oldval is unset. It's value is not needed in that case, so this change makes it more obvious that its initialization is consistent with its later use. Signed-off-by: Michael Haggerty --- builtin/update-ref.c | 13 ++--- 1 file changed,

[PATCH v3 16/19] check_branch_commit(): make first parameter const

2015-06-22 Thread Michael Haggerty
Make it clear that this function does not overwrite its first argument. Signed-off-by: Michael Haggerty --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/branch.c b/builtin/branch.c index b42e5b6..47e3eb9 100644 --- a/builtin/branch.c +++ b/builtin/

[PATCH v3 13/19] initial_ref_transaction_commit(): check for ref D/F conflicts

2015-06-22 Thread Michael Haggerty
In initial_ref_transaction_commit(), check for D/F conflicts (i.e., the type of conflict that exists between "refs/foo" and "refs/foo/bar") among the references being created and between the references being created and any hypothetical existing references. Ideally, there shouldn't *be* any existi

[PATCH v3 03/19] delete_ref(): handle special case more explicitly

2015-06-22 Thread Michael Haggerty
delete_ref() uses a different convention for its old_sha1 parameter than, say, ref_transaction_delete(): NULL_SHA1 means not to check the old value. Make this fact a little bit clearer in the code by handling it in explicit, commented code rather than burying it in a conditional expression. Signed

[PATCH v3 00/19] Improve "refs" encapsulation and speed up deletes

2015-06-22 Thread Michael Haggerty
This is v3 of the series. I think I have addressed all of the feedback from v1 [1] and v2 [2]. Thanks to Stefan, Junio, and Peff for their feedback about v2. There are three significant changes since v2: * Add a patch delete_refs(): bail early if the packed-refs file cannot be rewritten

[PATCH v3 08/19] prune_refs(): use delete_refs()

2015-06-22 Thread Michael Haggerty
The old version just looped over the references to delete, calling delete_ref() on each one. But that has quadratic behavior, because each call to delete_ref() might have to rewrite the packed-refs file. This can be very expensive in a repository with a large number of references. In some (admitted

[PATCH v3 07/19] prune_remote(): use delete_refs()

2015-06-22 Thread Michael Haggerty
This slightly changes how errors are reported. The old and new code both report errors that come from repack_without_refs() the same way. But if an error occurs within delete_ref(), the old version only emitted an error within delete_ref() without further comment. The new version (in delete_refs())

[PATCH v3 17/19] update_ref(): don't read old reference value before delete

2015-06-22 Thread Michael Haggerty
If we are deleting the reference, then we don't need to read the reference's old value. It doesn't provide any race safety, because the value read just before the delete is no "better" than the value that would be read under lock during the delete. And even if the reference previously didn't exist,

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

2015-06-22 Thread Michael Haggerty
Error out if the ref_transaction includes more than one update for any refname. Signed-off-by: Michael Haggerty --- refs.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/refs.c b/refs.c index 31661c7..53d9e45 100644 --- a/refs.c +++ b/refs.c @@ -4087,12 +4087,22 @@ int initial_

[PATCH v3 14/19] refs: move the remaining ref module declarations to refs.h

2015-06-22 Thread Michael Haggerty
Some functions from the refs module were still declared in cache.h. Move them to refs.h. Signed-off-by: Michael Haggerty --- archive.c | 1 + builtin/blame.c | 1 + builtin/fast-export.c | 1 + builtin/fmt-merge-msg.c | 1 + builtin/init-db.c | 1 + builti

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

2015-06-22 Thread Michael Haggerty
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 transaction. * otherwise: Ensure that the reference had t

[PATCH v3 05/19] delete_refs(): make error message more generic

2015-06-22 Thread Michael Haggerty
Change the error message from Could not remove branch %s to could not remove reference %s First of all, the old error message referred to "branch refs/remotes/origin/foo", which was awkward even for the existing caller. Normally we would refer to a reference like that as either "remote-

[PATCH v3 15/19] refs.h: add some parameter names to function declarations

2015-06-22 Thread Michael Haggerty
Signed-off-by: Michael Haggerty --- refs.h | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/refs.h b/refs.h index b22e308..c9596ea 100644 --- a/refs.h +++ b/refs.h @@ -62,7 +62,7 @@ extern int read_ref_full(const char *refname, int resolve_flags,

[PATCH v3 06/19] delete_refs(): bail early if the packed-refs file cannot be rewritten

2015-06-22 Thread Michael Haggerty
If we fail to delete the doomed references from the packed-refs file, then it is unsafe to delete their loose references, because doing so might expose a value from the packed-refs file that is obsolete and perhaps even points at an object that has been garbage collected. So if repack_without_refs

[PATCH v3 11/19] refs: remove some functions from the module's public interface

2015-06-22 Thread Michael Haggerty
The following functions are no longer used from outside the refs module: * lock_packed_refs() * add_packed_ref() * commit_packed_refs() * rollback_packed_refs() So make these functions private. This is an important step, because it means that nobody outside of the refs module needs to know the d

[PATCH v3 04/19] delete_refs(): new function for the refs API

2015-06-22 Thread Michael Haggerty
Move the function remove_branches() from builtin/remote.c to refs.c, rename it to delete_refs(), and make it public. Signed-off-by: Michael Haggerty --- builtin/remote.c | 21 + refs.c | 19 +++ refs.h | 7 +++ 3 files changed, 27 inse

[PATCH v3 01/19] delete_ref(): move declaration to refs.h

2015-06-22 Thread Michael Haggerty
Also * Add a docstring * Rename the second parameter to "old_sha1", to be consistent with the convention used elsewhere in the refs module Signed-off-by: Michael Haggerty --- cache.h | 2 -- refs.c | 5 +++-- refs.h | 10 ++ 3 files changed, 13 insertions(+), 4 deletions(-) diff

[PATCH 3/3] contrib/subtree: Small tidy-up to test

2015-06-22 Thread Charles Bailey
From: Charles Bailey There's no need to switch branches to parse another branch's ancestry. Signed-off-by: Charles Bailey --- contrib/subtree/t/t7900-subtree.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-

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

2015-06-22 Thread Charles Bailey
From: Charles Bailey Although subtrees tests uses more spaces for indentation than tabs, there are still quite a lot of lines indented with tabs. As tabs conform with Git coding guidelines resolve the inconsistency in favour of tabs. Signed-off-by: Charles Bailey --- contrib/subtree/t/t7900-su

  1   2   >