[PATCH 2/5] completion: zsh: fix for directories with spaces

2019-06-13 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index b3c4588515..067738d93f 100644 --- a/contrib/completion/git-completion.

[PATCH 5/5] completion: prompt: fix color for Zsh

2019-06-13 Thread Felipe Contreras
We don't need PROMPT_COMMAND in Zsh; we are already using %F{color} %f, which in turn use %{ and %}, which are the equivalent of Bash's \[ and \]. We can use as many colors as we want and output directly into PS1 (or RPS1) without the risk of buffer wrapping issues. Signed-off-by: Felipe Contrera

[PATCH 1/5] completion: zsh: update installation instructions

2019-06-13 Thread Felipe Contreras
Commit 0e5ed7cca3 wrongly changed the extension of the bash script to .zsh. The extension doesn't really matter, but it confuses people. I've changed the text to make it clear that your zsh script goes to ~/.zsh/_git, and the bash script to ~/.git-completion.bash (or wherever you want). Also, upd

[PATCH 4/5] completion: zsh: improve main function selection

2019-06-13 Thread Felipe Contreras
Sometimes we want to use the function directly (e.g. _git_checkout), for example when zsh has the option 'complete_aliases', this way, we can do something like: compdef _git gco=git_checkout Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 4 +++- 1 file changed, 3

[PATCH 0/5] contrib: completion: general zsh updates

2019-06-13 Thread Felipe Contreras
Helo, These patches are definitely needed, and some of these have been cooking for years in oh-my-zsh. Felipe Contreras (5): completion: zsh: update installation instructions completion: zsh: fix for directories with spaces completion: remove zsh hack completion: zsh: improve main functio

[PATCH 3/5] completion: remove zsh hack

2019-06-13 Thread Felipe Contreras
We don't want to override the 'complete()' function in zsh, which can be used by bashcomp. Reported-by: Mark Lodato Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 1 + contrib/completion/git-completion.zsh | 6 -- 2 files changed, 1 insertion(+), 6 deletions(-

Re: [PATCH] completion: do not cache if --git-completion-helper fails

2019-06-13 Thread Felipe Contreras
On Thu, Jun 13, 2019 at 9:53 PM Duy Nguyen wrote: > > On Fri, Jun 14, 2019 at 7:30 AM Felipe Contreras > wrote: > > One way or the other, shouldn't my tests be merged? The issue is still > > there, and it's nice to have tests for that. > > Is there any good reason to complete options when they a

Re: [PATCH] cleanup: fix possible overflow errors in binary search, part 2

2019-06-13 Thread Martin Ågren
On Thu, 13 Jun 2019 at 23:33, René Scharfe wrote: > > Am 13.06.19 um 21:42 schrieb Martin Ågren: > > On Thu, 13 Jun 2019 at 19:54, René Scharfe wrote: > >> Make sure the intermediate value stays within the boundaries instead, > >> like this: > >> > >> mid = first + ((last - first) >> 1);

Re: [GSoC][PATCH v3 2/3] cherry-pick/revert: add --skip option

2019-06-13 Thread Rohit Ashiwal
Hi Junio On 2019-06-13 19:57 UTC Junio C Hamano wrote: > > I think my earlier comments would lead to a wrong direction, i.e. to > justify the change made to rollback_single_pick(), so let's step > back a bit. Perhaps the change is unjustifiable and that is why I > had trouble reading it and try

Re: [GSoC][PATCH v3 2/3] cherry-pick/revert: add --skip option

