[PATCH] docs: typo: s/isimilar/similar/

2018-10-05 Thread Michael Witten
Signed-off-by: Michael Witten --- Documentation/git-rebase.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 1fbc6ebcde..432baabe33 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt

[PATCH] docs: graph: Remove unnecessary `graph_update()' call

2018-10-05 Thread Michael Witten
The sample code calls `get_revision()' followed by `graph_update()', but the documentation and source code indicate that `get_revision()' already calls `graph_update()' for you. Signed-off-by: Michael Witten --- Documentation/technical/api-history-graph.txt | 1 - 1 file changed, 1 deletion(-)

[PATCH] docs: typo: s/go/to/

2018-10-05 Thread Michael Witten
Signed-off-by: Michael Witten --- Documentation/technical/api-history-graph.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/technical/api-history-graph.txt b/Documentation/technical/api-history-graph.txt index 18142b6d29..729d6a0cf3 100644 ---

Re: [PATCH v6 08/10] submodule: add a helper to check if it is safe to write to .gitmodules

2018-10-05 Thread Stefan Beller
> static int module_config(int argc, const char **argv, const char *prefix) > { > + enum { > + CHECK_WRITEABLE = 1 > + } command = 0; Can we have the default named? Then we would only use states from within the enum?

Re: [PATCH v3] coccicheck: process every source file at once

2018-10-05 Thread Jacob Keller
On Fri, Oct 5, 2018 at 12:00 PM Jeff King wrote: > That's OK, too, assuming people would actually want to use it. I'm also > OK shipping this (with the "make -j" fix you suggested) and seeing if > anybody actually complains. I assume there are only a handful of people > running coccicheck in the

[PATCH] builtin/grep.c: remote superflous submodule code

2018-10-05 Thread Stefan Beller
In f9ee2fcdfa (grep: recurse in-process using 'struct repository', 2017-08-02), we introduced a call to repo_read_gitmodules in builtin/grep to simplify the submodule handling. After ff6f1f564c4 (submodule-config: lazy-load a repository's .gitmodules file, 2017-08-03) this is no longer necessary,

[PATCH v5 5/7] tests: don't swallow Git errors upstream of pipes

2018-10-05 Thread Matthew DeVore
Some pipes in tests lose the exit code of git processes, which can mask unexpected behavior like crashes. Split these pipes up so that git commands are only at the end of pipes rather than the beginning or middle. The violations fixed in this patch were found in the process of fixing pipe

[PATCH v5 7/7] tests: order arguments to git-rev-list properly

2018-10-05 Thread Matthew DeVore
It is a common mistake to put positional arguments before flags when invoking git-rev-list. Order the positional arguments last. This patch skips git-rev-list invocations which include the --not flag, since the ordering of flags and positional arguments affects the behavior. This patch also skips

[PATCH v5 6/7] t9109: don't swallow Git errors upstream of pipes

2018-10-05 Thread Matthew DeVore
'git ... | foo' will mask any errors or crashes in git, so split up such pipes in this file. One testcase uses several separate pipe sequences in a row which are awkward to split up. Wrap the split-up pipe in a function so the awkwardness is not repeated. Also change that testcase's surrounding

[PATCH v5 4/7] t/*: fix ordering of expected/observed arguments

2018-10-05 Thread Matthew DeVore
Fix various places where the ordering was obviously wrong, meaning it was easy to find with grep. Signed-off-by: Matthew DeVore --- t/t-basic.sh | 2 +- t/t0021-conversion.sh | 4 +-- t/t1300-config.sh | 4 +--

[PATCH v5 2/7] Documentation: add shell guidelines

2018-10-05 Thread Matthew DeVore
Add the following guideline to Documentation/CodingGuidelines: Break overlong lines after "&&", "||", and "|", not before them; that way the command can continue to subsequent lines without backslash at the end. And the following to t/README (since it is specific to

[PATCH v5 1/7] t/README: reformat Do, Don't, Keep in mind lists

2018-10-05 Thread Matthew DeVore
The list of Don'ts for test writing has grown large such that it is hard to see at a glance which section an item is in. In other words, if I ignore a little bit of surrounding context, the "don'ts" look like "do's." To make the list more readable, prefix "Don't" in front of every first sentence

[PATCH v5 3/7] tests: standardize pipe placement

2018-10-05 Thread Matthew DeVore
Instead of using a line-continuation and pipe on the second line, take advantage of the shell's implicit line continuation after a pipe character. So for example, instead of some long line \ | next line use some long line | next line And add a blank

[PATCH v5 0/7] subject: Clean up tests for test_cmp arg ordering and pipe placement

2018-10-05 Thread Matthew DeVore
This version of the patchset fixes some wording and formatting issues pointed out by Junio. The commit message in the first patch has also been reworded. Thank you, Matt diff --git a/t/README b/t/README index 9a71d5732..ab9fa4230 100644 --- a/t/README +++ b/t/README @@ -394,7 +394,7 @@ This test

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 11:22:31PM +0200, René Scharfe wrote: > > diff --git a/fetch-pack.c b/fetch-pack.c > > index 53914563b5..c0a1b80f4c 100644 > > --- a/fetch-pack.c > > +++ b/fetch-pack.c > > @@ -606,6 +606,12 @@ static void filter_refs(struct fetch_pack_args *args, > >

[PATCH v11 6/8] list-objects-filter: use BUG rather than die

2018-10-05 Thread Matthew DeVore
In some cases in this file, BUG makes more sense than die. In such cases, a we get there from a coding error rather than a user error. 'return' has been removed following some instances of BUG since BUG does not return. Signed-off-by: Matthew DeVore --- list-objects-filter.c | 11 ---

[PATCH v11 5/8] revision: mark non-user-given objects instead

2018-10-05 Thread Matthew DeVore
Currently, list-objects.c incorrectly treats all root trees of commits as USER_GIVEN. Also, it would be easier to mark objects that are non-user-given instead of user-given, since the places in the code where we access an object through a reference are more obvious than the places where we access

[PATCH v11 8/8] list-objects-filter: implement filter tree:0

2018-10-05 Thread Matthew DeVore
Teach list-objects the "tree:0" filter which allows for filtering out all tree and blob objects (unless other objects are explicitly specified by the user). The purpose of this patch is to allow smaller partial clones. The name of this filter - tree:0 - does not explicitly specify that it also

[PATCH v11 7/8] list-objects-filter-options: do not over-strbuf_init

2018-10-05 Thread Matthew DeVore
The function gently_parse_list_objects_filter is either called with errbuf=STRBUF_INIT or errbuf=NULL, but that function calls strbuf_init when errbuf is not NULL. strbuf_init is only necessary if errbuf contains garbage, and risks a memory leak if errbuf already has a non-STRBUF_INIT state. It

[PATCH v11 4/8] rev-list: handle missing tree objects properly

2018-10-05 Thread Matthew DeVore
Previously, we assumed only blob objects could be missing. This patch makes rev-list handle missing trees like missing blobs. The --missing=* and --exclude-promisor-objects flags now work for trees as they already do for blobs. This is demonstrated in t6112. Signed-off-by: Matthew DeVore ---

[PATCH v11 2/8] list-objects: refactor to process_tree_contents

2018-10-05 Thread Matthew DeVore
This will be used in a follow-up patch to reduce indentation needed when invoking the logic conditionally. i.e. rather than: if (foo) { while (...) { /* this is very indented */ } } we will have: if (foo) process_tree_contents(...); Signed-off-by:

