Re: git grep failure?

2019-08-20 Thread Wayne Walker
Please ignore my previous email. I have found what causes the problem. The files that it isn't matching against are symlinks (known to git, but git grep apparently doesn't grep what they point to. Sorry to have wasted anyone's time. Wayne Walker

git grep failure?

2019-08-20 Thread Wayne Walker
I use git grep constantly. Today it failed for me. It isn't looking at all the files for some reason. Am I somehow missing something? midsizeschools@ut:~/tams (master u= origin/master)$ git ls-files | wc 254 254 10062 midsizeschools@ut:~/tams (master u= origin/master)$ git grep -l . |

[PATCH v3] unpack-trees.c: distinguish ita files from empty files

2019-08-20 Thread Varun Naik
It is possible to delete a committed file from the index and then add it as intent-to-add. Several variations of "reset" and "checkout" should resurrect the file in the index from HEAD. "merge" (non-fast-forward), "cherry-pick", and "revert" should all fail with an error message. This patch provide

Bug: `git fetch --prune origin master:refs/foo` incorrectly prunes refs/foo

2019-08-20 Thread Lily Ballard
When using the --prune flag (or fetch.prune=true), a `git fetch` command that uses a refspec to update a ref that doesn’t exist remotely will behave incorrectly if the ref already exists locally. For example: > git fetch --prune master:refs/foo If refs/foo doesn’t exist, this command will creat

Bug: git push in a --mirror repository deletes all refs

2019-08-20 Thread Filippo Valsorda
When used in a repository cloned with --mirror, git push with refs on the command line deletes all unmentioned refs. This was investigated by @saleemrash1d on Twitter. I'm reporting their findings here and a reproduction below. > seems to be a regression. > TRANSPORT_PUSH_MIRROR is set by remote-

Re: git-p4: Clone p4 path with bidirectional integrations

2019-08-20 Thread Aaron Miller
Hi Andrey, Thanks so much for this detailed response, I really appreciate it. > First of all, git-p4 should normally take only one direction from > bidirectional integrations on its own. > Do you see "p4 branch defines a mapping from to , > but there exists another mapping from to already!"

Feedback on git switch and git restore

2019-08-20 Thread brian m. carlson
I just wanted to let folks know that I've seen multiple positive comments on Twitter today (at least 3) about "git switch" and "git restore". Folks seem to really like these new commands and are excited about the improved UI. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2

Re: git-p4: Clone p4 path with bidirectional integrations

2019-08-20 Thread Aaron Miller
Hi Luke, > It's possible that running with "-v" might give a bit more information. Here's the output from that. I've set git-p4.branchUser in this test to avoid needlessly cluttering the output since I have a huge amount of branches in my Perforce repo, but otherwise I used the exact script which

Re: [GSoC] My project blog

2019-08-20 Thread Matheus Tavares Bernardino
On Tue, Aug 20, 2019 at 9:16 AM Christian Couder wrote: > > Hi Matheus, > > On Tue, Aug 20, 2019 at 1:28 PM Olga Telezhnaya > wrote: > > > > вт, 20 авг. 2019 г. в 07:59, Matheus Tavares Bernardino > > : > > > > > > I just posted the penultimate report on my project: > > > https://matheustavares.g

Re: [PATCH 02/26] patch-id: convert to use the_hash_algo