2019-06-13 Thread Rohit Ashiwal
Hi Junio On 2019-06-13 17:56 UTC Junio C Hamano wrote: > > > +'git cherry-pick' --continue | --skip | --abort | --quit > > Is this correct, or do we need to enclose these choices inside (), > i.e. > > 'git cherry-pick' ( --continue | --skip | --abort | --quit ) > > ? Documentation of `

Re: [GSoC][PATCH v3 1/3] sequencer: add advice for revert

2019-06-13 Thread Rohit Ashiwal
Hi Martin On 2019-06-13 19:21 UTC Martin Ågren wrote: > > > > + const char *in_progress_advice; > > > + const char *in_progress_error = NULL; > > The assigning vs not assigning is a bit inconsistent, but that's a very > minor nit, and not why I started replying. Only noticed it just now

Re: [GSoC][PATCH v3 1/3] sequencer: add advice for revert

2019-06-13 Thread Rohit Ashiwal
Hi Phillip On 2019-06-13 17:45 UTC Phillip Wood wrote: > >> +break; >> +default: >> +BUG(_("the control must not reach here")); > > This does not need to be translated as BUG() messages are not really for > users. Everything else looks fine to b

Re: [PATCH] completion: do not cache if --git-completion-helper fails

2019-06-13 Thread Duy Nguyen
On Fri, Jun 14, 2019 at 7:30 AM Felipe Contreras wrote: > > On Wed, Jun 12, 2019 at 3:52 AM Duy Nguyen wrote: > > > > On Sat, Jun 8, 2019 at 12:33 AM Felipe Contreras > > wrote: > > > > Something like this should work: > > > > > > struct command checkout_command = { > > > .name = "checkout", > >

Re: [PATCH] completion: do not cache if --git-completion-helper fails

2019-06-13 Thread Felipe Contreras
On Wed, Jun 12, 2019 at 3:52 AM Duy Nguyen wrote: > > On Sat, Jun 8, 2019 at 12:33 AM Felipe Contreras > wrote: > > Something like this should work: > > > > struct command checkout_command = { > > .name = "checkout", > > .function = cmd_checkout, > > .run_options = RUN_SETUP | NEED_WORK_TREE, >

Re: cherry-pick strangeness

2019-06-13 Thread Elijah Newren
On Thu, Jun 13, 2019 at 3:42 PM Vincent Legoll wrote: > > Hello, > > I stumbled upon a strange behavior of cherry-pick, > running the attached script yields different results > from running the same command lines manually in > an interactive shell, one after the other. > > I searched the man page

RE: [Patch 0/5] Add exclusions for tests requiring cvs where cvs is not installed

2019-06-13 Thread Randall S. Becker
On June 13, 2019 3:31 PM, I wrote: > On June 13, 2019 3:07 PM, Peff wrote: > > On Thu, Jun 13, 2019 at 02:53:08PM -0400, randall.s.bec...@rogers.com > > wrote: > > > > > From: "Randall S. Becker" > > > > > > t9600 to t9604 currently depend on cvs to function correctly, > > > otherwise all of those

cherry-pick strangeness

2019-06-13 Thread Vincent Legoll
Hello, I stumbled upon a strange behavior of cherry-pick, running the attached script yields different results from running the same command lines manually in an interactive shell, one after the other. I searched the man page and found no indications that that should act in this way. It looks lik

Re: [PATCH 2/3] t: add t0016-oidmap.sh

2019-06-13 Thread Junio C Hamano
Jeff King writes: >> > I know there are testing philosophies that go to this level of >> > white-box testing, but I don't think we usually do in Git. A unit >> > test of oidmap's externally visible behavior seems like the right >> > level to me. >> >> That's a good point... but then why does 't

[RFC PATCH] rev-list: clarify --abbrev and --abbrev-commit usage

2019-06-13 Thread Emily Shaffer
Indicate that --abbrev only works with --abbrev-commit also specified. It seems that simply running `git rev-list --abbrev=5` doesn't abbreviate commit OIDs. But the combination of `git rev-list --abbrev-commit --abbrev=5` works as expected. Clarify in the documentation by indicating that --abbrev

[PATCH v3 07/10] strbuf: give URL-encoding API a char predicate fn

2019-06-13 Thread Matthew DeVore
Allow callers to specify exactly what characters need to be URL-encoded and which do not. This new API will be taken advantage of in a patch later in this set. Helped-by: Jeff King Signed-off-by: Matthew DeVore --- credential-store.c | 9 + http.c | 6 -- strbuf.c

[PATCH v3 10/10] list-objects-filter-options: make parser void

2019-06-13 Thread Matthew DeVore
This function always returns 0, so make it return void instead. Signed-off-by: Matthew DeVore --- list-objects-filter-options.c | 12 +--- list-objects-filter-options.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/list-objects-filter-options.c b/list-objects-fi

[PATCH v3 03/10] list-objects-filter-options: always supply *errbuf

2019-06-13 Thread Matthew DeVore
Making errbuf an optional argument complicates error reporting. Fix this by making all callers supply an errbuf, even if they may ignore it. This will be important in follow-up patches where the filter-spec parsing has more pitfalls and possible errors. Signed-off-by: Matthew DeVore --- list-obj

[PATCH v3 06/10] list-objects-filter-options: make filter_spec a string_list

2019-06-13 Thread Matthew DeVore
Make the filter_spec string a string_list rather than a raw C string. The list of strings must be concatted together to make a complete filter_spec. A future patch will use this capability to build "combine:" filter specs gradually. A strbuf would seem to be a more natural choice for this object,

[PATCH v3 05/10] list-objects-filter-options: move error check up

2019-06-13 Thread Matthew DeVore
Move the check that filter_options->choice is set to higher in the call stack. This can only be set when the gentle parse function is called from one of the two call sites. This is important because in an upcoming patch this may or may not be an error, and whether it is an error is only known to t

[PATCH v3 08/10] list-objects-filter-options: allow mult. --filter

2019-06-13 Thread Matthew DeVore
Allow combining of multiple filters by simply repeating the --filter flag. Before this patch, the user had to combine them in a single flag somewhat awkwardly (e.g. --filter=combine:FOO+BAR), including URL-encoding the individual filters. To make this work, in the --filter flag parsing callback, r

[PATCH v3 09/10] list-objects-filter-options: clean up use of ALLOC_GROW

2019-06-13 Thread Matthew DeVore
Introduce a new macro ALLOC_GROW_BY which automatically zeros the added array elements and takes care of updating the nr value. Use the macro in code introduced earlier in this patchset. Signed-off-by: Matthew DeVore --- cache.h | 22 ++ list-objects-fil

[PATCH v3 00/10] Filter combination

2019-06-13 Thread Matthew DeVore
It has been a while since a sent a roll-up. Here are the changes since v2: - Re-use more URL-encoding logic in strbuf.c * This was partially achieved by changing the helper function to accept a function that will indicate whether some character must be escaped. - Re-use more URL-decoding

[PATCH v3 02/10] list-objects-filter: put omits set in filter struct

2019-06-13 Thread Matthew DeVore
The oidset *omits pointer must be accessed by the combine filter in a type-agnostic way once the graph traversal is over. Store that pointer in the general `filter` struct. This will be used in a follow-up patch to implement the combine filter. Signed-off-by: Matthew DeVore --- list-objects-filt

[PATCH v3 01/10] list-objects-filter: make API easier to use

2019-06-13 Thread Matthew DeVore
Make the list-objects-filter.h API more opaque and easier to use. This prepares for combined filter support, where filters will be created and used in a new context. Helped-by: Jeff Hostetler Helped-by: Junio C Hamano Signed-off-by: Matthew DeVore --- list-objects-filter.c | 122 ++

[PATCH v3 04/10] list-objects-filter: implement composite filters

2019-06-13 Thread Matthew DeVore
Allow combining filters such that only objects accepted by all filters are shown. The motivation for this is to allow getting directory listings without also fetching blobs. This can be done by combining blob:none with tree:. There are massive repositories that have larger-than-expected trees - eve

[PATCH v2] rev-list: teach --oid-only to enable piping

2019-06-13 Thread Emily Shaffer
Allow easier parsing by cat-file by giving rev-list an option to print only the OID of an object without any additional information. This is a short-term shim; later on, rev-list should be taught how to print the types of objects it finds in a format similar to cat-file's. Before this commit, the

Re: [PATCH] cleanup: fix possible overflow errors in binary search, part 2

2019-06-13 Thread René Scharfe
Am 13.06.19 um 21:42 schrieb Martin Ågren: > On Thu, 13 Jun 2019 at 19:54, René Scharfe wrote: >> >> Calculating the sum of two array indexes to find the midpoint between >> them can overflow, i.e. code like this is unsafe for big arrays: >> >> mid = (first + last) >> 1; >> >> Make sure th

Re: git receive-pack deletes refs one at a time?

2019-06-13 Thread Jeff King
On Thu, Jun 13, 2019 at 01:46:05PM -0600, Nasser Grainawi wrote: > > The underlying ref code is smart enough to coalesce all of the deletions > > in a single transaction into a single write of the packed-refs file. > > > > But historically, pushes do not do a single ref transaction because we > >

Re: [GSoC][PATCH v3 1/3] sequencer: add advice for revert

2019-06-13 Thread Junio C Hamano
Martin Ågren writes: > ... > I agree 100% with Phillip, but I'll also note that "the control must not > reach here" doesn't tell me anything that BUG() doesn't already. That > is,... Thanks, all of you involved in this topic, for excellent mentorship.

Re: What's cooking in git.git (Jun 2019, #03; Wed, 12)

2019-06-13 Thread Junio C Hamano
Denton Liu writes: > Would it be possible for you to queue the "teach branch-specific options > for format-patch" patchset[1]? Even if it doesn't make it in its current > form, I believe that this patchset contains some changes that should be > relatively uncontroversial. Hmph. I was under the

Dear Friend,

2019-06-13 Thread Mrs Clara David.
-- Dear Friend, I am Mrs Clara David. am sending you this brief letter to solicit your partnership to transfer $18.5 million US Dollars.I shall send you more information and procedures when I receive positive response from you. please send me a message in my Email box (mrsclarad...@gmail.com) a

Re: [GSoC][PATCH v3 2/3] cherry-pick/revert: add --skip option

2019-06-13 Thread Junio C Hamano
Junio C Hamano writes: >> -static int rollback_single_pick(struct repository *r) >> +static int rollback_single_pick(struct repository *r, unsigned int is_skip) >> { >> ... >> +if (is_null_oid(&head_oid) && !is_skip) >> return error(_("cannot abort from a branch yet to be born")

Re: git receive-pack deletes refs one at a time?

2019-06-13 Thread Nasser Grainawi
> On Jun 13, 2019, at 11:43 AM, Jeff King wrote: > > On Thu, Jun 13, 2019 at 11:33:40AM -0600, Nasser Grainawi wrote: > >> I have a situation where I need to delete 100k+ refs on 15+ separate >> hosts/disks. This setup is using Gerrit replication, so I can trigger >> it all on one host and it

Re: [PATCH] cleanup: fix possible overflow errors in binary search, part 2

2019-06-13 Thread Martin Ågren
On Thu, 13 Jun 2019 at 19:54, René Scharfe wrote: > > Calculating the sum of two array indexes to find the midpoint between > them can overflow, i.e. code like this is unsafe for big arrays: > > mid = (first + last) >> 1; > > Make sure the intermediate value stays within the boundaries ins

RE: [Patch 0/5] Add exclusions for tests requiring cvs where cvs is not installed

2019-06-13 Thread Randall S. Becker
On June 13, 2019 3:07 PM, Peff wrote: > On Thu, Jun 13, 2019 at 02:53:08PM -0400, randall.s.bec...@rogers.com > wrote: > > > From: "Randall S. Becker" > > > > t9600 to t9604 currently depend on cvs to function correctly, > > otherwise all of those tests fail. This patch follows an existing > > pa

Re: [GSoC][PATCH v3 1/3] sequencer: add advice for revert

2019-06-13 Thread Martin Ågren
Hi Rohit, On Thu, 13 Jun 2019 at 19:46, Phillip Wood wrote: > > On 13/06/2019 05:05, Rohit Ashiwal wrote: > > -static int create_seq_dir(void) > > +static int create_seq_dir(struct repository *r) > > { > > - if (file_exists(git_path_seq_dir())) { > > - error(_("a cherry-pick or r

Re: Reducing git size by building libgit.so

2019-06-13 Thread Johannes Sixt
Am 13.06.19 um 01:31 schrieb brian m. carlson: > [0] AFAIUI, Windows doesn't have RPATH-like functionality, and from what > I've read, the same-directory behavior may be going away due to security > concerns. I don't use Windows, so any solution there is fine as long as > Dscho is happy. The solu

Re: [PATCH 2/2] archive: avoid spawning `gzip`

2019-06-13 Thread Jeff King
On Mon, Jun 10, 2019 at 12:44:54PM +0200, René Scharfe wrote: > Am 01.05.19 um 20:18 schrieb Jeff King: > > On Wed, May 01, 2019 at 07:45:05PM +0200, René Scharfe wrote: > > > >>> But since the performance is still not quite on par with `gzip`, I would > >>> actually rather not, and really, just p

Re: [Patch 0/5] Add exclusions for tests requiring cvs where cvs is not installed

2019-06-13 Thread Jeff King
On Thu, Jun 13, 2019 at 02:53:08PM -0400, randall.s.bec...@rogers.com wrote: > From: "Randall S. Becker" > > t9600 to t9604 currently depend on cvs to function correctly, otherwise > all of those tests fail. This patch follows an existing pattern of > from the t9400 series by attempting to run c

Re: [PATCH 2/3] t: add t0016-oidmap.sh

2019-06-13 Thread Jeff King
On Thu, Jun 13, 2019 at 07:52:36PM +0200, SZEDER Gábor wrote: > > At the point where we are normalizing byte order of the hashes, I have > > to wonder: why do we care about testing the hash value in the first > > place? We care that oidmap can store and retrieve values, and that it > > performs we

Re: Git status parse error after v.2.22.0 upgrade

2019-06-13 Thread Jeff King
On Thu, Jun 13, 2019 at 06:43:41PM +0100, Phillip Wood wrote: > >> (2) make the sequencer machinery more careful to clean up after it > >> is done or it is aborted (for example, "git reset --hard" > >> could remove these state files preemptively even when a rebase > >> is not in p

[Patch 1/5] t9600-cvsimport: exclude test if cvs is not installed

2019-06-13 Thread randall . s . becker
From: "Randall S. Becker" The t9600-cvsimport test requires the cvs package to be installed on the system on which the test is being run. The test will fail if cvs is not installed. The patch checks that cvs is installed by running the object without arguments, which should complete successfully

[Patch 2/5] t9601-cvsimport-vendor-branch: exclude test if cvs is not installed

2019-06-13 Thread randall . s . becker
From: "Randall S. Becker" The t9601-cvsimport-vendor-branch test requires the cvs package to be installed on the system on which the test is being run. The test will fail if cvs is not installed. The patch checks that cvs is installed by running the object without arguments, which should complete

[Patch 4/5] t9603-cvsimport-patchsets: exclude test if cvs is not installed

2019-06-13 Thread randall . s . becker
From: "Randall S. Becker" The t9603-cvsimport-patchsets test requires the cvs package to be installed on the system on which the test is being run. The test will fail if cvs is not installed. The patch checks that cvs is installed by running the object without arguments, which should complete suc

[Patch 0/5] Add exclusions for tests requiring cvs where cvs is not installed

2019-06-13 Thread randall . s . becker
From: "Randall S. Becker" t9600 to t9604 currently depend on cvs to function correctly, otherwise all of those tests fail. This patch follows an existing pattern of from the t9400 series by attempting to run cvs without arguments, which succeeds if installed, and skipping the test if the command

[Patch 3/5] t9602-cvsimport-branches-tags: exclude test if cvs is not installed

2019-06-13 Thread randall . s . becker
From: "Randall S. Becker" The t9602-cvsimport-branches-tags test requires the cvs package to be installed on the system on which the test is being run. The test will fail if cvs is not installed. The patch checks that cvs is installed by running the object without arguments, which should complete

[Patch 5/5] t9604-cvsimport-timestamps: exclude test if cvs is not installed

2019-06-13 Thread randall . s . becker
From: "Randall S. Becker" The t9604-cvsimport-timestamps test requires the cvs package to be installed on the system on which the test is being run. The test will fail if cvs is not installed. The patch checks that cvs is installed by running the object without arguments, which should complete su

Re: Reducing git size by building libgit.so

2019-06-13 Thread Junio C Hamano
Paul Smith writes: > I assumed that we were discussing providing an _option_ of building > with shared libraries, rather than removing support for static > libraries and only supporting shared libraries. The former is the > typical model in portable projects. > ... > So, the answer to most of th

Re: git bisect should return 1 when the first bad commit is found

2019-06-13 Thread Junio C Hamano
Pedro Larroy writes: > I'm using git bisect, and for complex reasons I can't use git bisect > run to drive the bisection. I don't think git bisect bad/good is > returning a different status code when the first bad commit is found > and this would be very useful to stop the driver of the bisection

Re: [PATCH] cleanup: fix possible overflow errors in binary search, part 2

2019-06-13 Thread Derrick Stolee
On 6/13/2019 1:51 PM, René Scharfe wrote: > Calculating the sum of two array indexes to find the midpoint between > them can overflow, i.e. code like this is unsafe for big arrays: > > mid = (first + last) >> 1; > > Make sure the intermediate value stays within the boundaries instead, > lik

Re: [GSoC][PATCH v3 2/3] cherry-pick/revert: add --skip option

2019-06-13 Thread Phillip Wood
Hi Rohit This is definitely moving in the right direction. On 13/06/2019 05:05, Rohit Ashiwal wrote: > git am or rebase have a --skip flag to skip the current commit if the > user wishes to do so. During a cherry-pick or revert a user could > likewise skip a commit, but needs to use 'git reset' (

Re: [GSoC][PATCH v3 2/3] cherry-pick/revert: add --skip option

2019-06-13 Thread Junio C Hamano
Rohit Ashiwal writes: > diff --git a/Documentation/git-cherry-pick.txt > b/Documentation/git-cherry-pick.txt > index 754b16ce0c..955880ab88 100644 > --- a/Documentation/git-cherry-pick.txt > +++ b/Documentation/git-cherry-pick.txt > @@ -10,9 +10,7 @@ SYNOPSIS > [verse] > 'git cherry-pick' [--e

Re: [PATCH 2/3] t: add t0016-oidmap.sh

2019-06-13 Thread SZEDER Gábor
On Thu, Jun 13, 2019 at 01:19:13PM -0400, Jeff King wrote: > On Sun, Jun 09, 2019 at 11:22:59AM +0200, SZEDER Gábor wrote: > > > So, 'test oidmap' from the previous patch prints the value we want to > > check with: > > > > printf("%u\n", sha1hash(oid.hash)); > > > > First, since object ids i

[PATCH] cleanup: fix possible overflow errors in binary search, part 2

2019-06-13 Thread René Scharfe
Calculating the sum of two array indexes to find the midpoint between them can overflow, i.e. code like this is unsafe for big arrays: mid = (first + last) >> 1; Make sure the intermediate value stays within the boundaries instead, like this: mid = first + ((last - first) >> 1);

Re: [GSoC][PATCH v3 1/3] sequencer: add advice for revert

2019-06-13 Thread Phillip Wood
On 13/06/2019 05:05, Rohit Ashiwal wrote: > In the case of merge conflicts, while performing a revert, we are > currently advised to use `git cherry-pick --` > of which --continue is incompatible for continuing the revert. > Introduce a separate advice message for `git revert`. Also change > the si

Re: git receive-pack deletes refs one at a time?

2019-06-13 Thread Jeff King
On Thu, Jun 13, 2019 at 11:33:40AM -0600, Nasser Grainawi wrote: > I have a situation where I need to delete 100k+ refs on 15+ separate > hosts/disks. This setup is using Gerrit replication, so I can trigger > it all on one host and it will push the deletes to the rest (all > running git-daemon v2

Re: [PATCH 1/1] ci: split the `linux-gcc` job into two jobs

2019-06-13 Thread SZEDER Gábor
On Thu, Jun 13, 2019 at 06:51:04PM +0200, Johannes Schindelin wrote: > Hi, > > On Thu, 13 Jun 2019, Junio C Hamano wrote: > > > SZEDER Gábor writes: > > > > > On Thu, Jun 13, 2019 at 05:53:51AM -0700, Johannes Schindelin via > > > GitGitGadget wrote: > > >> From: Johannes Schindelin > > >> > >

Re: Git status parse error after v.2.22.0 upgrade

2019-06-13 Thread Phillip Wood
On 13/06/2019 17:24, Jeff King wrote: > On Thu, Jun 13, 2019 at 09:05:16AM -0700, Junio C Hamano wrote: > >> aleksan...@ledovskis.lv writes: >> >>> My repo indeed contains a ".git/sequencer/todo" file which >>> contains references to commits long-gone (i.e., rebased). >>> Renaming or deleting this

git receive-pack deletes refs one at a time?

2019-06-13 Thread Nasser Grainawi
I have a situation where I need to delete 100k+ refs on 15+ separate hosts/disks. This setup is using Gerrit replication, so I can trigger it all on one host and it will push the deletes to the rest (all running git-daemon v2.18.0 with receive-pack enabled). All the refs being deleted on the rec

Re: Reducing git size by building libgit.so

2019-06-13 Thread Paul Smith
On Thu, 2019-06-13 at 09:51 +0200, Johannes Schindelin wrote: > Hassles aside, you mentioned Linux and macOS. What about literally > *all* the other platforms we support? Like AIX, NonStop, HP/UX, etc? I assumed that we were discussing providing an _option_ of building with shared libraries, rathe

Re: [PATCH 2/3] t: add t0016-oidmap.sh

2019-06-13 Thread Jeff King
On Sun, Jun 09, 2019 at 11:22:59AM +0200, SZEDER Gábor wrote: > So, 'test oidmap' from the previous patch prints the value we want to > check with: > > printf("%u\n", sha1hash(oid.hash)); > > First, since object ids inherently make more sense as hex values, it > would be more appropriate to

Re: [PATCH v2 1/1] ref-filter: sort detached HEAD lines firstly

2019-06-13 Thread Matthew DeVore
On Wed, Jun 12, 2019 at 02:09:53PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > >> + /* > >> + * When sorting by name, we should put "detached" head lines, > >> + * which are all the lines in parenthesis, before all others. > >> + * This usually

Re: Git status parse error after v.2.22.0 upgrade

2019-06-13 Thread Aleksandrs Ļedovskis
On Thu, Jun 13, 2019 at 09:05:16AM -0700, Junio C Hamano wrote: > are you getting it when you run "git status" command??? Yes, the regular old porcelain `git-status(1)`. $ git status error: could not parse '<>' On branch <> nothing to commit, working tree clean -- Best, Aleksandrs Ļedovskis

git bisect should return 1 when the first bad commit is found

2019-06-13 Thread Pedro Larroy
Hi I'm using git bisect, and for complex reasons I can't use git bisect run to drive the bisection. I don't think git bisect bad/good is returning a different status code when the first bad commit is found and this would be very useful to stop the driver of the bisection. What do you think? Woul

What's cooking in git.git (Jun 2019, #03; Wed, 12)

2019-06-13 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'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. Git 2.22 final has been tagged. Y

Re: Understanding last ~28 bytes of index file

2019-06-13 Thread Jeff King
On Thu, Jun 13, 2019 at 06:32:03AM +, Farhan Khan wrote: > I am trying to understand how the index (.git/index) file works. When > looking through extensions, it loops until it reaches the last 28 > bytes (SHA size + 8). This is referenced here. > https://github.com/git/git/blob/master/read-ca

[PATCH v3 1/3] t/helper: add test-oidmap.c

2019-06-13 Thread Christian Couder
This new helper is very similar to "test-hashmap.c" and will help test how `struct oidmap` from oidmap.{c,h} can be used. Helped-by: SZEDER Gábor Signed-off-by: Christian Couder --- Makefile | 1 + t/helper/test-oidmap.c | 134 + t/helper/

[PATCH v3 2/3] t: add t0016-oidmap.sh

2019-06-13 Thread Christian Couder
From: Christian Couder Add actual tests for operations using `struct oidmap` from oidmap.{c,h}. Helped-by: SZEDER Gábor Signed-off-by: Christian Couder --- t/t0016-oidmap.sh | 100 ++ 1 file changed, 100 insertions(+) create mode 100755 t/t0016-oid

[PATCH v3 0/3] Test oidmap

2019-06-13 Thread Christian Couder
Unlike hashmap that has t/helper/test-hashmap.c and t/t0011-hashmap.sh oidmap has no specific test. The goal of this small patch series is to change that and also improve oidmap a bit while at it. Changes compared to V2 are the following: - removed suprious space between ">" and "actual" in t00

[PATCH v3 3/3] oidmap: use sha1hash() instead of static hash() function

2019-06-13 Thread Christian Couder
From: Christian Couder Get rid of the static hash() function in oidmap.c which is redundant with sha1hash(). Use sha1hash() directly instead. Let's be more consistent and not use several hash functions doing nearly exactly the same thing. Signed-off-by: Christian Couder --- oidmap.c | 13 +++-

Re: Reducing git size by building libgit.so

2019-06-13 Thread brian m. carlson
On 2019-06-12 at 13:57:43, Paul Smith wrote: > On Tue, 2019-06-11 at 23:48 +, brian m. carlson wrote: > > Also, some people install Git into their home directories, and a > > shared library means that they'll have to use LD_LIBRARY_PATH (or > > equivalent) to run Git. > > I don't have strong f

Re: Git status parse error after v.2.22.0 upgrade

2019-06-13 Thread SZEDER Gábor
On Thu, Jun 13, 2019 at 09:05:16AM -0700, Junio C Hamano wrote: > aleksan...@ledovskis.lv writes: > > > My repo indeed contains a ".git/sequencer/todo" file which > > contains references to commits long-gone (i.e., rebased). > > Renaming or deleting this file stops whines about "error: could > > n

Re: [PATCH v2 1/1] ref-filter: sort detached HEAD lines firstly

2019-06-13 Thread Jeff King
On Wed, Jun 12, 2019 at 09:51:33PM +0200, Johannes Schindelin wrote: > > + head -n 1 actual >first && > > + # The first line should be enclosed by full-width parenthesis. > > + grep "(.*)" first && > > I wonder whether it is a good idea to pretend that we can pass arbitrary > byte sequences

Re: [PATCH v2 1/1] ref-filter: sort detached HEAD lines firstly

2019-06-13 Thread Matthew DeVore
On Wed, Jun 12, 2019 at 02:09:53PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > Stepping back a bit, why are we even allowing the surrounding () > pair to be futzed by the translators? > > IOW, shouldn't our code more like this from the beginning, with or > without Chinese translation?

Re: What's cooking in git.git (Jun 2019, #03; Wed, 12)

2019-06-13 Thread Denton Liu
Hi Junio, On Wed, Jun 12, 2019 at 03:20:02PM -0700, Junio C Hamano wrote: > Here are the topics that have been cooking. Commits prefixed with > '-' are only in 'pu' (proposed updates) while commits prefixed with > '+' are in 'next'. The ones marked with '.' do not appear in any of > the integrat

[GSoC][PATCH v3 2/3] cherry-pick/revert: add --skip option

2019-06-13 Thread Rohit Ashiwal
git am or rebase have a --skip flag to skip the current commit if the user wishes to do so. During a cherry-pick or revert a user could likewise skip a commit, but needs to use 'git reset' (or in the case of conflicts 'git reset --merge'), followed by 'git (cherry-pick | revert) --continue' to skip

[GSoC][PATCH v3 0/3] Teach cherry-pick/revert to skip commits

2019-06-13 Thread Rohit Ashiwal
Adding a `--skip` option to make skipping commits easier for the user and to make the commands more consistent. This will serve as a small step to the bigger goal which improving consistency of sequencer commands, i.e., improving how command line arguments are handled, this will also lead to better

[GSoC][PATCH v3 1/3] sequencer: add advice for revert

2019-06-13 Thread Rohit Ashiwal
In the case of merge conflicts, while performing a revert, we are currently advised to use `git cherry-pick --` of which --continue is incompatible for continuing the revert. Introduce a separate advice message for `git revert`. Also change the signature of `create_seq_dir` to handle which advice t

[GSoC][PATCH v3 3/3] cherry-pick/revert: advise using --skip

2019-06-13 Thread Rohit Ashiwal
The previous commit introduced a --skip flag for cherry-pick and revert. Update the advice messages, to tell users about this less cumbersome way of skipping commits. Also add tests to ensure everything is working fine. Signed-off-by: Rohit Ashiwal --- changes: - No major changes, change slig

Re: [PATCH 1/1] ci: split the `linux-gcc` job into two jobs

2019-06-13 Thread Johannes Schindelin
Hi, On Thu, 13 Jun 2019, Junio C Hamano wrote: > SZEDER Gábor writes: > > > On Thu, Jun 13, 2019 at 05:53:51AM -0700, Johannes Schindelin via > > GitGitGadget wrote: > >> From: Johannes Schindelin > >> > >> This job was abused to not only run the test suite in a regular way but > >> also with

Hello Dear ,

2019-06-13 Thread Susan William
Hello Dear , It took a lot of time to finally find you. I am Susan William from London; I work with Royal Bank of Scotland, This letter is highly privileged and it requires your immediate attention. You are receiving this letter because your family name connected to a deceased client Eng. Michae

Understanding last ~28 bytes of index file

2019-06-13 Thread Farhan Khan
Hi all, I am trying to understand how the index (.git/index) file works. When looking through extensions, it loops until it reaches the last 28 bytes (SHA size + 8). This is referenced here. https://github.com/git/git/blob/master/read-cache.c#L1933 What do the last 28 bytes consist of? Where in

Re: [PATCH v8 7/9] blame: add a fingerprint heuristic to match ignored lines

2019-06-13 Thread Junio C Hamano
SZEDER Gábor writes: >> +git blame --ignore-rev $REV_2 --ignore-rev $REV_3 file | sed -e >> "$pick_author" >actual && > > Please use an intermediate file between 'git blame' and the downstream > 'sed' command, here and in other tests as well. > > This test script focuses specifically on 'git

Re: Reducing git size by building libgit.so

2019-06-13 Thread Johannes Schindelin
Hi Paul, On Wed, 12 Jun 2019, Paul Smith wrote: > On Tue, 2019-06-11 at 23:48 +, brian m. carlson wrote: > > Also, some people install Git into their home directories, and a > > shared library means that they'll have to use LD_LIBRARY_PATH (or > > equivalent) to run Git. > > I don't have stro

Re: [PATCH v2 3/4] rebase: fix garbled progress display with '-x'

2019-06-13 Thread Johannes Schindelin
Hi, On Wed, 12 Jun 2019, SZEDER Gábor wrote: > On Wed, Jun 12, 2019 at 09:14:40PM +0200, Johannes Schindelin wrote: > > > > On Tue, 11 Jun 2019, SZEDER Gábor wrote: > > > > > On Tue, Jun 11, 2019 at 01:36:16PM -0700, Junio C Hamano wrote: > > > > SZEDER Gábor writes: > > > > > > > > > -Rebasing

Re: Git status parse error after v.2.22.0 upgrade

2019-06-13 Thread Jeff King
On Thu, Jun 13, 2019 at 09:05:16AM -0700, Junio C Hamano wrote: > aleksan...@ledovskis.lv writes: > > > My repo indeed contains a ".git/sequencer/todo" file which > > contains references to commits long-gone (i.e., rebased). > > Renaming or deleting this file stops whines about "error: could > >

Re: [PATCH 4/4] config: avoid calling `labs()` on too-large data type

2019-06-13 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > The `labs()` function operates, as the initial `l` suggests, on `long` > parameters. However, in `config.c` we tried to use it on values of type > `intmax_t`. > > This problem was found by GCC v9.x. > > To fix it, let

Re: [PATCH 2/4] kwset: allow building with GCC 8

2019-06-13 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > The kwset functionality makes use of the obstack code, which expects to > be handed a function that can allocate large chunks of data. It expects > that function to accept a `size` parameter of type `long`. > > This u

Re: Git status parse error after v.2.22.0 upgrade

2019-06-13 Thread Junio C Hamano
aleksan...@ledovskis.lv writes: > My repo indeed contains a ".git/sequencer/todo" file which > contains references to commits long-gone (i.e., rebased). > Renaming or deleting this file stops whines about "error: could > not parse". Interesting. So in short, when the repository has leftover sequ

Re: [PATCH 1/1] ci: split the `linux-gcc` job into two jobs

2019-06-13 Thread Junio C Hamano
SZEDER Gábor writes: > On Thu, Jun 13, 2019 at 05:53:51AM -0700, Johannes Schindelin via > GitGitGadget wrote: >> From: Johannes Schindelin >> >> This job was abused to not only run the test suite in a regular way but >> also with all kinds of `GIT_TEST_*` options set to non-default values. >>

Re: Git status parse error after v.2.22.0 upgrade

2019-06-13 Thread aleksandrs
Hello, Managed to repro this problem on my private repo too. Bisect points to b51a0fdc3822c2ef260f6d496b6df6d33b101e8a However, I think the real culprit is 4a72486de97b5c6b0979b2b51e50c268bdb0d4f6, specifically `parse_insn_line` call. My repo indeed contains a ".git/sequencer/todo" file which c

Re: [PATCH 1/1] ci: split the `linux-gcc` job into two jobs

2019-06-13 Thread SZEDER Gábor
On Thu, Jun 13, 2019 at 05:53:51AM -0700, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin > > This job was abused to not only run the test suite in a regular way but > also with all kinds of `GIT_TEST_*` options set to non-default values. > > Let's split this into two W

[PATCH 0/4] Support building with GCC v8.x/v9.x

2019-06-13 Thread Johannes Schindelin via GitGitGadget
I noticed a while ago that I could not build Git's master in Git for Windows' SDK when using GCC v8.x. This became a much less pressing problem when I discovered a serious bug that would not let us compile with ASLR/DEP enabled (the resulting executables would just throw segmentation faults left an

[PATCH 4/4] config: avoid calling `labs()` on too-large data type

2019-06-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The `labs()` function operates, as the initial `l` suggests, on `long` parameters. However, in `config.c` we tried to use it on values of type `intmax_t`. This problem was found by GCC v9.x. To fix it, let's just "unroll" the function (i.e. negate the value if it is ne

[PATCH 2/4] kwset: allow building with GCC 8

2019-06-13 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The kwset functionality makes use of the obstack code, which expects to be handed a function that can allocate large chunks of data. It expects that function to accept a `size` parameter of type `long`. This upsets GCC 8 on Windows, because `long` does not have the same

  1   2   >