[PATCH v11 1/8] list-objects: store common func args in struct

2018-10-05 Thread Matthew DeVore
This will make utility functions easier to create, as done by the next patch. Signed-off-by: Matthew DeVore --- list-objects.c | 158 +++-- 1 file changed, 74 insertions(+), 84 deletions(-) diff --git a/list-objects.c b/list-objects.c index

[PATCH v11 3/8] list-objects: always parse trees gently

2018-10-05 Thread Matthew DeVore
If parsing fails when revs->ignore_missing_links and revs->exclude_promisor_objects are both false, we print the OID anyway in the die("bad tree object...") call, so any message printed by parse_tree_gently() is superfluous. Signed-off-by: Matthew DeVore --- list-objects.c | 4 +--- 1 file

[PATCH v11 0/8] filter: support for excluding all trees and blobs

2018-10-05 Thread Matthew DeVore
Here is a clean re-rollup fixing the issue I found earlier. It fixes a problem stemming from a discarded exit code, which masked a crash in Git. The crash was not a bug because an earlier test deleted a loose object file. The fix was to make that test manipulate a clone rather than the original

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-05 Thread René Scharfe
Am 05.10.2018 um 22:27 schrieb Jeff King: > On Fri, Oct 05, 2018 at 10:13:34PM +0200, René Scharfe wrote: > -{ - /* - * Note that this only looks at the ref lists the first time it's - * called. This works out in filter_refs() because even though it may - * add to

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 10:13:34PM +0200, René Scharfe wrote: > >> -{ > >> - /* > >> - * Note that this only looks at the ref lists the first time it's > >> - * called. This works out in filter_refs() because even though it may > >> - * add to "newlist" between calls, the additions will

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-05 Thread René Scharfe
Am 05.10.2018 um 00:11 schrieb René Scharfe: > Am 04.10.2018 um 23:38 schrieb Jonathan Tan: >> I don't think the concerns are truly separated - the first loop quoted >> needs to know that in the second loop, tip_oids is accessed only if >> there is at least one unmatched ref. > > Right, the two

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-05 Thread René Scharfe
Am 05.10.2018 um 00:07 schrieb Jeff King: > On Thu, Oct 04, 2018 at 05:09:39PM +0200, René Scharfe wrote: > >> tip_oids_contain() lazily loads refs into an oidset at its first call. >> It abuses the internal (sub)member .map.tablesize of that oidset to >> check if it has done that already. >> >>

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 10:01:31PM +0200, Ævar Arnfjörð Bjarmason wrote: > > There's unfortunately not a fast way of doing that. One option would be > > to keep a counter of "ungraphed commit objects", and have callers update > > it. Anybody admitting a pack via index-pack or unpack-objects can

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 04:00:12PM -0400, Derrick Stolee wrote: > On 10/5/2018 3:47 PM, Jeff King wrote: > > On Fri, Oct 05, 2018 at 03:41:40PM -0400, Derrick Stolee wrote: > > > > > > So can we really just take (total_objects - commit_graph_objects) and > > > > compare it to some threshold? > >

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Ævar Arnfjörð Bjarmason
On Fri, Oct 05 2018, Jeff King wrote: > On Fri, Oct 05, 2018 at 03:41:40PM -0400, Derrick Stolee wrote: > >> > So can we really just take (total_objects - commit_graph_objects) and >> > compare it to some threshold? >> >> The commit-graph only stores the number of _commits_, not total objects.

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Derrick Stolee
On 10/5/2018 3:47 PM, Jeff King wrote: On Fri, Oct 05, 2018 at 03:41:40PM -0400, Derrick Stolee wrote: So can we really just take (total_objects - commit_graph_objects) and compare it to some threshold? The commit-graph only stores the number of _commits_, not total objects. Oh, right, of

Re: [PATCH v3] coccicheck: process every source file at once

2018-10-05 Thread SZEDER Gábor
On Fri, Oct 05, 2018 at 03:02:16PM -0400, Jeff King wrote: > On Fri, Oct 05, 2018 at 08:39:04PM +0200, SZEDER Gábor wrote: > > > > It should still be a net win, since the total CPU seems to drop by a > > > factor of 3-4. > > > > Well, that's true when you have unlimited resources... :) or it's

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 03:41:40PM -0400, Derrick Stolee wrote: > > So can we really just take (total_objects - commit_graph_objects) and > > compare it to some threshold? > > The commit-graph only stores the number of _commits_, not total objects. Oh, right, of course. That does throw a monkey

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 09:42:49PM +0200, Ævar Arnfjörð Bjarmason wrote: > > that I imagine will create a lot of new problems. (We're just now > > allowing C99 -- I don't even want to think about what kind of compiler > > issues we'll run into on antique systems trying to use C++). > > ...But

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-05 Thread Ævar Arnfjörð Bjarmason
On Fri, Oct 05 2018, Jeff King wrote: > On Fri, Oct 05, 2018 at 09:12:09PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> > I'm not wild about declaring functions inside macros, just because it >> > makes tools like ctags like useful (but I have certainly been guilty of >> > it myself). I'd also

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 09:36:28PM +0200, René Scharfe wrote: > Am 05.10.2018 um 21:08 schrieb Jeff King: > > On Fri, Oct 05, 2018 at 08:48:27PM +0200, René Scharfe wrote: > >> +#define DEFINE_SORT(name, type, compare) \ > >> +static int compare##_void(const void *one,

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Derrick Stolee
On 10/5/2018 3:21 PM, Jeff King wrote: On Fri, Oct 05, 2018 at 09:45:47AM -0400, Derrick Stolee wrote: My misunderstanding was that your proposed change to gc computes the commit-graph in either of these two cases: (1) The auto-GC threshold is met. (2) There is no commit-graph file. And

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-05 Thread René Scharfe
Am 05.10.2018 um 21:08 schrieb Jeff King: > On Fri, Oct 05, 2018 at 08:48:27PM +0200, René Scharfe wrote: >> +#define DEFINE_SORT(name, type, compare)\ >> +static int compare##_void(const void *one, const void *two) \ >> +{

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 09:12:09PM +0200, Ævar Arnfjörð Bjarmason wrote: > > I'm not wild about declaring functions inside macros, just because it > > makes tools like ctags like useful (but I have certainly been guilty of > > it myself). I'd also worry that taking "code" as a macro parameter

Re: [PATCH 1/1] protocol: limit max protocol version per service

2018-10-05 Thread Stefan Beller
> > But given that we transport the version in env variables, we'd > > need to be extra careful if we just did not see the version > > in the --remote=. above? > > Sorry, I'm not sure I understand this. What about env variables requires > caution? By locally transporting the version via env

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 09:45:47AM -0400, Derrick Stolee wrote: > My misunderstanding was that your proposed change to gc computes the > commit-graph in either of these two cases: > > (1) The auto-GC threshold is met. > > (2) There is no commit-graph file. > > And what I hope to have instead

Re: [PATCH] grep: provide a noop --recursive option

2018-10-05 Thread Stefan Beller
On Fri, Oct 5, 2018 at 6:05 AM Mischa POSLAWSKY wrote: > > Junio C Hamano wrote 2018-10-05 1:19 (-0700): > > Stefan Beller writes: > > > > > git-grep is always file/tree recursive, but there is --recurse-submodules > > > which is off by default. Instead of providing a short alias to a noop, > >

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-05 Thread Ævar Arnfjörð Bjarmason
On Fri, Oct 05 2018, Jeff King wrote: > On Fri, Oct 05, 2018 at 12:59:02AM +0200, René Scharfe wrote: > >> We could also do something like this to reduce the amount of manual >> casting, but do we want to? (Macro at the bottom, three semi-random >> examples at the top.) >> [...] >> diff --git

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 08:48:27PM +0200, René Scharfe wrote: > If the comparison function has proper types then we need to declare a > version with void pointer parameters as well to give to qsort(3). I > think using cast function pointers is undefined. Perhaps like this? I think it's

Re: [PATCH v3] coccicheck: process every source file at once

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 08:39:04PM +0200, SZEDER Gábor wrote: > > It should still be a net win, since the total CPU seems to drop by a > > factor of 3-4. > > Well, that's true when you have unlimited resources... :) or it's > true even then, when I have just enough resources, but not much >

Re: [PATCH v3] coccicheck: process every source file at once

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 08:50:50PM +0200, SZEDER Gábor wrote: > On Fri, Oct 05, 2018 at 12:59:01PM -0400, Jeff King wrote: > > On Fri, Oct 05, 2018 at 04:53:35PM +, Keller, Jacob E wrote: > > > > > > Are we OK with saying 1.3-1.8GB is necessary to run coccicheck? That > > > > doesn't feel

Re: [PATCH v3] coccicheck: process every source file at once

2018-10-05 Thread SZEDER Gábor
On Fri, Oct 05, 2018 at 12:59:01PM -0400, Jeff King wrote: > On Fri, Oct 05, 2018 at 04:53:35PM +, Keller, Jacob E wrote: > > > > Are we OK with saying 1.3-1.8GB is necessary to run coccicheck? That > > > doesn't feel like an exorbitant request for a developer-only tool these > > > days, but

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-05 Thread René Scharfe
Am 05.10.2018 um 18:51 schrieb Jeff King: > On Fri, Oct 05, 2018 at 12:59:02AM +0200, René Scharfe wrote: > >> We could also do something like this to reduce the amount of manual >> casting, but do we want to? (Macro at the bottom, three semi-random >> examples at the top.) >> [...] >> diff

Re: [PATCH v3] coccicheck: process every source file at once

2018-10-05 Thread SZEDER Gábor
On Fri, Oct 05, 2018 at 12:25:17PM -0400, Jeff King wrote: > On Fri, Oct 05, 2018 at 02:40:48PM +0200, SZEDER Gábor wrote: > > > On Thu, Oct 04, 2018 at 07:17:47PM -0700, Jacob Keller wrote: > > > Junio, do you want me to update the commit message on my side with the > > > memory concerns? Or

Re: [PATCH v4 2/7] Documentation: add shell guidelines

2018-10-05 Thread Matthew DeVore
On Fri, Oct 5, 2018 at 9:48 AM Junio C Hamano wrote: > > Matthew DeVore writes: > > > Add the following guideline to Documentation/CodingGuidelines: > > > > &&, ||, and | should appear at the end of lines, not the > > beginning, and the \ line continuation character should be > >

Re: [PATCH v4 5/7] tests: don't swallow Git errors upstream of pipes

2018-10-05 Thread Matthew DeVore
I just realized that the changes to t9101 should actually be part of the next patch (6/7), not this one. I've fixed that for the next re-roll.

Re: [PATCH v4 5/7] tests: don't swallow Git errors upstream of pipes

2018-10-05 Thread Matthew DeVore
On Fri, Oct 5, 2018 at 9:48 AM Junio C Hamano wrote: > > Hopefully this is not a blind mechanical patch, as introduction of > unexpected temporary files in the working tree could interfere with > later tests (e.g. they may expect exact set of untracked files, and > these new temporary files would

[ANNOUNCE] Git for Windows 2.19.1

2018-10-05 Thread Johannes Schindelin
Dear Git users, It is my pleasure to announce that Git for Windows 2.19.1 is available from: https://gitforwindows.org/ Changes since Git for Windows v2.19.0 (September 11th 2018) New Features * Comes with Git v2.19.1. * Comes with Git LFS v2.5.2. * Comes with Git Credential

Re: [PATCH v3] coccicheck: process every source file at once

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 04:53:35PM +, Keller, Jacob E wrote: > > Are we OK with saying 1.3-1.8GB is necessary to run coccicheck? That > > doesn't feel like an exorbitant request for a developer-only tool these > > days, but I have noticed some people on the list tend to have lousier > >

[Announce] Git 2.14.5, 2.15.3, 2.16.5, 2.17.2, 2.18.1, and 2.19.1

2018-10-05 Thread Junio C Hamano
These releases fix a security flaw (CVE-2018-17456), which allowed an attacker to execute arbitrary code by crafting a malicious .gitmodules file in a project cloned with --recurse-submodules. When running "git clone --recurse-submodules", Git parses the supplied .gitmodules file for a URL field

Re: Is there some script to find un-delta-able objects?

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 06:44:25PM +0200, Ævar Arnfjörð Bjarmason wrote: > Some version of the former. Ones where we haven't found any (or much of) > useful deltas yet. E.g. say I had a repository with a lot of files > generated by this command at various points in the history: > > dd

RE: [PATCH v3] coccicheck: process every source file at once

2018-10-05 Thread Keller, Jacob E
> -Original Message- > From: Jeff King [mailto:p...@peff.net] > Sent: Friday, October 05, 2018 9:25 AM > To: SZEDER Gábor > Cc: Jacob Keller ; Keller, Jacob E > ; Git mailing list > Subject: Re: [PATCH v3] coccicheck: process every source file at once > > On Fri, Oct 05, 2018 at

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 12:59:02AM +0200, René Scharfe wrote: > We could also do something like this to reduce the amount of manual > casting, but do we want to? (Macro at the bottom, three semi-random > examples at the top.) > [...] > diff --git a/git-compat-util.h b/git-compat-util.h > index

Re: [PATCH v4 2/7] Documentation: add shell guidelines

2018-10-05 Thread Junio C Hamano
Matthew DeVore writes: > Add the following guideline to Documentation/CodingGuidelines: > > &&, ||, and | should appear at the end of lines, not the > beginning, and the \ line continuation character should be > omitted "should be omitted" sounds as if it is the norm to have

Re: [PATCH v4 5/7] tests: don't swallow Git errors upstream of pipes

2018-10-05 Thread Junio C Hamano
Matthew DeVore writes: > Some pipes in tests lose the exit code of git processes, which can mask > unexpected behavior like crashes. Split these pipes up so that git > commands are only at the end of pipes rather than the beginning or > middle. > > The violations fixed in this patch were found

Re: Is there some script to find un-delta-able objects?

2018-10-05 Thread Junio C Hamano
Jeff King writes: > On Fri, Oct 05, 2018 at 04:20:27PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> I.e. something to generate the .gitattributes file using this format: >> >> https://git-scm.com/docs/gitattributes#_packing_objects >> >> Some stuff is obvious, like "*.gpg binary -delta", but I'm

Re: [PATCH v3 1/3] help: redirect to aliased commands for "git cmd --help"

2018-10-05 Thread Junio C Hamano
Rasmus Villemoes writes: >> It also is strange to count from (0); if the patchset is rerolled >> again, I'd prefer to see these start counting from (1), in which >> case this item will become (3). > > If you prefer, I can send a v4. Sure, if you prefer, you can send a v4 for me to look at and

Re: [PATCH] branch: trivial style fix

2018-10-05 Thread Junio C Hamano
Tao Qingyun writes: > --- > builtin/branch.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/builtin/branch.c b/builtin/branch.c > index c396c41533..52aad0f602 100644 > --- a/builtin/branch.c > +++ b/builtin/branch.c > @@ -222,10 +222,11 @@ static int

Re: Is there some script to find un-delta-able objects?

2018-10-05 Thread Ævar Arnfjörð Bjarmason
On Fri, Oct 05 2018, Jeff King wrote: > On Fri, Oct 05, 2018 at 04:20:27PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> I.e. something to generate the .gitattributes file using this format: >> >> https://git-scm.com/docs/gitattributes#_packing_objects >> >> Some stuff is obvious, like "*.gpg

Re: [PATCH v3] coccicheck: process every source file at once

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 02:40:48PM +0200, SZEDER Gábor wrote: > On Thu, Oct 04, 2018 at 07:17:47PM -0700, Jacob Keller wrote: > > Junio, do you want me to update the commit message on my side with the > > memory concerns? Or could you update it to mention memory as a noted > > trade off. > > We

Re: [PATCH] branch: trivial style fix

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 05:52:14PM +0800, Tao Qingyun wrote: > diff --git a/builtin/branch.c b/builtin/branch.c > index c396c41533..52aad0f602 100644 > --- a/builtin/branch.c > +++ b/builtin/branch.c > @@ -222,10 +222,11 @@ static int delete_branches(int argc, const char **argv, > int force, int

Re: Is there some script to find un-delta-able objects?

2018-10-05 Thread Jeff King
On Fri, Oct 05, 2018 at 04:20:27PM +0200, Ævar Arnfjörð Bjarmason wrote: > I.e. something to generate the .gitattributes file using this format: > > https://git-scm.com/docs/gitattributes#_packing_objects > > Some stuff is obvious, like "*.gpg binary -delta", but I'm wondering if > there's some

[PATCH v3 0/1] Teach the builtin rebase about the builtin interactive rebase

2018-10-05 Thread Johannes Schindelin via GitGitGadget
The builtin rebase and the builtin interactive rebase have been developed independently, on purpose: Google Summer of Code rules specifically state that students have to work on independent projects, they cannot collaborate on the same project. The reason is probably the very fine tradition in

[PATCH v3 1/1] builtin rebase: prepare for builtin rebase -i

2018-10-05 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The builtin rebase and the builtin interactive rebase have been developed independently, on purpose: Google Summer of Code rules specifically state that students have to work on independent projects, they cannot collaborate on the same project. One fallout is that the

Re: [PATCH 1/1] rebase -i: introduce the 'break' command

2018-10-05 Thread Johannes Schindelin
Hi Junio, On Fri, 5 Oct 2018, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > From: Johannes Schindelin > > > > The 'edit' command can be used to cherry-pick a commit and then > > immediately drop out of the interactive rebase, with exit code 0, to let > > the

Re: [PATCH v4 1/7] t/README: reformat Do, Don't, Keep in mind lists

2018-10-05 Thread Matthew DeVore
On Thu, Oct 4, 2018 at 11:15 PM Junio C Hamano wrote: > > Matthew DeVore writes: > > > -Do's, don'ts & things to keep in mind > > +Do's & don'ts > > - > > We may not format this with AsciiDoc, but please shorten the > underline so that it aligns with the line

Is there some script to find un-delta-able objects?

2018-10-05 Thread Ævar Arnfjörð Bjarmason
I.e. something to generate the .gitattributes file using this format: https://git-scm.com/docs/gitattributes#_packing_objects Some stuff is obvious, like "*.gpg binary -delta", but I'm wondering if there's some repo scanner utility to spew this out for a given repo.

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Ævar Arnfjörð Bjarmason
On Fri, Oct 05 2018, Derrick Stolee wrote: > On 10/5/2018 9:05 AM, Ævar Arnfjörð Bjarmason wrote: >> On Fri, Oct 05 2018, Derrick Stolee wrote: >> >>> On 10/4/2018 5:42 PM, Ævar Arnfjörð Bjarmason wrote: I don't have time to polish this up for submission now, but here's a WIP patch

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Derrick Stolee
On 10/5/2018 9:05 AM, Ævar Arnfjörð Bjarmason wrote: On Fri, Oct 05 2018, Derrick Stolee wrote: On 10/4/2018 5:42 PM, Ævar Arnfjörð Bjarmason wrote: I don't have time to polish this up for submission now, but here's a WIP patch that implements this, highlights: * There's a

Re: [BUG] Error while trying to git apply a patch; works with patch -p1

2018-10-05 Thread SZEDER Gábor
On Fri, Oct 05, 2018 at 09:17:54AM -0300, Eneas Queiroz wrote: > Em qui, 4 de out de 2018 às 18:45, SZEDER Gábor > escreveu: > > > > On Thu, Oct 04, 2018 at 06:01:11PM -0300, Eneas Queiroz wrote: > > > I've sent this to the list 2 days ago, but I can't find it in the list > > > archives, so I'm

[PATCH v6 09/10] submodule: support reading .gitmodules when it's not in the working tree

2018-10-05 Thread Antonio Ospite
When the .gitmodules file is not available in the working tree, try using the content from the index and from the current branch. This covers the case when the file is part of the repository but for some reason it is not checked out, for example because of a sparse checkout. This makes it

[PATCH v6 08/10] submodule: add a helper to check if it is safe to write to .gitmodules

2018-10-05 Thread Antonio Ospite
Introduce a helper function named is_writing_gitmodules_ok() to verify that the .gitmodules file is safe to write. The function name follows the scheme of is_staging_gitmodules_ok(). The two symbolic constants GITMODULES_INDEX and GITMODULES_HEAD are used to get help from the C preprocessor in

[PATCH v6 05/10] submodule--helper: add a new 'config' subcommand

2018-10-05 Thread Antonio Ospite
Add a new 'config' subcommand to 'submodule--helper', this extra level of indirection makes it possible to add some flexibility to how the submodules configuration is handled. Signed-off-by: Antonio Ospite --- builtin/submodule--helper.c | 14 ++ t/t7411-submodule-config.sh | 27

[PATCH v6 10/10] t/helper: add test-submodule-nested-repo-config

2018-10-05 Thread Antonio Ospite
Add a test tool to exercise config_from_gitmodules(), in particular for the case of nested submodules. Add also a test to document that reading the submoudles config of nested submodules does not work yet when the .gitmodules file is not in the working tree but it still in the index. This is

[PATCH v6 02/10] submodule: factor out a config_set_in_gitmodules_file_gently function

2018-10-05 Thread Antonio Ospite
Introduce a new config_set_in_gitmodules_file_gently() function to write config values to the .gitmodules file. This is in preparation for a future change which will use the function to write to the .gitmodules file in a more controlled way instead of using "git config -f .gitmodules". The

[PATCH v6 04/10] t7411: be nicer to future tests and really clean things up

2018-10-05 Thread Antonio Ospite
Tests 5 and 7 in t/t7411-submodule-config.sh add two commits with invalid lines in .gitmodules but then only the second commit is removed. This may affect future subsequent tests if they assume that the .gitmodules file has no errors. Remove both the commits as soon as they are not needed

[PATCH v6 01/10] submodule: add a print_config_from_gitmodules() helper

2018-10-05 Thread Antonio Ospite
Add a new print_config_from_gitmodules() helper function to print values from .gitmodules just like "git config -f .gitmodules" would. This will be used by a new submodule--helper subcommand to be able to access the .gitmodules file in a more controlled way. Signed-off-by: Antonio Ospite ---

[PATCH v6 07/10] t7506: clean up .gitmodules properly before setting up new scenario

2018-10-05 Thread Antonio Ospite
In t/t7506-status-submodule.sh at some point a new scenario is set up to test different things, in particular new submodules are added which are meant to completely replace the previous ones. However before calling the "git submodule add" commands for the new layout, the .gitmodules file is

[PATCH v6 06/10] submodule: use the 'submodule--helper config' command

2018-10-05 Thread Antonio Ospite
Use the 'submodule--helper config' command in git-submodules.sh to avoid referring explicitly to .gitmodules by the hardcoded file path. This makes it possible to access the submodules configuration in a more controlled way. Signed-off-by: Antonio Ospite --- git-submodule.sh | 8 1

[PATCH v6 00/10] Make submodules work if .gitmodules is not checked out

2018-10-05 Thread Antonio Ospite
Hi, this series teaches git to try and read the .gitmodules file from the index (:.gitmodules) or from the current branch (HEAD:.gitmodules) when the file is not readily available in the working tree. This can be used, together with sparse checkouts, to enable submodule usage with programs like

[PATCH v6 03/10] t7411: merge tests 5 and 6

2018-10-05 Thread Antonio Ospite
Tests 5 and 6 check for the effects of the same commit, merge the two tests to make it more straightforward to clean things up after the test has finished. The cleanup will be added in a future commit. Signed-off-by: Antonio Ospite --- t/t7411-submodule-config.sh | 18 +- 1

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Ævar Arnfjörð Bjarmason
On Fri, Oct 05 2018, Derrick Stolee wrote: > On 10/4/2018 5:42 PM, Ævar Arnfjörð Bjarmason wrote: >> I don't have time to polish this up for submission now, but here's a WIP >> patch that implements this, highlights: >> >> * There's a gc.clone.autoDetach=false default setting which overrides

Re: [PATCH] grep: provide a noop --recursive option

2018-10-05 Thread Mischa POSLAWSKY
Junio C Hamano wrote 2018-10-05 1:19 (-0700): > Stefan Beller writes: > > > git-grep is always file/tree recursive, but there is --recurse-submodules > > which is off by default. Instead of providing a short alias to a noop, > > we could use -r for submodules. (And if you happen to have no > >

Re: [PATCH] grep: provide a noop --recursive option

2018-10-05 Thread Ævar Arnfjörð Bjarmason
On Fri, Oct 05 2018, Junio C Hamano wrote: > René Scharfe writes: > >> >> Recognize -r and --recursive as synonyms for --max-depth=-1 for >> compatibility with GNU grep; it's still the default for git grep. >> >> This also adds --no-recursive as synonym for --max-depth=0 for free, >> which is

Re: [PATCH v3] coccicheck: process every source file at once

2018-10-05 Thread SZEDER Gábor
On Thu, Oct 04, 2018 at 07:17:47PM -0700, Jacob Keller wrote: > Junio, do you want me to update the commit message on my side with the > memory concerns? Or could you update it to mention memory as a noted > trade off. We have been running 'make -j2 coccicheck' in the static analysis build job on

Re: [BUG] Error while trying to git apply a patch; works with patch -p1

2018-10-05 Thread Eneas Queiroz
Em qui, 4 de out de 2018 às 18:45, SZEDER Gábor escreveu: > > On Thu, Oct 04, 2018 at 06:01:11PM -0300, Eneas Queiroz wrote: > > I've sent this to the list 2 days ago, but I can't find it in the list > > archives, so I'm sending it again without files attached. I apologize > > if this is a

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-05 Thread Derrick Stolee
On 10/4/2018 6:59 PM, René Scharfe wrote: Am 01.10.2018 um 22:37 schrieb René Scharfe: Am 01.10.2018 um 21:26 schrieb Derrick Stolee: Good catch! I'm disappointed that we couldn't use type-checking here, as it is quite difficult to discover that the types are wrong here. Generics in C are

Re: [RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-05 Thread Derrick Stolee
On 10/4/2018 5:42 PM, Ævar Arnfjörð Bjarmason wrote: I don't have time to polish this up for submission now, but here's a WIP patch that implements this, highlights: * There's a gc.clone.autoDetach=false default setting which overrides gc.autoDetach if 'git gc --auto' is run via git-clone

LIFESTYLE EXPO TOKYO 2019 [January] - Here's why you should exhibit!

2018-10-05 Thread Eiichi Hasegawa LIFESTYLE EXPO TOKYO Show Management
Dear International Sales & Marketing Director, Zhejiang Wuchuan Industrial Co., Ltd Hello, this is Eiichi Hasegawa from LIFESTYLE EXPO TOKYO Show Management. Are you considering expanding your business to Japan, Asia-Pacific? If yes, this is your chance to exhibit at LIFESTYLE EXPO TOKYO 2019

Re: [PATCH v3 1/3] help: redirect to aliased commands for "git cmd --help"

2018-10-05 Thread Rasmus Villemoes
On 2018-10-05 10:19, Junio C Hamano wrote: > Rasmus Villemoes writes: > >> >> I believe that printing the "is aliased to" message also in case (2) has >> value: Depending on pager setup, or if the user has help.format=web, the >> message is still present immediately above the prompt when the

[PATCH] branch: trivial style fix

2018-10-05 Thread Tao Qingyun
--- builtin/branch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/branch.c b/builtin/branch.c index c396c41533..52aad0f602 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -222,10 +222,11 @@ static int delete_branches(int argc, const char **argv, int

Re: [PATCH 1/1] rebase -i: introduce the 'break' command

2018-10-05 Thread Jacob Keller
On Fri, Oct 5, 2018 at 1:17 AM Junio C Hamano wrote: > If one wants to emulate this with the versions of Git that are > currently deployed, would it be sufficient to insert "exec false" > instead of "break"? > > The reason I am asking is *not* to imply that we do not need this > new feature. It

Re: [PATCH v3 1/3] help: redirect to aliased commands for "git cmd --help"

2018-10-05 Thread Junio C Hamano
Rasmus Villemoes writes: > As discussed in the thread for v1 of this patch [1] [2], this changes the > rules for "git foo --help" when foo is an alias. > > (0) When invoked as "git help foo", we continue to print the "foo is > aliased to bar" message and nothing else. > > (1) If foo is an alias

Re: [PATCH] grep: provide a noop --recursive option

2018-10-05 Thread Junio C Hamano
Stefan Beller writes: > git-grep is always file/tree recursive, but there is --recurse-submodules > which is off by default. Instead of providing a short alias to a noop, > we could use -r for submodules. (And if you happen to have no > submodules, this is a noop for you) I am not sure if it is

  1   2   >