Re: [DISCUSSION] Growing the Git community

2019-09-19 Thread Mike Hommey
On Thu, Sep 19, 2019 at 12:30:13PM -0400, Derrick Stolee wrote: > During the Virtual Git Contributors' Summit, Dscho brought up the topic of > "Inclusion & Diversity". We discussed ideas for how to make the community > more welcoming to new contributors of all kinds. Let's discuss some of > the ide

[PATCH] replace: stop replace lookup when reaching a self-reference

2019-08-29 Thread Mike Hommey
It is possible to end up in situations where a replace ref points to itself. In that case, it would seem better to stop the lookup rather than try to follow the link infinitely and fail with "replace depth too high". Signed-off-by: Mike Hommey --- replace-object.c | 2 +- 1 file

error: cannot cherry-pick during a revert

2019-08-28 Thread Mike Hommey
Hi, This just happened to me while cherry-pick'ing: $ git cherry-pick HEAD@{1} error: could not apply 614fe5e629b84... try hint: after resolving the conflicts, mark the corrected paths hint: with 'git add ' or 'git rm ' hint: and commit the result with 'git commit' Recorded preimage for 'taskclus

Re: revision.c alters commit object state ; also no cleanup

2019-08-27 Thread Mike Hommey
On Mon, Aug 26, 2019 at 11:14:13AM -0700, Junio C Hamano wrote: > Mike Hommey writes: > > > First, revision.c doesn't come with a function to clear a struct > > rev_info > > Then, revision.c kind of does nasty things to commit objects... > > Yeah, these

Re: [PATCH] packfile: free packed_git memory when closing object store

2019-08-26 Thread Mike Hommey
On Mon, Aug 26, 2019 at 11:06:29AM -0700, Junio C Hamano wrote: > Mike Hommey writes: > > > Signed-off-by: Mike Hommey > > --- > > packfile.c | 11 +++ > > 1 file changed, 7 insertions(+), 4 deletions(-) > > > > Note, I'm not sure this i

revision.c alters commit object state ; also no cleanup

2019-08-26 Thread Mike Hommey
Hi, First, a little context: As you may have noticed, I've recently found a small bunch of memory leaks in different parts of the code base. The reason I did is that git-cinnabar[1] uses libgit.a, and I very recently upgraded its CI to use a slightly more recent version of GCC, which either enable

[PATCH] http: don't leak urlmatch_config.vars

2019-08-26 Thread Mike Hommey
Signed-off-by: Mike Hommey --- http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/http.c b/http.c index 27aa0a3192..9e33584f2d 100644 --- a/http.c +++ b/http.c @@ -1073,6 +1073,7 @@ void http_init(struct remote *remote, const char *url, int proactive_auth) git_config

[PATCH] packfile: free packed_git memory when closing object store

2019-08-25 Thread Mike Hommey
Signed-off-by: Mike Hommey --- packfile.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) Note, I'm not sure this is the right place to do it. diff --git a/packfile.c b/packfile.c index fc43a6c52c..b0cb84adda 100644 --- a/packfile.c +++ b/packfile.c @@ -339,13 +339,16 @@

[PATCH] commit: free the right buffer in release_commit_memory

2019-08-25 Thread Mike Hommey
The index field in the commit object is used to find the buffer corresponding to that commit in the buffer_slab. Resetting it first means free_commit_buffer is not going to free the right buffer. Signed-off-by: Mike Hommey --- commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH] notes: avoid leaking duplicate entries

2019-08-25 Thread Mike Hommey
On Sun, Aug 25, 2019 at 02:18:18PM +0900, Mike Hommey wrote: > When add_note is called multiple times with the same key/value pair, the > leaf_node it creates is leaked by notes_tree_insert. For completeness, since I realized it was missing: Signed-off-by: Mike Hommey Mike

Re: [PATCH 2/2] fast-import: duplicate into history rather than passing ownership

2019-08-25 Thread Mike Hommey
_next_command() will invalidate any held pointers, making it easier > to find bugs. In fact, we can drop the extra input lines added to the > test case by the previous commit, as the unfixed bug would now trigger > just from reading the commit message, even without any modified files in >

Re: [PATCH] fast-import: Reinitialize command_buf rather than detach it.

2019-08-25 Thread Mike Hommey
On Sun, Aug 25, 2019 at 02:57:48AM -0400, Jeff King wrote: > On Sun, Aug 25, 2019 at 01:13:48PM +0900, Mike Hommey wrote: > > > command_buf.buf is also stored in cmd_hist, so instead of > > strbuf_release, the current code uses strbuf_detach in order to > > "leak&quo

[PATCH] notes: avoid leaking duplicate entries

2019-08-24 Thread Mike Hommey
When add_note is called multiple times with the same key/value pair, the leaf_node it creates is leaked by notes_tree_insert. --- notes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notes.c b/notes.c index 75c028b300..ec35f5b551 100644 --- a/notes.c +++ b/notes.c @@ -269