2019-08-20 Thread brian m. carlson
On 2019-08-20 at 21:12:00, René Scharfe wrote: > So perhaps this on top? (Or squash it in, if you like, but it's > certainly not worth a re-roll.) Yeah, this seems sensible. I'll include it if I do a re-roll. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204 signature

Re: [PATCH] diff: skip GITLINK when lazy fetching missing objs

2019-08-20 Thread Jonathan Tan
> Jonathan Tan writes: > > > In 7fbbcb21b1 ("diff: batch fetching of missing blobs", 2019-04-08), > > diff was taught to batch the fetching of missing objects when operating > > on a partial clone, but was not taught to refrain from fetching > > GITLINKs. Teach diff to check if an object is a GIT

Re: Fully peel tags via for-each-ref?

2019-08-20 Thread Bryan Turner
On Mon, Aug 19, 2019 at 10:50 PM Junio C Hamano wrote: > > Bryan Turner writes: > > > Is there any way, with "git for-each-ref", to output the "fully" > > peeled SHA of a tag's ultimate target, regardless of how many layers > > must be traversed? > > > If %(*) does not peel fully (I do not recall

Re: [PATCH v3 02/13] t4014: s/expected/expect/

2019-08-20 Thread Eric Sunshine
On Tue, Aug 20, 2019 at 3:19 AM Denton Liu wrote: > For test cases, the usual convention is to name expected output files > "expect", not "expected". Replace all instances with "expected" with s/with "expected"/of "expected"/ > "expect" except for one case where the "expected" is used as the nam

Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-20 Thread Johannes Sixt
Am 20.08.19 um 21:29 schrieb Pratyush Yadav: > On 20/08/19 09:21PM, Johannes Sixt wrote: >> Please don't do this. This confirmation dialog is unacceptable in my >> workflow. I use reversals of hunks and lines frequently, almost like a >> secondary code editor. My safety net is the undo function of

Re: [PATCH] diff: skip GITLINK when lazy fetching missing objs

2019-08-20 Thread Junio C Hamano
Jonathan Tan writes: > In 7fbbcb21b1 ("diff: batch fetching of missing blobs", 2019-04-08), > diff was taught to batch the fetching of missing objects when operating > on a partial clone, but was not taught to refrain from fetching > GITLINKs. Teach diff to check if an object is a GITLINK before

Re: [PATCH 1/1] commit-graph: add --[no-]progress to write and verify.

2019-08-20 Thread Eric Sunshine
On Tue, Aug 20, 2019 at 2:38 PM Garima Singh via GitGitGadget wrote: > Add --[no-]progress to git commit-graph write and verify. > The progress feature was introduced in 7b0f229 > ("commit-graph write: add progress output", 2018-09-17) but > the ability to opt-out was overlooked. > > Signed-off-by

Re: [PATCH 02/26] patch-id: convert to use the_hash_algo

2019-08-20 Thread René Scharfe
Am 18.08.19 um 22:04 schrieb brian m. carlson: > diff --git a/builtin/patch-id.c b/builtin/patch-id.c > index bd28b80b2d..3059e525b8 100644 > --- a/builtin/patch-id.c > +++ b/builtin/patch-id.c > @@ -1,15 +1,16 @@ > +#include "cache.h" > #include "builtin.h" > #include "config.h" > #include "dif

Re: [PATCH 1/1] commit-graph: add --[no-]progress to write and verify.

2019-08-20 Thread Junio C Hamano
"Garima Singh via GitGitGadget" writes: > From: Garima Singh > > Add --[no-]progress to git commit-graph write and verify. > The progress feature was introduced in 7b0f229 > ("commit-graph write: add progress output", 2018-09-17) but > the ability to opt-out was overlooked. Nicely described. >

Re: [PATCH v2 1/1] rebase.c: make sure current branch isn't moved when autostashing

2019-08-20 Thread Junio C Hamano
Ben Wijen writes: > Consider the following scenario: > git checkout not-the-master > work work work > git rebase --autostash upstream master > > Here 'rebase --autostash ' incorrectly moves the > upstream branch to master. > > The expected behavior: (58794775:/git-rebase.sh:526) >

[PATCH] diff: skip GITLINK when lazy fetching missing objs

2019-08-20 Thread Jonathan Tan
In 7fbbcb21b1 ("diff: batch fetching of missing blobs", 2019-04-08), diff was taught to batch the fetching of missing objects when operating on a partial clone, but was not taught to refrain from fetching GITLINKs. Teach diff to check if an object is a GITLINK before including it in the set to be f

Re: [PATCH 1/1] quote: handle null and empty strings in sq_quote_buf_pretty()

2019-08-20 Thread Junio C Hamano
"Garima Singh via GitGitGadget" writes: > + /* > + * In case of null or empty tokens, add a '' to ensure we > + * don't inadvertently drop those tokens > + */ A good comment. > + if (!src || !*src) { I think a caller that passes src==NULL deserves a BUG, or just a norma

Re: [PATCH 1/1] quote: handle null and empty strings in sq_quote_buf_pretty()

2019-08-20 Thread Junio C Hamano
"Garima Singh via GitGitGadget" writes: > From: Garima Singh > > In [1], Junio described a potential bug in sq_quote_buf_pretty() when the arg > is a zero length string. It should emit quote-quote rather than nothing. > This commit teaches sq_quote_buf_pretty to emit '' for null and empty string

Re: [PATCH v2 1/1] rebase.c: make sure current branch isn't moved when autostashing

2019-08-20 Thread Eric Sunshine
On Tue, Aug 20, 2019 at 4:12 PM Ben Wijen wrote: > diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh > @@ -306,4 +302,13 @@ test_expect_success 'branch is left alone when possible' > ' > +test_expect_success 'never change upstream branch' ' > + test_when_finished "git r

[PATCH v2 1/1] rebase.c: make sure current branch isn't moved when autostashing

2019-08-20 Thread Ben Wijen
Consider the following scenario: git checkout not-the-master work work work git rebase --autostash upstream master Here 'rebase --autostash ' incorrectly moves the upstream branch to master. The expected behavior: (58794775:/git-rebase.sh:526) AUTOSTASH=$(git stash create autosta

[PATCH v2 0/1] git rebase: Make sure upstream branch is left alone.

2019-08-20 Thread Ben Wijen
Hi Phillip, Junio, Thank you for taking the time to look into this. With this new patch I think I've addressed all your concerns. Ben Wijen (1): rebase.c: make sure current branch isn't moved when autostashing builtin/rebase.c| 18 ++ t/t3420-rebase-autostash.sh |

Re: [problem with name-rev]

2019-08-20 Thread Phil Hord
On Tue, Aug 20, 2019 at 12:35 PM Uwe Brauer wrote: > > Take the following part of what I did > > git init > echo 1 > 1 > git add 1 > git commit -m 1 > echo 1.1 > 1 > git add . > git commit -m 1.1 > git checkout -b foo master~1 > echo 1.2 > 1 > git add . > git commit -m 1.2 > echo 1.2.1 > 1 > git a

Re: [PATCH 2/2] rebase.c: make sure current branch isn't moved when autostashing

2019-08-20 Thread Ben
Hi Phillip, 'git stash create autostash' does not clear the workarea (like 'git stash' does) That's the reason for the 'git reset --hard' The difference you see in the test between the legacy rebase and the builtin rebase is because the legacy 'git reset --hard' emits the 'HEAD is now at ...' wh

Re: [PATCH 0/3] git-gui: Add ability to revert selected hunks and lines

2019-08-20 Thread Pratyush Yadav
On 20/08/19 11:47AM, Junio C Hamano wrote: > Pratyush Yadav writes: > > > This series adds the ability to revert selected lines and hunks in > > git-gui. Partially based on the patch by Bert Wesarg [0]. > > > > The commits can be found in the topic branch 'py/git-gui-revert-lines' > > at https://

Re: Only track built files for final output?

2019-08-20 Thread Phil Hord
On Tue, Aug 20, 2019 at 11:01 AM Leam Hall wrote: > On 8/20/19 1:46 PM, Pratyush Yadav wrote: > > So in your case, what's wrong with just tracking the source files needed > > to generate the other files, and then when you want a release binary, > > just clone the repo, run your build system, and

[PATCH 1/1] quote: handle null and empty strings in sq_quote_buf_pretty()

2019-08-20 Thread Garima Singh via GitGitGadget
From: Garima Singh In [1], Junio described a potential bug in sq_quote_buf_pretty() when the arg is a zero length string. It should emit quote-quote rather than nothing. This commit teaches sq_quote_buf_pretty to emit '' for null and empty strings. [1] https://public-inbox.org/git/pull.298.git.

[PATCH 0/1] quote: handle null and empty strings in sq_quote_buf_pretty()

2019-08-20 Thread Garima Singh via GitGitGadget
Hey, In [1], Junio described a potential bug in sq_quote_buf_pretty() when the arg is a zero length string and how he believes the method should behave. This commit teaches sq_quote_buf_pretty to emit '' for null and empty strings. Looking forward to your review. Cheers! Garima Singh [1] https:

Re: [problem with name-rev]

2019-08-20 Thread Uwe Brauer
>>> "JCH" == Junio C Hamano writes: > Uwe Brauer writes: >> Gives >> * changeset: ae68dbe:master >> |\ user: Uwe Brauer >> | | date: Tue Aug 20 16:25:53 2019 +0200 >> | | summary: 1.2.1/1.1 >> | | >> | * changeset: c00bb5d:master^2 >> | | user: Uwe

Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-20 Thread Pratyush Yadav
On 20/08/19 09:21PM, Johannes Sixt wrote: > Am 19.08.19 um 23:41 schrieb Pratyush Yadav: > > Just like the user can select lines to stage or unstage, add the > > ability to revert selected lines. > > > > Signed-off-by: Pratyush Yadav > > > + if {$revert} { > > + set query "[mc "Rever

Re: [PATCH 2/3] git-gui: Add the ability to revert selected lines

2019-08-20 Thread Johannes Sixt
Am 19.08.19 um 23:41 schrieb Pratyush Yadav: > Just like the user can select lines to stage or unstage, add the > ability to revert selected lines. > > Signed-off-by: Pratyush Yadav > + if {$revert} { > + set query "[mc "Revert changes in file %s?" \ > + [shor

Re: [PATCH] t0021: make sure clean filter runs

2019-08-20 Thread Johannes Sixt
Am 20.08.19 um 08:56 schrieb Thomas Gummerer: > Fix the test by updating the mtime of test.r, ... > diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh > index e10f5f787f..66f75005d5 100755 > --- a/t/t0021-conversion.sh > +++ b/t/t0021-conversion.sh > @@ -390,6 +390,7 @@ test_expect_success

Re: [PATCH v3 10/13] t4014: stop losing return codes of git commands

2019-08-20 Thread Johannes Sixt
Am 20.08.19 um 09:31 schrieb Denton Liu: > Oops, this should read > > git_version="$(git --version >version && sed "s/.* //"

Re: [PATCH 2/3] Doc: add more detail for git-format-patch

2019-08-20 Thread Junio C Hamano
Denton Liu writes: > Next, while we're at it, surround option arguments with <>. > ... > [--start-number ] [--numbered-files] > -[--in-reply-to=Message-Id] [--suffix=.] > +[--in-reply-to=] [--suffix=.] > [--ignore-if-in-upstream] >

Re: [PATCH] sha1-name: make sort_ambiguous_oid_array() thread-safe

2019-08-20 Thread Derrick Stolee
On 8/20/2019 2:49 PM, René Scharfe wrote: > Use QSORT_S instead of QSORT, which allows passing the repository > pointer to the comparison function without using a static variable. Makes sense. > -static struct repository *sort_ambiguous_repo; > -static int sort_ambiguous(const void *a, const void

Re: Only track built files for final output?

2019-08-20 Thread Pratyush Yadav
On 20/08/19 02:01PM, Leam Hall wrote: > On 8/20/19 1:46 PM, Pratyush Yadav wrote: > > On 20/08/19 08:21AM, Leam Hall wrote: > > > Hey all, a newbie could use some help. > > > > > > We have some code that generates data files, and as a part of our build > > > process those files are rebuilt to ensu

[PATCH] sha1-name: make sort_ambiguous_oid_array() thread-safe

2019-08-20 Thread René Scharfe
Use QSORT_S instead of QSORT, which allows passing the repository pointer to the comparison function without using a static variable. Signed-off-by: René Scharfe --- sha1-name.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sha1-name.c b/sha1-name.c index 2989e27b7

[PATCH] parseopt: move definition of enum parse_opt_result up

2019-08-20 Thread René Scharfe
Define enum parse_opt_result before using it in a typedef. This avoids the following compiler warning: ./parse-options.h:53:14: error: ISO C forbids forward references to 'enum' types [-Werror,-Wpedantic] typedef enum parse_opt_result parse_opt_ll_cb(struct parse_opt_ctx_t *ctx,

Re: [PATCH v3 1/6] rebase -i: add --ignore-whitespace flag

2019-08-20 Thread Rohit Ashiwal
Hi Phillip On Wed, Aug 21, 2019 at 12:10 AM Phillip Wood wrote: > > Thanks for spelling out exactly what this does. I had not appreciated > the difference before. Does this mean that if I have a branch with some > whitespace cleanups I'll get different results if I rebase it with the > sequencer

Re: [PATCH 0/3] git-gui: Add ability to revert selected hunks and lines

2019-08-20 Thread Junio C Hamano
Pratyush Yadav writes: > This series adds the ability to revert selected lines and hunks in > git-gui. Partially based on the patch by Bert Wesarg [0]. > > The commits can be found in the topic branch 'py/git-gui-revert-lines' > at https://github.com/prati0100/git/tree/py/git-gui-revert-lines Pl

Re: [PATCH 0/1] commit-graph: add --[no-]progress to write and verify

2019-08-20 Thread Derrick Stolee
On 8/20/2019 2:37 PM, Garima Singh via GitGitGadget wrote: > Hey Git contributors! > > My name is Garima Singh and I work at Microsoft. I recently started working > closely with the Microsoft team contributing to the git client ecosystem. I > am very glad to have the opportunity to work with this

Re: [PATCH v3 1/6] rebase -i: add --ignore-whitespace flag

2019-08-20 Thread Phillip Wood
Hi Rohit On 20/08/2019 04:45, Rohit Ashiwal wrote: There are two backends available for rebasing, viz, the am and the interactive. Naturally, there shall be some features that are implemented in one but not in the other. One such flag is --ignore-whitespace which indicates merge mechanism to tre

[PATCH 0/1] commit-graph: add --[no-]progress to write and verify

2019-08-20 Thread Garima Singh via GitGitGadget
Hey Git contributors! My name is Garima Singh and I work at Microsoft. I recently started working closely with the Microsoft team contributing to the git client ecosystem. I am very glad to have the opportunity to work with this community. I am new to the world of git client development but I did

[PATCH 1/1] commit-graph: add --[no-]progress to write and verify.

2019-08-20 Thread Garima Singh via GitGitGadget
From: Garima Singh Add --[no-]progress to git commit-graph write and verify. The progress feature was introduced in 7b0f229 ("commit-graph write: add progress output", 2018-09-17) but the ability to opt-out was overlooked. Signed-off-by: Garima Singh --- Documentation/git-commit-graph.txt | 4

Re: [PATCH v3 0/6] rebase -i: support more options

2019-08-20 Thread Phillip Wood
On 20/08/2019 18:53, Junio C Hamano wrote: Phillip Wood writes: Hi Rohit On 20/08/2019 04:45, Rohit Ashiwal wrote: I've tries to incorporated all the suggestions. It is helpful if you can list the changes to remind us all what we said. (as a patch author I find composing that is helpful to

Re: [PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-20 Thread Phillip Wood
On 20/08/2019 19:24, Junio C Hamano wrote: Phillip Wood writes: Do you know why -m and -i aren't affected? I had to look, but I believe the answer is because they use the sequencer, and the sequencer calls git merge-recursive as a separate process, and so the writing of the tree is only done

Re: [PATCH v3 5/6] rebase -i: support --ignore-date

2019-08-20 Thread Phillip Wood
On 20/08/2019 18:42, Junio C Hamano wrote: Rohit Ashiwal writes: +/* Construct a free()able author string with current time as the author date */ +static char *ignore_author_date(const char *author) +{ + int len = strlen(author); Mental note: ignore_author_date() would not allow author

Re: [PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-20 Thread Junio C Hamano
Phillip Wood writes: >>> Do you know why -m and -i aren't affected? >> >> I had to look, but I believe the answer is because they use the >> sequencer, and the sequencer calls git merge-recursive as a separate >> process, and so the writing of the tree is only done in a subprocess, >> which can't

Re: [problem with name-rev]

2019-08-20 Thread Junio C Hamano
Uwe Brauer writes: > Gives > * changeset: ae68dbe:master > |\ user: Uwe Brauer > | | date: Tue Aug 20 16:25:53 2019 +0200 > | | summary: 1.2.1/1.1 > | | > | * changeset: c00bb5d:master^2 > | | user: Uwe Brauer > | | date: Tue Aug 20 16:25:53 2019 +0200 > | | summary: 1.

RE: Only track built files for final output?

2019-08-20 Thread Randall S. Becker
On August 20, 2019 1:47 PM, Pratyush Yadav > On 20/08/19 08:21AM, Leam Hall wrote: > > Hey all, a newbie could use some help. > > > > We have some code that generates data files, and as a part of our > > build process those files are rebuilt to ensure things work. This > > causes an issue with bran

Re: [PATCH] t0021: make sure clean filter runs

2019-08-20 Thread Junio C Hamano
Thomas Gummerer writes: > Fix the test by updating the mtime of test.r, so git is forced to > check the contents of the file, and the clean filter is run as the > test expects. Hmph, depending on the timestamp granularity, with this patch, test.r would have mtime that is the same or a bit later

Re: Only track built files for final output?

2019-08-20 Thread Leam Hall
On 8/20/19 1:46 PM, Pratyush Yadav wrote: On 20/08/19 08:21AM, Leam Hall wrote: Hey all, a newbie could use some help. We have some code that generates data files, and as a part of our build process those files are rebuilt to ensure things work. This causes an issue with branches and merging, a

Re: [PATCH v3 0/6] rebase -i: support more options

2019-08-20 Thread Junio C Hamano
Phillip Wood writes: > Hi Rohit > > On 20/08/2019 04:45, Rohit Ashiwal wrote: >> I've tries to incorporated all the suggestions. > > It is helpful if you can list the changes to remind us all what we > said. (as a patch author I find composing that is helpful to remind me > if there's anything I'

Re: [problem with name-rev] (was: git log --graph with a sort of local revision number)

2019-08-20 Thread Rafael Ascensão
On Tue, Aug 20, 2019 at 04:32:12PM +0200, Uwe Brauer wrote: > > It seems that there is problem with name-rev. > In git, branches are just pointers to a commits. Commits do not store any information about branches. They're similar to mercurial bookmarks. Thus, git is not able to answer "Was comm

Re: Only track built files for final output?

2019-08-20 Thread Pratyush Yadav
On 20/08/19 08:21AM, Leam Hall wrote: > Hey all, a newbie could use some help. > > We have some code that generates data files, and as a part of our build > process those files are rebuilt to ensure things work. This causes an issue > with branches and merging, as the data files change slightly an

Re: [PATCH v3 5/6] rebase -i: support --ignore-date

2019-08-20 Thread Junio C Hamano
Rohit Ashiwal writes: > +/* Construct a free()able author string with current time as the author date > */ > +static char *ignore_author_date(const char *author) > +{ > + int len = strlen(author); Mental note: ignore_author_date() would not allow author==NULL as its input. > @@ -1020,10 +1

RE:

2019-08-20 Thread Yagnatinsky, Mark
No, not like that. See here: https://git.wiki.kernel.org/index.php/GitCommunity The email address you send the "subscribe" message to is NOT the mailing list itself. What you just did is send the words "subscribe git" to everyone already on the mailing list :) -Original Message- From: g

[no subject]

2019-08-20 Thread William Baker
subscribe git

Re: [PATCH] ref-filter: initialize empty name or email fields

2019-08-20 Thread Junio C Hamano
Junio C Hamano writes: > Mischa POSLAWSKY writes: > >> Formatting $(taggername) on headerless tags such as v0.99 in Git >> causes a SIGABRT with error "munmap_chunk(): invalid pointer", >> because of an oversight in commit f0062d3b74 (ref-filter: free >> item->value and item->value->s, 2018-10-1

Re: Re: [PATCH v2 0/1] pack-refs: always refreshing after take the lock file

2019-08-20 Thread 16657101987
From: Sun Chao --- Jeff King writes: > I'm undecided on this. I think reftables are still a while off, and even > once they are here, many people will still be using the older format. So > it makes sense to still apply fixes to the old code. Got it, thanks for explainning. > What I wonder, t

[PATCH 9/9] sparse-checkout: init and add in cone mode

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee To make the cone pattern set easy to use, update the behavior of 'git sparse-checkout [init|add]'. Add '--cone' flag to 'git sparse-checkout init' to set the config option 'core.sparseCheckout=cone'. When running 'git sparse-checkout add' in cone mode, a user only needs to

[PATCH 2/9] sparse-checkout: create 'init' subcommand

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee Getting started with a sparse-checkout file can be daunting. Help users start their sparse enlistment using 'git sparse-checkout init'. This will set 'core.sparseCheckout=true' in their config, write an initial set of patterns to the sparse-checkout file, and update their wor

[PATCH 6/9] trace2:experiment: clear_ce_flags_1

2019-08-20 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler The clear_ce_flags_1 method is used by many types of calls to unpack_trees(). Add trace2 regions around the method, including some flag information, so we can get granular performance data during experiments. Signed-off-by: Jeff Hostetler Signed-off-by: Derrick Stolee ---

[PATCH 4/9] sparse-checkout: 'add' subcommand

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'git sparse-checkout add' subcommand takes a list of patterns over stdin and writes them to the sparse-checkout file. Then, it updates the working directory using 'git read-tree -mu HEAD'. Note: if a user adds a negative pattern that would lead to the removal of a non-em

[PATCH 0/9] [RFC] New sparse-checkout builtin and "cone" mode

2019-08-20 Thread Derrick Stolee via GitGitGadget
This RFC includes a potential direction to make the sparse-checkout more user-friendly. While there, I also present a way to use a limited set of patterns to gain a significant performance boost in very large repositories. Sparse-checkout is only documented as a subsection of the read-tree docs [1

[PATCH 3/9] clone: add --sparse mode

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When someone wants to clone a large repository, but plans to work using a sparse-checkout file, they either need to do a full checkout first and then reduce the patterns they included, or clone with --no-checkout, set up their patterns, and then run a checkout manually. This

[PATCH 5/9] sparse-checkout: create 'disable' subcommand

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The instructions for disabling a sparse-checkout to a full working directory are complicated and non-intuitive. Add a subcommand, 'git sparse-checkout disable', to perform those steps for the user. Signed-off-by: Derrick Stolee --- Documentation/git-sparse-checkout.txt | 2

[PATCH 8/9] sparse-checkout: use hashmaps for cone patterns

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The parent and recursive patterns allowed by the "cone mode" option in sparse-checkout are restrictive enough that we can avoid using the regex parsing. Everything is based on prefix matches, so we can use hashsets to store the prefixes from the sparse-checkout file. When che

[PATCH 7/9] sparse-checkout: add 'cone' mode

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature can have quadratic performance as the number of patterns and number of entries in the index grow. If there are 1,000 patterns and 1,000,000 entries, this time can be very significant. Create a new 'cone' mode for the core.sparseCheckout config opt

[PATCH 1/9] sparse-checkout: create builtin with 'list' subcommand

2019-08-20 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The sparse-checkout feature is mostly hidden to users, as its only documentation is supplementary information in the docs for 'git read-tree'. In addition, users need to know how to edit the .git/info/sparse-checkout file with the right patterns, then run the appropriate 'git

Re: [problem with name-rev] (was: git log --graph with a sort of local revision number)

2019-08-20 Thread SZEDER Gábor
On Tue, Aug 20, 2019 at 04:32:12PM +0200, Uwe Brauer wrote: > Here's what I get when I start committing on master, then switch to a > branch foo and finally merge foo into master: > * changeset: ae68dbe:master > |\ user: Uwe Brauer > | | date: Tue Aug 20 16:25:53 2019 +0200 > | | summ

[problem with name-rev] (was: git log --graph with a sort of local revision number)

2019-08-20 Thread Uwe Brauer
>>> "RA" == Rafael Ascensão writes: > You can achieve something close (on small repos, more on that later) with: > $ git log --graph --color \ > --format='%C(auto)changeset: %h:%H%nuser: %an%ndate: %ad%nsummary: %s%n' \ > | git name-rev --refs=$(git rev-parse --abbrev

Re: [PATCH v3 0/6] rebase -i: support more options

2019-08-20 Thread Phillip Wood
Hi Rohit On 20/08/2019 04:45, Rohit Ashiwal wrote: I've tries to incorporated all the suggestions. It is helpful if you can list the changes to remind us all what we said. (as a patch author I find composing that is helpful to remind me if there's anything I've forgotten to address) Also t

Re: [PATCH v3 5/6] rebase -i: support --ignore-date

2019-08-20 Thread Phillip Wood
Hi Rohit On 20/08/2019 04:45, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the author date by changing it to the committer (current) date. Let's add the same for interactive machinery. Signed-off-by: Rohit Ashiwal --- Documentation/git-rebase.txt| 6 +--

Re: [PATCH v3 3/6] rebase -i: support --committer-date-is-author-date

2019-08-20 Thread Phillip Wood
Hi Rohit One thing that struck we was that we should support this with rebase -r which means setting GIT_COMMITTER_DATE when we fork 'git merge'. I've got a couple of other comments below On 20/08/2019 04:45, Rohit Ashiwal wrote: rebase am already has this flag to "lie" about the committer d

Re: Git Test Coverage Report (Thursday, Aug 15)

2019-08-20 Thread Derrick Stolee
On 8/16/2019 2:11 PM, Jeff King wrote: > On Thu, Aug 15, 2019 at 10:01:04PM -0400, Derrick Stolee wrote: > >> Here is today's test coverage report. > > Are the scripts you use to generate these available somewhere? The scripts I originally used are available in contrib/coverage-diff.sh. However

Only track built files for final output?

2019-08-20 Thread Leam Hall
Hey all, a newbie could use some help. We have some code that generates data files, and as a part of our build process those files are rebuilt to ensure things work. This causes an issue with branches and merging, as the data files change slightly and dealing with half a dozen merge conflicts,

Re: [GSoC] My project blog

2019-08-20 Thread Christian Couder
Hi Matheus, On Tue, Aug 20, 2019 at 1:28 PM Olga Telezhnaya wrote: > > вт, 20 авг. 2019 г. в 07:59, Matheus Tavares Bernardino > : > > > > I just posted the penultimate report on my project: > > https://matheustavares.gitlab.io/posts/going-for-a-too-big-step This > > week I’ve been working on a v

Re: [GSoC] My project blog

2019-08-20 Thread Olga Telezhnaya
вт, 20 авг. 2019 г. в 07:59, Matheus Tavares Bernardino : > > Hi, everyone > > I just posted the penultimate report on my project: > https://matheustavares.gitlab.io/posts/going-for-a-too-big-step This > week I’ve been working on a v2 of threaded git-grep w/ parallel > inflation, to allow threads w

Re: [PATCH 2/2] rebase.c: make sure current branch isn't moved when autostashing

2019-08-20 Thread Phillip Wood
Hi Ben I need to have a longer look at this (I don't understand why we're calling reset --hard after we've stashed the changes) but I notice that the test lines you're changing predate the switch to the builtin rebase so those changes are not related to the branch switching problem. Best Wis

Re: [PATCH 1/2] t3420: never change upstream branch

2019-08-20 Thread Phillip Wood
Hi Ben On 18/08/2019 10:53, Ben Wijen wrote: When using `git rebase --autostash ` and the workarea is dirty, the active branch is incorrectly reset to the rebase branch. This test will check for such behavior. Signed-off-by: Ben Wijen --- t/t3420-rebase-autostash.sh | 9 + 1 file

Re: [PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-20 Thread Phillip Wood
On 20/08/2019 04:05, brian m. carlson wrote: On 2019-08-19 at 09:55:27, Phillip Wood wrote: On 19/08/2019 10:41, Phillip Wood wrote: [...] diff --git a/convert.c b/convert.c index 94ff837649..030e9b81b9 100644 --- a/convert.c +++ b/convert.c @@ -1293,10 +1293,11 @@ struct conv_attrs {   c

Re: [PATCH v4 2/2] apply: reload .gitattributes after patching it

2019-08-20 Thread Phillip Wood
Hi Brian On 20/08/2019 03:45, brian m. carlson wrote: On 2019-08-19 at 09:41:42, Phillip Wood wrote: Hi Brian On 18/08/2019 19:44, brian m. carlson wrote: When applying multiple patches with git am, or when rebasing using the am backend, it's possible that one of our patches has updated a git

Re: [PATCH] pull, fetch: add --set-upstream option

2019-08-20 Thread Matthieu Moy
Junio C Hamano writes: >> That wouldn't make the commands really easier to type IMHO, as you would >> still have to pull at some point, so it's: >> >> git remote add main http://example.com/project-main-repo >> git pull --set-upstream main master >> >> Vs >> >> git remote add --set-upstr

Re: [PATCH v3 10/13] t4014: stop losing return codes of git commands

2019-08-20 Thread Denton Liu
On Tue, Aug 20, 2019 at 03:19:08AM -0400, Denton Liu wrote: > @@ -808,20 +821,24 @@ test_expect_success 'format-patch > --ignore-if-in-upstream HEAD' ' > git format-patch --ignore-if-in-upstream HEAD > ' > > -git_version="$(git --version | sed "s/.* //")" > +test_expect_success 'get git v

[PATCH v3 08/13] t4014: use test_line_count() where possible

2019-08-20 Thread Denton Liu
Convert all instances of `cnt=$(... | wc -l) && test $cnt = N` into uses of `test_line_count()`. While we're at it, convert one instance of a Git command upstream of a pipe into two commands. This prevents a failure of a Git command from being masked since only the return code of the last member o

[PATCH v3 12/13] config/format.txt: specify default value of format.coverLetter

2019-08-20 Thread Denton Liu
Signed-off-by: Denton Liu --- Documentation/config/format.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/config/format.txt b/Documentation/config/format.txt index 414a5a8a9d..cb629fa769 100644 --- a/Documentation/config/format.txt +++ b/Documentation/config/format.txt @@ -7

[PATCH v3 01/13] t4014: drop unnecessary blank lines from test cases

2019-08-20 Thread Denton Liu
Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 47 - 1 file changed, 47 deletions(-) diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index ca7debf1d4..3ed3feabfe 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@

[PATCH v3 11/13] Doc: add more detail for git-format-patch

2019-08-20 Thread Denton Liu
In git-format-patch.txt, we were missing some key user information. First of all, document the special value of `--base=auto`. Next, while we're at it, surround option arguments with <>. Finally, document the `format.outputDirectory` config and change `format.coverletter` to use camel case. Sign

[PATCH v3 06/13] t4014: use indentable here-docs

2019-08-20 Thread Denton Liu
The convention is to use indentable here-docs within test cases so that the here-docs line up with the rest of the code within the test case. Change here-docs from `<<\EOF` to `<<-\EOF` so that they can be indented along with the rest of the test case. Signed-off-by: Denton Liu --- t/t4014-forma

[PATCH v3 02/13] t4014: s/expected/expect/

2019-08-20 Thread Denton Liu
For test cases, the usual convention is to name expected output files "expect", not "expected". Replace all instances with "expected" with "expect" except for one case where the "expected" is used as the name of a test case. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 106 +++

[PATCH v3 10/13] t4014: stop losing return codes of git commands

2019-08-20 Thread Denton Liu
Currently, there are two ways where the return codes of Git commands are lost. The first way is when a command is in the upstream of a pipe. In a pipe, only the return code of the last command is used. Thus, all other commands will have their return codes masked. Rewrite pipes so that there are no

[PATCH v3 13/13] format-patch: learn --infer-cover-subject option

2019-08-20 Thread Denton Liu
Teach format-patch to use the first line of the branch description as the Subject: of the generated cover letter, rather than "*** SUBJECT HERE ***" if `--infer-cover-subject` is specified or the corresponding `format.inferCoverSubject` option is enabled. This complements the existing inclusion of

[PATCH v3 05/13] t4014: remove spaces after redirect operators

2019-08-20 Thread Denton Liu
For shell scripts, the usual convention is for there to be no space after redirection operators, (e.g. `>file`, not `> file`). Remove these spaces wherever they appear. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 62 - 1 file changed, 31 insert

[PATCH v3 00/13] format-patch: learn --infer-cover-subject option (also t4014 cleanup)

2019-08-20 Thread Denton Liu
Thanks for another round of reviews, Eric. I've incorporated most of your suggestions, including breaking the t4014 cleanup patch into multiple patches. Hopefully it isn't such a doozy to review now. Currently, format-patch only puts "*** SUBJECT HERE ***" when a cover letter is generated. However

[PATCH v3 07/13] t4014: drop redirections to /dev/null

2019-08-20 Thread Denton Liu
Since output is silenced when running without `-v` and debugging output is useful with `-v`, remove redirections to /dev/null as it is not useful. Signed-off-by: Denton Liu --- t/t4014-format-patch.sh | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t4014-format

[PATCH v3 09/13] t4014: remove confusing pipe in check_threading()

2019-08-20 Thread Denton Liu
In check_threading(), there was a Git command in the upstream of a pipe. In order to not lose its status code, it was saved into a file. However, this may be confusing so rewrite to redirect IO to file. This allows us to directly use the conventional &&-chain. Signed-off-by: Denton Liu --- t/t40

  1   2   >