[PATCH] fast-import: Reinitialize command_buf rather than detach it.

2019-08-24 Thread Mike Hommey
command_buf.buf is also stored in cmd_hist, so instead of strbuf_release, the current code uses strbuf_detach in order to "leak" the buffer as far as the strbuf is concerned. However, strbuf_detach does more than "leak" the strbuf buffer: it possibly reallocates it to ensure a terminating nul char

Re: cannot clone --single-commit instead of --single-branch

2019-08-01 Thread Mike Hommey
On Thu, Aug 01, 2019 at 07:43:22PM -0700, Jonathan Nieder wrote: > Hi, > > Bryan Turner wrote: > > > Promisor remotes and other in-flight changes might help provide some > > of what you're looking for, but I'm not aware of any already-available > > solution. > > You can do > > git clone -

Re: Surprising use of memory and time when repacking mozilla's gecko repository

2019-07-05 Thread Mike Hommey
On Fri, Jul 05, 2019 at 02:45:16PM +0900, Mike Hommey wrote: > On Fri, Jul 05, 2019 at 01:09:55AM -0400, Jeff King wrote: > > On Thu, Jul 04, 2019 at 07:05:30PM +0900, Mike Hommey wrote: > > > Finally, with 1 thread, the picture changes greatly. The overall process > >

Re: Surprising use of memory and time when repacking mozilla's gecko repository

2019-07-04 Thread Mike Hommey
On Fri, Jul 05, 2019 at 01:14:13AM -0400, Jeff King wrote: > On Thu, Jul 04, 2019 at 10:13:20PM +0900, Mike Hommey wrote: > > > > "public-inbox-index" (reading from git, writing to Xapian+SQLite) > > > on a dev machine got slow because core count exceeded what

Re: Surprising use of memory and time when repacking mozilla's gecko repository

2019-07-04 Thread Mike Hommey
On Fri, Jul 05, 2019 at 01:09:55AM -0400, Jeff King wrote: > On Thu, Jul 04, 2019 at 07:05:30PM +0900, Mike Hommey wrote: > > Finally, with 1 thread, the picture changes greatly. The overall process > > takes 2.5h: > > - 50 seconds enumerating and counting objects. > >

Re: Surprising use of memory and time when repacking mozilla's gecko repository

2019-07-04 Thread Mike Hommey
On Thu, Jul 04, 2019 at 07:05:30PM +0900, Mike Hommey wrote: > My guess is all those stalls are happening when processing the files I > already had problems with in the past[3], except there are more of them > now (thankfully, they were removed, so there won't be more, but that >

Re: Surprising use of memory and time when repacking mozilla's gecko repository

2019-07-04 Thread Mike Hommey
On Thu, Jul 04, 2019 at 07:05:30PM +0900, Mike Hommey wrote: > Hi, > > I was looking at the disk size of the gecko repository on github[1], > which started at 4.7GB, and `git gc --aggressive`'d it, which made that > into 2.0G. But to achieve that required quite some reso

Re: Surprising use of memory and time when repacking mozilla's gecko repository

2019-07-04 Thread Mike Hommey
On Thu, Jul 04, 2019 at 12:04:11PM +, Eric Wong wrote: > Mike Hommey wrote: > > I'm puzzled by the fact writing objects is so much faster with 1 thread. > > I/O contention in the multi-threaded cases? > > "public-inbox-index" (reading from git, writing

Surprising use of memory and time when repacking mozilla's gecko repository

2019-07-04 Thread Mike Hommey
Hi, I was looking at the disk size of the gecko repository on github[1], which started at 4.7GB, and `git gc --aggressive`'d it, which made that into 2.0G. But to achieve that required quite some resources. My first attempt failed with OOM, on an AWS instance with 16 cores and 32GB RAM. I then we

[ANNOUNCE] git-cinnabar 0.5.2

2019-06-30 Thread Mike Hommey
Hi, Git-cinnabar is a git remote helper to interact with mercurial repositories. It allows to clone, pull and push from/to mercurial remote repositories, using git. Code on https://github.com/glandium/git-cinnabar This release on https://github.com/glandium/git-cinnabar/releases/tag/0.5.2 What's

Multiple urls for remotes?

2019-06-26 Thread Mike Hommey
Hi, I was surprised to figure out that urls/pushurls set up for remotes can be set multiple times, and that those urls end up being used sequentially. Sadly, this has the side effect that one cannot override the config from the command line, as the url is then added as an extra url, which is trie

Re: [PATCH] stash: fix show referencing stash index

2019-06-24 Thread Mike Hommey
On Sat, Jun 15, 2019 at 12:26:18PM +0100, Thomas Gummerer wrote: > On 06/14, Mike Hommey wrote: > > Hi, > > > > `git stash ` where n is a number used to work until 2.21.*. > > It doesn't work in 2.22.0. > > > > Bisection points to: > > > &g

`git stash ` stopped working in 2.22.0

2019-06-14 Thread Mike Hommey
Hi, `git stash ` where n is a number used to work until 2.21.*. It doesn't work in 2.22.0. Bisection points to: dc7bd382b1063303f4f45d243bff371899285acb is the first bad commit commit dc7bd382b1063303f4f45d243bff371899285acb Author: Paul-Sebastian Ungureanu Date: Mon Feb 25 23:16:20 2019 +00

Re: [PATCH 2/2] revision: keep topo-walk free of unintersting commits

2019-05-21 Thread Mike Hommey
On Tue, May 21, 2019 at 09:59:53AM -0400, Derrick Stolee wrote: > When updating the topo-order walk in b454241 (revision.c: generation-based > topo-order algorithm, 2018-11-01), the logic was a huge rewrite of the > walk logic. In that massive change, we accidentally included the > UNINTERESTING co

Re: Revision walking, commit dates, slop

2019-05-17 Thread Mike Hommey
On Sat, May 18, 2019 at 12:58:28PM +0900, Mike Hommey wrote: > On Sat, May 18, 2019 at 03:50:05AM +0200, SZEDER Gábor wrote: > > On Sat, May 18, 2019 at 09:54:12AM +0900, Mike Hommey wrote: > > > There are established corner cases, where in a repo where commit dates > >

Re: Revision walking, commit dates, slop

2019-05-17 Thread Mike Hommey
On Sat, May 18, 2019 at 03:50:05AM +0200, SZEDER Gábor wrote: > On Sat, May 18, 2019 at 09:54:12AM +0900, Mike Hommey wrote: > > There are established corner cases, where in a repo where commit dates > > are not monotonically increasing, revision walking can go horribly >

Revision walking, commit dates, slop

2019-05-17 Thread Mike Hommey
Hi, There are established corner cases, where in a repo where commit dates are not monotonically increasing, revision walking can go horribly wrong. This was discussed in the past in e.g. https://public-inbox.org/git/20150521061553.ga29...@glandium.org/ The only (simple) workable way, given the c

Re: Closing fds twice when using remote helpers

2019-05-16 Thread Mike Hommey
On Thu, May 16, 2019 at 05:47:52PM -0400, Jeff King wrote: > On Thu, May 16, 2019 at 05:35:19PM +0900, Mike Hommey wrote: > > > On Wed, May 15, 2019 at 11:28:02PM -0400, Jeff King wrote: > > > Totally orthogonal, but I think we might also want to introduce a helper > >

Re: Closing fds twice when using remote helpers

2019-05-16 Thread Mike Hommey
On Wed, May 15, 2019 at 11:28:02PM -0400, Jeff King wrote: > Totally orthogonal, but I think we might also want to introduce a helper > capability so that import helpers can say "I always send 'done' to > fast-import". And then we can pass "--done" to fast-import, which means > it would detect a tr

Re: Closing fds twice when using remote helpers

2019-05-15 Thread Mike Hommey
On Wed, May 15, 2019 at 07:56:09PM +0900, Mike Hommey wrote: > Hi, > > I started getting a weird error message during some test case involving > git-cinnabar, which is a remote-helper to access mercurial > repositories. > > The error says: > fatal: mmap failed: Bad file d

Re: Closing fds twice when using remote helpers

2019-05-15 Thread Mike Hommey
On Wed, May 15, 2019 at 07:53:40PM -0400, Jeff King wrote: > On Thu, May 16, 2019 at 07:08:34AM +0900, Mike Hommey wrote: > > > > >> - Except, well, fds being what they are, we in fact just closed a fd > > > >> from a packed_git->pack_fd. So, when use_pac

[PATCH 2/2] Use xmmap_gently instead of xmmap in use_pack

2019-05-15 Thread Mike Hommey
use_pack has its own error message on mmap error, but it can't be reached when using xmmap, which dies with its own error. Signed-off-by: Mike Hommey --- packfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packfile.c b/packfile.c index 16bcb75262..6a66b605e9 1

[PATCH 1/2] dup() the input fd for fast-import used for remote helpers

2019-05-15 Thread Mike Hommey
d, which means close() is called with an invalid fd (since it was already closed as per above). Or worse, with a valid fd owned by something else (since fd numbers can be reused). Signed-off-by: Mike Hommey --- transport-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: Closing fds twice when using remote helpers

2019-05-15 Thread Mike Hommey
On Wed, May 15, 2019 at 07:59:49PM +0200, Johannes Sixt wrote: > Am 15.05.19 um 13:43 schrieb Ævar Arnfjörð Bjarmason: > > > > On Wed, May 15 2019, Mike Hommey wrote: > > > >> Hi, > >> > >> I started getting a weird error message during some t

Closing fds twice when using remote helpers

2019-05-15 Thread Mike Hommey
Hi, I started getting a weird error message during some test case involving git-cinnabar, which is a remote-helper to access mercurial repositories. The error says: fatal: mmap failed: Bad file descriptor ... which was not making much sense. Some debugging later, and it turns out this is what ha

[ANNOUNCE] git-cinnabar 0.5.1

2019-05-08 Thread Mike Hommey
Hi, Git-cinnabar is a git remote helper to interact with mercurial repositories. It allows to clone, pull and push from/to mercurial remote repositories, using git. Code on https://github.com/glandium/git-cinnabar This release on https://github.com/glandium/git-cinnabar/releases/tag/0.5.1 What's

[PATCH v2] Make fread/fwrite-like functions in http.c more like fread/fwrite.

2019-05-07 Thread Mike Hommey
n the number of items read or written. This number equals the number of bytes transferred only when size is 1. If an error occurs, or the end of the file is reached, the return value is a short item count (or zero). Signed-off-by: Mike Hommey --- http.c | 12 ++-- 1 file chang

[PATCH] Make fread/fwrite-like functions in http.c more like fread/fwrite.

2019-05-01 Thread Mike Hommey
n the number of items read or written. This number equals the number of bytes transferred only when size is 1. If an error occurs, or the end of the file is reached, the return value is a short item count (or zero). Signed-off-by: Mike Hommey --- http.c | 12 ++-- 1 file chang

Re: Questions on GSoC 2019 Ideas

2019-04-04 Thread Mike Hommey
On Thu, Apr 04, 2019 at 09:56:35AM +0200, Christian Couder wrote: > Hi, > > On Thu, Apr 4, 2019 at 3:15 AM Matheus Tavares Bernardino > wrote: > > > > I've been studying the codebase and looking for older emails in the ML > > that discussed what I want to propose as my GSoC project. In > > partic

Auto-gc in the background can take a long time to be put in the background

2019-03-25 Thread Mike Hommey
Hi, Recently, I've noticed that whenever the auto-gc message shows up about being spawned in the background, it still takes a while for git to return to the shell. I've finally looked at what it was stuck on, and it's `git reflog expire --all` taking more than 30s. I guess the question is whethe

Re: How to properly find git config in a libgit.a-using executable?

2019-03-22 Thread Mike Hommey
On Fri, Mar 22, 2019 at 02:39:43PM +0100, Johannes Schindelin wrote: > Hi Peff & Mike, > > On Fri, 22 Mar 2019, Jeff King wrote: > > > On Wed, Mar 20, 2019 at 07:19:41PM +0900, Mike Hommey wrote: > > > > > I thought of a few options (it's worth noting

How to properly find git config in a libgit.a-using executable?

2019-03-20 Thread Mike Hommey
Hi, In git-cinnabar (the remote-helper that can talk to mercurial servers), I'm using a fast-import-derived helper to do a lot of the heavy lifting, because $REASONS. Anyways, while built (mostly) with the git build system, using libgit.a, etc. the helper doesn't live in the GIT_EXEC_PATH. That le

Re: git-fast-import yields huge packfile

2019-03-16 Thread Mike Hommey
On Sat, Mar 16, 2019 at 02:04:33PM -0700, Linus Torvalds wrote: > On Sat, Mar 16, 2019 at 1:31 PM Richard Hipp wrote: > > > > Maybe I'm doing something wrong with the fast-import stream that is > > defeating Git's attempts at delta compression > > fast-import doesn't do fancy delta compressio

[PATCH] fix pack protocol example client/server communication

2019-03-16 Thread Mike Hommey
The pkt-line formatted lines contained the wrong pkt-len. Signed-off-by: Mike Hommey --- Documentation/technical/pack-protocol.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/technical/pack-protocol.txt b/Documentation/technical/pack-protocol.txt

Re: "Give me a break"... well, you gave me one

2019-03-06 Thread Mike Hommey
On Wed, Mar 06, 2019 at 03:14:11PM +0100, Johannes Schindelin wrote: > Hi Stefan, > > just wanted to express my gratitude for your idea to introduce the `break` > command in `git rebase -i`'s todo list. I use it *all* the time now. +1. Before that, I was using `x bash`, and ended up doing `git re

[ANNOUNCE] git-cinnabar 0.5.0

2018-08-11 Thread Mike Hommey
Hi, Git-cinnabar is a git remote helper to interact with mercurial repositories. It allows to clone, pull and push from/to mercurial remote repositories, using git. Code on https://github.com/glandium/git-cinnabar This release on https://github.com/glandium/git-cinnabar/releases/tag/0.5.0 What's

Re: Checks added for CVE-2018-11235 too restrictive?

2018-07-04 Thread Mike Hommey
On Wed, Jul 04, 2018 at 07:30:30AM +0900, Mike Hommey wrote: > That being said, I'm not even sure this particular use case is worth a > new feature. I'm not storing random stuff as gitlinks, I'm storing > sha1s. Well, maybe a mode that makes the distinction between "

Re: fast-import slowness when importing large files with small differences

2018-07-03 Thread Mike Hommey
On Tue, Jul 03, 2018 at 06:05:16PM +0200, Ævar Arnfjörð Bjarmason wrote: > > On Fri, Jun 29 2018, Mike Hommey wrote: > > > On Sat, Jun 30, 2018 at 12:10:24AM +0200, Ævar Arnfjörð Bjarmason wrote: > >> > >> On Fri, Jun 29 2018, Mike Hommey wrote: > >>

Re: Checks added for CVE-2018-11235 too restrictive?

2018-07-03 Thread Mike Hommey
On Tue, Jul 03, 2018 at 10:15:19AM -0400, Jeff King wrote: > On Tue, Jul 03, 2018 at 04:06:50PM +0900, Mike Hommey wrote: > > > I had a first shot at that a few months ago, but the format of the > > metadata branch made it impossible to push to github, hitting its push > &g

Re: [PATCH] fast-import: Don't count delta attempts against an empty buffer

2018-07-03 Thread Mike Hommey
On Tue, Jul 03, 2018 at 11:41:42AM -0700, Junio C Hamano wrote: > Mike Hommey writes: > > > When the reference buffer is empty, diff_delta returns NULL without > > really attempting anything, yet fast-import counts that as a delta > > attempt. > > But that

Checks added for CVE-2018-11235 too restrictive?

2018-07-03 Thread Mike Hommey
Hi, (Background) I'm the author of a git remote-helper that can talk directly to mercurial servers, known as git-cinnabar. One of the design decisions was to use git objects to store all the metadata necessary to reconstruct mercurial changesets, manifests and files, and one special thing that's d

[PATCH] fast-import: Don't count delta attempts against an empty buffer

2018-06-30 Thread Mike Hommey
When the reference buffer is empty, diff_delta returns NULL without really attempting anything, yet fast-import counts that as a delta attempt. Signed-off-by: Mike Hommey --- fast-import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fast-import.c b/fast-import.c index

Re: fast-import slowness when importing large files with small differences

2018-06-29 Thread Mike Hommey
On Sat, Jun 30, 2018 at 12:10:24AM +0200, Ævar Arnfjörð Bjarmason wrote: > > On Fri, Jun 29 2018, Mike Hommey wrote: > > > I noticed some slowness when fast-importing data from the Firefox mercurial > > repository, where fast-import spends more than 5 minutes importing ~2000

fast-import slowness when importing large files with small differences

2018-06-29 Thread Mike Hommey
Hi, I noticed some slowness when fast-importing data from the Firefox mercurial repository, where fast-import spends more than 5 minutes importing ~2000 revisions of one particular file. I reduced a testcase while still using real data. One could synthesize data with kind of the same properties, b

Re: Git packs friendly to block-level deduplication

2018-01-24 Thread Mike Hommey
On Wed, Jan 24, 2018 at 02:23:57PM -0800, Junio C Hamano wrote: > Mike Hommey writes: > > > FWIW, I sidestep the problem entirely by using alternatives. > > That's a funny way to use the word "side-step", I would say, as the > alternate object store suppor

Re: Git packs friendly to block-level deduplication

2018-01-24 Thread Mike Hommey
On Wed, Jan 24, 2018 at 11:03:47PM +0100, Ævar Arnfjörð Bjarmason wrote: > If you have a bunch of git repositories cloned of the same project on > the same filesystem, it would be nice of the packs that are produced > would be friendly to block-level deduplication. > > This would save space, and t

Re: Bring together merge and rebase

2017-12-26 Thread Mike Hommey
On Fri, Dec 22, 2017 at 11:10:19PM -0700, Carl Baldwin wrote: > The big contention among git users is whether to rebase or to merge > changes [2][3] while iterating. I used to firmly believe that merging > was the way to go and rebase was harmful. More recently, I have worked > in some environments

Re: git-clone causes out of memory

2017-10-13 Thread Mike Hommey
On Fri, Oct 13, 2017 at 12:26:46PM +0200, Christian Couder wrote: > On Fri, Oct 13, 2017 at 12:06 PM, Mike Hommey wrote: > > On Fri, Oct 13, 2017 at 12:51:58PM +0300, Constantine wrote: > >> There's a gitbomb on github. It is undoubtedly creative and funny, but > >

Re: git-clone causes out of memory

2017-10-13 Thread Mike Hommey
On Fri, Oct 13, 2017 at 12:51:58PM +0300, Constantine wrote: > There's a gitbomb on github. It is undoubtedly creative and funny, but since > this is a bug in git, I thought it'd be nice to report. The command: > > $ git clone https://github.com/x0rz/ShadowBrokersFiles What fills memory is

Re: [git-for-windows] Re: Revision resolution for remote-helpers?

2017-09-20 Thread Mike Hommey
On Fri, Aug 25, 2017 at 09:02:36PM +0900, Mike Hommey wrote: > On Fri, Aug 25, 2017 at 12:58:52PM +0200, Johannes Schindelin wrote: > > > > > Cc-ing the Git for Windows mailing list as an FYI. > > > > > > > > > > I have faint memories

Re: [git-for-windows] Re: Revision resolution for remote-helpers?

2017-08-25 Thread Mike Hommey
On Fri, Aug 25, 2017 at 12:58:52PM +0200, Johannes Schindelin wrote: > Hi Mike, > > On Thu, 24 Aug 2017, Mike Hommey wrote: > > > On Tue, Aug 22, 2017 at 10:15:20PM +0200, Johannes Schindelin wrote: > > > > > > On Fri, 18 Aug 2017, Jonathan Nieder wrote

Re: [git-for-windows] Re: Revision resolution for remote-helpers?

2017-08-24 Thread Mike Hommey
On Tue, Aug 22, 2017 at 10:15:20PM +0200, Johannes Schindelin wrote: > Hi, > > On Fri, 18 Aug 2017, Jonathan Nieder wrote: > > > Mike Hommey wrote[1]: > > > On Fri, Aug 18, 2017 at 03:06:37PM -0700, Jonathan Nieder wrote: > > >> Mike Hommey wrote: >

Re: Revision resolution for remote-helpers?

2017-08-18 Thread Mike Hommey
On Fri, Aug 18, 2017 at 03:06:37PM -0700, Jonathan Nieder wrote: > Hi, > > Mike Hommey wrote: > > > My thought is that a string like :: could be used > > wherever a committish is expected. That would call some helper > > and request to resolve revision, and

Re: Revision resolution for remote-helpers?

2017-08-18 Thread Mike Hommey
On Fri, Aug 18, 2017 at 08:15:09AM -0400, Jeff King wrote: > On Fri, Aug 18, 2017 at 03:42:08PM +0900, Mike Hommey wrote: > > > I was thinking it could be useful to have a special syntax for revisions > > that would query a helper program. The helper program could use a >

Revision resolution for remote-helpers?

2017-08-17 Thread Mike Hommey
Hi, As you might remember, I'm maintaining a remote helper that allows to talk directly to mercurial servers with git: git-cinnabar. When dealing with "foreign (non-git) repositories", it is often necessary to refer to revisions with their native name. With mercurial, that's a sha1, with svn it's

Re: [PATCH] strbuf: use designated initializers in STRBUF_INIT

2017-07-14 Thread Mike Hommey
On Fri, Jul 14, 2017 at 09:11:33AM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > Oh, absolutely. > > > > Here is another possible test balloon, that may actually be useful > > as an example. I think there is a topic in flight that touches this > > array, unfortunately, so I probabl

Re: [PATCH] strbuf: use designated initializers in STRBUF_INIT

2017-07-10 Thread Mike Hommey
On Mon, Jul 10, 2017 at 10:57:57AM -0400, Ben Peart wrote: > Correct. MSVC also supports designated initializers but does not fully > support C99. Precision: *recent versions* of MSVC support designated initializer. 2013 introduced them, but there were bugs until 2015, see e.g. https://stackoverf

[ANNOUNCE] git-cinnabar 0.5.0b2

2017-06-15 Thread Mike Hommey
Hi, Git-cinnabar is a git remote helper to interact with mercurial repositories. It allows to clone, pull and push from/to mercurial remote repositories, using git. Code on https://github.com/glandium/git-cinnabar This release on https://github.com/glandium/git-cinnabar/releases/tag/0.5.0b2 What

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread Mike Hommey
On Thu, Jun 15, 2017 at 09:01:45AM -0400, Jeff King wrote: > On Thu, Jun 15, 2017 at 08:05:18PM +0900, Mike Hommey wrote: > > > On Thu, Jun 15, 2017 at 12:30:46PM +0200, Johannes Schindelin wrote: > > > Footnote *1*: SHA-256, as all hash functions whose output is essenti

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-15 Thread Mike Hommey
On Thu, Jun 15, 2017 at 12:30:46PM +0200, Johannes Schindelin wrote: > Footnote *1*: SHA-256, as all hash functions whose output is essentially > the entire internal state, are susceptible to a so-called "length > extension attack", where the hash of a secret+message can be used to > generate the h

Re: [PATCH] fast-import: Increase the default pack depth to 50

2017-06-08 Thread Mike Hommey
On Thu, Jun 08, 2017 at 03:05:37AM -0400, Jeff King wrote: > On Thu, Jun 08, 2017 at 02:34:36PM +0900, Mike Hommey wrote: > > > In 618e613a70, 10 years ago, the default for pack depth used for > > git-pack-objects and git-repack was changed from 10 to 50, while > > leavi

[PATCH] fast-import: Increase the default pack depth to 50

2017-06-07 Thread Mike Hommey
erestingly, fast-import uses pack.depth when it's set, and the git-config manual says the default for pack.depth is 50. While the git-fast-import manual does say the default depth is 10, the inconsistency is also confusing. Signed-off-by: Mike Hommey --- Documentation/git-fast-import.txt | 2 +-

Re: Feature request: Please add support to stash specific files

2017-06-06 Thread Mike Hommey
On Tue, Jun 06, 2017 at 02:38:08PM -0400, rajdeep mondal wrote: > Hi Randall, > > I completely agree to what you are saying, but sometimes it just so > happens that in the middle of a change, i feel like if some portion of > the changes are fine I can commit them. Stashing some of the files > and

[ANNOUNCE] git-cinnabar 0.5.0b1

2017-06-03 Thread Mike Hommey
Hi, Git-cinnabar is a git remote helper to interact with mercurial repositories. It allows to clone, pull and push from/to mercurial remote repositories, using git. Code on https://github.com/glandium/git-cinnabar This release on https://github.com/glandium/git-cinnabar/releases/tag/0.5.0b1 What

Re: [PATCH] fetch-pack: always allow fetching of literal SHA1s

2017-05-09 Thread Mike Hommey
On Wed, May 10, 2017 at 12:33:44AM -0400, Jeff King wrote: > On Tue, May 09, 2017 at 09:22:11PM -0700, Shawn Pearce wrote: > > > > Hmm. That makes sense generally, as the request should succeed. But it > > > seems like we're creating a client that will sometimes succeed and > > > sometimes fail, a

[PATCH] notes: Fix note_tree_consolidate not to break the note_tree structure

2017-03-25 Thread Mike Hommey
the parent int_node*. This doesn't have a practical effect on git because all that happens after a remove_note is a write_notes_tree, which just iterates the entire note tree, but this affects anything using libgit.a that would try to do lookups after removing notes. Signed-off-by: Mike

Re: RFC: Another proposed hash function transition plan

2017-03-06 Thread Mike Hommey
On Mon, Mar 06, 2017 at 03:40:30PM -0800, Jonathan Nieder wrote: > David Lang wrote: > > >> Translation table > >> ~ > >> A fast bidirectional mapping between sha1-names and sha256-names of > >> all local objects in the repository is kept on disk. The exact format > >> of that mapp

Re: SHA1 collisions found

2017-03-02 Thread Mike Hommey
On Thu, Mar 02, 2017 at 02:27:15PM -0800, Linus Torvalds wrote: > On Thu, Mar 2, 2017 at 1:54 PM, Joey Hess wrote: > > > > There's a surprising result of combining iterated hash functions, that > > the combination is no more difficult to attack than the strongest hash > > function used. > > Duh.

Re: SHA1 collisions found

2017-02-25 Thread Mike Hommey
On Sat, Feb 25, 2017 at 02:26:56PM -0500, Jeff King wrote: > On Sat, Feb 25, 2017 at 06:50:50PM +, brian m. carlson wrote: > > > > As long as the reader can tell from the format of object names > > > stored in the "new object format" object from what era is being > > > referred to in some way

Re: Fwd: Possibly nicer pathspec syntax?

2017-02-07 Thread Mike Hommey
On Tue, Feb 07, 2017 at 05:48:26PM -0800, Linus Torvalds wrote: > > > On Tue, 7 Feb 2017, Linus Torvalds wrote: > > > > [ Clarification from original message, since Junio asked: I didn't > > actually want the semantics of '.' at all, since in a subdirectory it > > limits to the current subdi

Re: Fwd: Possibly nicer pathspec syntax?

2017-02-07 Thread Mike Hommey
On Tue, Feb 07, 2017 at 06:49:24PM -0800, Linus Torvalds wrote: > On Tue, Feb 7, 2017 at 6:40 PM, Mike Hommey wrote: > > > > As such, the default positive match should be ':/' (which is shorter and > > less cumbersome than ':(top)', btw) > > S

Re: [PATCH] gpg-interface: Add some output from gpg when it errors out.

2017-01-25 Thread Mike Hommey
On Wed, Jan 25, 2017 at 06:37:55PM -0800, Junio C Hamano wrote: > Mike Hommey writes: > > > On Wed, Jan 25, 2017 at 03:04:38PM -0800, Junio C Hamano wrote: > > ... > >> Overall I think this is a good thing to do. Instead of eating the > >> status output, sho

Re: [PATCH] gpg-interface: Add some output from gpg when it errors out.

2017-01-25 Thread Mike Hommey
On Wed, Jan 25, 2017 at 03:04:38PM -0800, Junio C Hamano wrote: > Mike Hommey writes: > > > For instance, after changing my laptop for a new one, I copied my > > configs, but had some environment differences that broke gpg. > > With this change applied, the output beco

[PATCH] gpg-interface: Add some output from gpg when it errors out.

2017-01-24 Thread Mike Hommey
gpg. With this change applied, the output becomes, on this new machine: gpg: keyblock resource '/usr/share/keyrings/debian-keyring.gpg': No such file or directory error: gpg failed to sign the data error: unable to sign the tag which makes it clearer what's wrong. Signed-off-

[ANNOUNCE] git-cinnabar 0.4.0

2017-01-18 Thread Mike Hommey
Hi, Git-cinnabar is a git remote helper to interact with mercurial repositories. It allows to clone, pull and push from/to mercurial remote repositories, using git. Code on https://github.com/glandium/git-cinnabar This release on https://github.com/glandium/git-cinnabar/releases/tag/0.4.0 What's

Re: Preserve/Prune Old Pack Files

2017-01-08 Thread Mike Hommey
On Mon, Jan 09, 2017 at 01:21:37AM -0500, Jeff King wrote: > On Wed, Jan 04, 2017 at 09:11:55AM -0700, Martin Fick wrote: > > > I am replying to this email across lists because I wanted to > > highlight to the git community this jgit change to repacking > > that we have up for review > > > > h

Rebasing multiple branches at once

2016-12-31 Thread Mike Hommey
Hi, I've had this kind of things to do more than once, and had to do it a lot today, so I figured it would be worth discussing whether git-rebase should be enhanced to support this, or if this should go in a separate tool or whatever. So here is what I'm trying to do in a not-too painful way: I'

Counter-intuitive result from diff -C --stat

2016-12-31 Thread Mike Hommey
Hi, So I was checking out differences between two branches, accounting for file moves with -C, and was surprised by the number of insertions and deletions that it indicated, because it was telling me I had removed more than I added, which I really don't think is true. I took a closer look, and wh

Corner case involving null sha1, alternates, cache misses, and submodule config API

2016-12-24 Thread Mike Hommey
Hi, As you might be aware, I'm working on a mercurial remote helper for git. The way it stores metadata for mercurial manifests abuses "commit" references in trees, which are normally used for submodules. Some operations in the helper use git diff-tree on those trees to find files faster than jus

Re: [PATCH] fast-import: properly fanout notes when tree is imported

2016-12-20 Thread Mike Hommey
Sorry, I forgot the v2 in the subject. Mike

[PATCH] fast-import: properly fanout notes when tree is imported

2016-12-20 Thread Mike Hommey
ually. Signed-off-by: Mike Hommey --- fast-import.c| 8 +--- t/t9301-fast-import-notes.sh | 42 ++ 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/fast-import.c b/fast-import.c index cb545d7df5..5e528b1999 100644 --- a/f

Re: [PATCH] fast-import: properly fanout notes when tree is imported

2016-12-20 Thread Mike Hommey
On Tue, Dec 20, 2016 at 11:34:04AM -0800, Junio C Hamano wrote: > Mike Hommey writes: > > > In typical uses of fast-import, trees are inherited from a parent > > commit. In that case, the tree_entry for the branch looks like: > > ... > > +# Create another notes tr

Re: [ANNOUNCE] git-cinnabar 0.4.0 release candidate 2

2016-12-20 Thread Mike Hommey
On Tue, Dec 20, 2016 at 05:47:44PM +0900, Mike Hommey wrote: > Hi, > > Git-cinnabar is a git remote helper to interact with mercurial > repositories. It allows to clone, pull and push from/to mercurial remote > repositories, using git. > > Code on https://github.com/glandiu

[ANNOUNCE] git-cinnabar 0.4.0 release candidate 2

2016-12-20 Thread Mike Hommey
Hi, Git-cinnabar is a git remote helper to interact with mercurial repositories. It allows to clone, pull and push from/to mercurial remote repositories, using git. Code on https://github.com/glandium/git-cinnabar This release on https://github.com/glandium/git-cinnabar/releases/tag/0.4.0rc2 [ P

[PATCH] fast-import: properly fanout notes when tree is imported

2016-12-18 Thread Mike Hommey
ually. Signed-off-by: Mike Hommey --- This is something I should have submitted a patch for a long time ago, back when this was discussed in the thread starting from https://www.spinics.net/lists/git/msg242426.html. The message most relevant to this patch in the thread is https://www.spinics.net/l

Re: Should reset_revision_walk clear more flags?

2016-12-04 Thread Mike Hommey
On Mon, Dec 05, 2016 at 08:09:58AM +0900, Mike Hommey wrote: > Hi, > > While trying to use the revision walking API twice in a row, I noticed > that the second time for the same setup would not yield the same result. > In my case, it turns out I was requesting

Should reset_revision_walk clear more flags?

2016-12-04 Thread Mike Hommey
Hi, While trying to use the revision walking API twice in a row, I noticed that the second time for the same setup would not yield the same result. In my case, it turns out I was requesting boundaries, and reset_revision_walk() is not resetting CHILD_SHOWN and BOUNDARY, both required to be reset f

  1   2   3   4   >