Re: "IMAP IDLE"-like long-polling "git fetch"

2019-01-09 Thread Stefan Beller
On Fri, Dec 28, 2018 at 8:39 PM Konstantin Ryabitsev wrote: > > On Sat, Dec 29, 2018 at 03:56:21AM +, Eric Wong wrote: > > Hey all, I just added this to the TODO file for public-inbox[1] but > > obviously it's intended for git.git (meta@public-inbox cc-ed): > > > > > +* Contribute something

[PATCH 1/4] submodule update: add regression test with old style setups

2018-12-07 Thread Stefan Beller
uce errors as pointed out in f178c13fda. The place to add such a regression test may look odd in t7412, but that is the best place as there we setup old style submodule setups explicitly. Signed-off-by: Stefan Beller --- t/t7412-submodule-absorbgitdirs.sh | 7 ++- 1 file changed, 6 insertions(+),

[PATCH 4/4] submodule deinit: unset core.worktree

2018-12-07 Thread Stefan Beller
ree is set after update, 2018-06-18) was relied on by other commits such as 984cd77ddb. Keep the offending commit reverted, but its functionality came back via 4d6d6ef1fc (Merge branch 'sb/submodule-update-in-c', 2018-09-17), such that we can reintroduce 984cd77ddb now. Signed-off-by: Ste

[PATCH 0/4]

2018-12-07 Thread Stefan Beller
Merge branch 'sb/submodule-core-worktree'", 2018-09-07) [3] 4d6d6ef1fc (Merge branch 'sb/submodule-update-in-c', 2018-09-17) [4] 74d4731da1 (submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree, 2018-08-13) Stefan Beller (4): submodule update: add regression test with

[PATCH 2/4] submodule: unset core.worktree if no working tree is present

2018-12-07 Thread Stefan Beller
ut without the accompanying change of the followup, we'd have an incomplete workflow of setting `core.worktree` again, when it is needed such as checking out a revision that contains a submodule. So re-introduce that commit as-is, focusing on fixing up the followup Signed-off-by: Stefan Beller Signed-off-b

[PATCH 3/4] submodule--helper: fix BUG message in ensure_core_worktree

2018-12-07 Thread Stefan Beller
e-worktree, 2018-08-13). Fix the error message. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index d38113a31a..31ac30cf2f 100644 --- a/builtin/submodule

Re: [PATCH] mailmap: update brandon williams's email address

2018-12-07 Thread Stefan Beller
On Fri, Dec 7, 2018 at 1:40 PM Jonathan Nieder wrote: > > Brandon Williams wrote: > > > Signed-off-by: Brandon Williams > > --- > > .mailmap | 1 + > > 1 file changed, 1 insertion(+) > > I can confirm that this is indeed the same person. What would be more of interest is why we'd be interested

Re: [wishlist] git submodule update --reset-hard

2018-12-07 Thread Stefan Beller
On Thu, Dec 6, 2018 at 5:23 PM Yaroslav Halchenko wrote: > > There was a proposal to "re-attach HEAD" in the submodule, i.e. > > if the branch branch points at the same commit, we don't need > > a detached HEAD, but could go with the branch instead. > > if I got the idea right, if we are talking

Re: git, monorepos, and access control

2018-12-06 Thread Stefan Beller
On Thu, Dec 6, 2018 at 12:09 PM Johannes Schindelin wrote: > > Hi, > > On Wed, 5 Dec 2018, Jeff King wrote: > > > The model that fits more naturally with how Git is implemented would be > > to use submodules. There you leak the hash of the commit from the > > private submodule, but that's

Re: [PATCHv2 0/9] Resending sb/submodule-recursive-fetch-gets-the-tip

2018-12-06 Thread Stefan Beller
On Tue, Dec 4, 2018 at 7:10 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > This is a resend of sb/submodule-recursive-fetch-gets-the-tip, > > with all feedback addressed. As it took some time, I'll send it > > without range-diff, but would ask for full re

Re: [wishlist] git submodule update --reset-hard

2018-12-06 Thread Stefan Beller
On Thu, Dec 6, 2018 at 1:25 PM Yaroslav Halchenko wrote: > > > On Thu, 06 Dec 2018, Stefan Beller wrote: > > > On Thu, Dec 6, 2018 at 10:02 AM Yaroslav Halchenko > > wrote: > > > > Dear Git Gurus, > > > > I wondered what would be your take on my w

[PATCH] fetch: ensure submodule objects fetched

2018-12-06 Thread Stefan Beller
s, and add a test for that too. Signed-off-by: Stefan Beller --- Thanks Jonathan for the review! So it looks like only the last patch needs some improvements, which is why I'd only resend the last patch here. Also note the test with interious superproject commits. All suggestions sounde

Re: [wishlist] git submodule update --reset-hard

2018-12-06 Thread Stefan Beller
On Thu, Dec 6, 2018 at 10:02 AM Yaroslav Halchenko wrote: > > Dear Git Gurus, > > I wondered what would be your take on my wishlist request to add > --reset-hard option, which would be very similar to regular "update" which > checks out necessary commit, but I want it to remain in the branch.

Re: A case where diff.colorMoved=plain is more sensible than diff.colorMoved=zebra & others

2018-12-06 Thread Stefan Beller
On Thu, Dec 6, 2018 at 6:58 AM Phillip Wood wrote: > > So is there some "must be at least two consecutive lines" condition for > > not-plain, or is something else going on here? > > To be considered a block has to have 20 alphanumeric characters - see > commit f0b8fb6e59 ("diff: define block by

Re: [ANNOUNCE] Git v2.20.0-rc2

2018-12-04 Thread Stefan Beller
-cc linux list > Perhaps we should note this more prominently, and since Brandon isn't at > Google anymore can some of you working there edit this post? It's the > first Google result for "git protocol v2", so it's going to be quite > confusing for people if after 2.20 the instructions in it no

Re: [PATCH on sb/more-repo-in-api] revision: use commit graph in get_reference()

2018-12-04 Thread Stefan Beller
On Tue, Dec 4, 2018 at 2:42 PM Jonathan Tan wrote: > > When fetching into a repository, a connectivity check is first made by > check_exist_and_connected() in builtin/fetch.c that runs: > > git rev-list --objects --stdin --not --all --quiet <(list of objects) > > If the client repository has

Re: [WIP RFC 5/5] upload-pack: send part of packfile response as uri

2018-12-04 Thread Stefan Beller
On Mon, Dec 3, 2018 at 3:38 PM Jonathan Tan wrote: > > This is a partial implementation of upload-pack sending part of its > packfile response as URIs. It does so by implementing a new flag `--exclude-configured-blobs` in pack-objects, which would change the output of pack-objects to output a

Re: [WIP RFC 3/5] upload-pack: refactor reading of pack-objects out

2018-12-03 Thread Stefan Beller
On Mon, Dec 3, 2018 at 3:37 PM Jonathan Tan wrote: > > Subsequent patches will change how the output of pack-objects is > processed, so extract that processing into its own function. > > Currently, at most 1 character can be buffered (in the "buffered" local > variable). One of those patches will

Re: [WIP RFC 2/5] Documentation: add Packfile URIs design doc

2018-12-03 Thread Stefan Beller
Thanks for bringing this design to the list! > diff --git a/Documentation/technical/protocol-v2.txt > b/Documentation/technical/protocol-v2.txt > index 345c00e08c..2cb1c41742 100644 > --- a/Documentation/technical/protocol-v2.txt > +++ b/Documentation/technical/protocol-v2.txt > @@ -313,7 +313,8

Re: [WIP RFC 0/5] Design for offloading part of packfile response to CDN

2018-12-03 Thread Stefan Beller
On Mon, Dec 3, 2018 at 3:37 PM Jonathan Tan wrote: > > There is a potential issue: a server which produces both the URIs and > the packfile at roughly the same time (like the implementation in this > patch set) will not have sideband access until it has concluded sending > the URIs. Among other

Re: [PATCH] pack-protocol.txt: accept error packets in any context

2018-12-03 Thread Stefan Beller
> diff --git a/pkt-line.c b/pkt-line.c > index 04d10bbd0..ce9e42d10 100644 > --- a/pkt-line.c > +++ b/pkt-line.c > @@ -346,6 +346,10 @@ enum packet_read_status packet_read_with_status(int fd, > char **src_buffer, > return PACKET_READ_EOF; > } > > + if

Re: [PATCH] sideband: color lines with keyword only

2018-12-03 Thread Stefan Beller
On Mon, Dec 3, 2018 at 3:23 PM Jonathan Nieder wrote: > I was curious about what versions of Gerrit this is designed to > support (or in other words whether it's a bug fix or a feature). > Looking at examples like [1], it seems that Gerrit historically always > used "ERROR:" so the 59a255aef0

[PATCH] sideband: color lines with keyword only

2018-12-03 Thread Stefan Beller
for. A line containing only the keyword and nothing else ("SUCCESS") should still be colored. Signed-off-by: Stefan Beller --- sideband.c | 5 +++-- t/t5409-colorize-remote-messages.sh | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/si

Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files

2018-12-03 Thread Stefan Beller
On Thu, Nov 29, 2018 at 7:33 AM Duy Nguyen wrote: > > On Wed, Nov 28, 2018 at 9:30 PM Stefan Beller wrote: > > > > On Wed, Nov 28, 2018 at 12:09 PM Duy Nguyen wrote: > > > > > > On Wed, Nov 28, 2018 at 9:01 PM Duy Nguyen wrote: > > > > sh

[git-users] Re: How de-duplicate similar repositories with alternates

2018-11-30 Thread 'Stefan Beller' via Git for human beings
On Thu, Nov 29, 2018 at 7:00 AM Ævar Arnfjörð Bjarmason wrote: > > A co-worker asked me today how space could be saved when you have > multiple checkouts of the same repository (at different revs) on the > same machine. I said since these won't block-level de-duplicate well[1] > one way to do

Re: [PATCH v2 6/7] checkout: split into switch-branch and checkout-files

2018-11-29 Thread Stefan Beller
> > Idea: > > If git checkout-files modifies the submodules file, it could also > > auto-update the submodules. (For example, with something like "git > > submodule update --init --recursive --progress"). > > This one is tricky because we should deal with submodule autoupdate > consistently across

Re: [PATCH 09/10] fetch: try fetching submodules if needed objects were not fetched

2018-11-28 Thread Stefan Beller
On Fri, Oct 26, 2018 at 1:41 PM Jonathan Tan wrote: > > > But this default fetch is not sufficient, as a newly fetched commit in > > the superproject could point to a commit in the submodule that is not > > in the default refspec. This is common in workflows like Gerrit's. > > When fetching a

[PATCH 4/9] submodule.c: tighten scope of changed_submodule_names struct

2018-11-28 Thread Stefan Beller
The `changed_submodule_names` are only used for fetching, so let's make it part of the struct that is passed around for fetching submodules. Signed-off-by: Stefan Beller --- submodule.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/submodule.c b

[PATCH 9/9] fetch: try fetching submodules if needed objects were not fetched

2018-11-28 Thread Stefan Beller
ecks were done only when a ref in the superproject changed, these checks were extended to also be performed when fetching into FETCH_HEAD for completeness, and add a test for that too. Signed-off-by: Stefan Beller --- builtin/fetch.c | 11 +- submodule.c | 206 +

[PATCHv2 0/9] Resending sb/submodule-recursive-fetch-gets-the-tip

2018-11-28 Thread Stefan Beller
. Thanks, Stefan Previous round: https://public-inbox.org/git/20181016181327.107186-1-sbel...@google.com/ Stefan Beller (9): sha1-array: provide oid_array_filter submodule.c: fix indentation submodule.c: sort changed_submodule_names before searching it submodule.c: tighten scope

[PATCH 5/9] submodule: store OIDs in changed_submodule_names

2018-11-28 Thread Stefan Beller
access to the util pointer for longer that contains the commits that we need to fetch, which will be useful in a later patch. Signed-off-by: Stefan Beller Reviewed-by: Jonathan Tan --- submodule.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/submodule.c

[PATCH 3/9] submodule.c: sort changed_submodule_names before searching it

2018-11-28 Thread Stefan Beller
has better worst case execution times. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- submodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/submodule.c b/submodule.c index bc48ea3b68..3c388f85cc 100644 --- a/submodule.c +++ b/submodule.c @@ -1283

[PATCH 7/9] submodule: migrate get_next_submodule to use repository structs

2018-11-28 Thread Stefan Beller
the check upfront, such that we do not need to spawn a child process to find out if the submodule is broken. Signed-off-by: Stefan Beller --- submodule.c | 56 + 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/submodule.c b/submodu

[PATCH 8/9] submodule.c: fetch in submodules git directory instead of in worktree

2018-11-28 Thread Stefan Beller
Keep the properties introduced in 10f5c52656 (submodule: avoid auto-discovery in prepare_submodule_repo_env(), 2016-09-01), by fixating the git directory of the submodule. Signed-off-by: Stefan Beller --- submodule.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git

[PATCH 6/9] repository: repo_submodule_init to take a submodule struct

2018-11-28 Thread Stefan Beller
that is not confused with the struct submodule as easily. Perform such renames in similar functions as well. Also move its documentation into the header file. Reviewed-by: Jonathan Tan Signed-off-by: Stefan Beller --- builtin/grep.c | 17 +++- builtin/ls-files.c

[PATCH 1/9] sha1-array: provide oid_array_filter

2018-11-28 Thread Stefan Beller
Helped-by: Junio C Hamano Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- Documentation/technical/api-oid-array.txt | 5 + sha1-array.c | 17 + sha1-array.h | 3 +++ 3 files changed, 25 insertions

[PATCH 2/9] submodule.c: fix indentation

2018-11-28 Thread Stefan Beller
The submodule subsystem is really bad at staying within 80 characters. Fix it while we are here. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- submodule.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/submodule.c b/submodule.c index 6415cc5580

Re: [PATCH 3/5] pack-objects: add --sparse option

2018-11-28 Thread Stefan Beller
> +--sparse:: > + Use the "sparse" algorithm to determine which objects to include in > + the pack. This can have significant performance benefits when > computing > + a pack to send a small change. However, it is possible that extra > + objects are added to the pack-file

Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files

2018-11-28 Thread Stefan Beller
On Wed, Nov 28, 2018 at 12:09 PM Duy Nguyen wrote: > > On Wed, Nov 28, 2018 at 9:01 PM Duy Nguyen wrote: > > should we do > > something about detached HEAD in this switch-branch command (or > > whatever its name will be)? > > > > This is usually a confusing concept to new users > > And it just

Re: Git pull confusing output

2018-11-28 Thread Stefan Beller
On Tue, Nov 27, 2018 at 10:31 PM Junio C Hamano wrote: > > Will writes: > > > I’m far from being a guru, but I consider myself a competent Git > > user. Yet, here’s my understanding of the output of one the most-used > > commands, `git push`: > >> Counting objects: 6, done. > > No idea what an

Re: [bug report] git-gui child windows are blank

2018-11-28 Thread Stefan Beller
On Wed, Nov 28, 2018 at 6:13 AM Kenn Sebesta wrote: > > v2.19.2, installed from brew on macOS Mojave 14.2.1. > > `git-gui` is my much beloved go-to tool for everything git. > Unfortunately, on my new Macbook Air it seems to have a bug. When I > first load the program, the parent window populates

Re: [PATCH v2 6/7] checkout: split into switch-branch and checkout-files

2018-11-28 Thread Stefan Beller
On Wed, Nov 28, 2018 at 7:31 AM Duy Nguyen wrote: > > On Wed, Nov 28, 2018 at 7:03 AM Junio C Hamano wrote: > > > > Nguyễn Thái Ngọc Duy writes: > > > > > The good old "git checkout" command is still here and will be until > > > all (or most of users) are sick of it. > > > > Two comments on

Re: [PATCH v2 4/7] checkout: move dwim_new_local_branch to checkout_opts

2018-11-27 Thread Stefan Beller
On Tue, Nov 27, 2018 at 8:53 AM Nguyễn Thái Ngọc Duy wrote: > > Signed-off-by: Nguyễn Thái Ngọc Duy I would not mind to have this squashed into the previous patch but keeping it separated is fine, too. (Reason for squashing: it makes it clearer that we do not care about one specific option, but

Re: [PATCH v2 3/7] checkout: move 'confict_style' to checkout_opts

2018-11-27 Thread Stefan Beller
On Tue, Nov 27, 2018 at 8:53 AM Nguyễn Thái Ngọc Duy wrote: > The last patches seemed self explanatory after the first RFC and their commit message. This one is harder to reason about, as --conflict is documented as "The same as --merge option above, but ..." and --merge is "When switching

Re: [PATCH v2 1/7] parse-options: allow parse_options_concat(NULL, options)

2018-11-27 Thread Stefan Beller
On Tue, Nov 27, 2018 at 8:53 AM Nguyễn Thái Ngọc Duy wrote: > > There is currently no caller that calls this function with "a" being > NULL. But it will be introduced shortly. It is used to construct the > option array from scratch, e.g. > >struct parse_options opts = NULL; >opts =

Re: Git pull confusing output

2018-11-27 Thread Stefan Beller
On Tue, Nov 27, 2018 at 8:52 AM Will wrote: > And even them, do they need this info every time they push? I agree that we should make the output a bit more user friendly, which means we'd only want to output relevant data for the user. The different phases taking each one line takes up

Re: Confusing behavior with ignored submodules and `git commit -a`

2018-11-26 Thread Stefan Beller
On Thu, Nov 15, 2018 at 4:31 PM Michael Forney wrote: > > On 2018-11-15, Stefan Beller wrote: > > On Thu, Nov 15, 2018 at 1:33 PM Michael Forney wrote: > >> Well, currently the submodule config can be disabled in diff_flags by > >> setting override_submodule_c

Re: [RFC] Introduce two new commands, switch-branch and restore-paths

2018-11-26 Thread Stefan Beller
On Mon, Nov 26, 2018 at 8:01 AM Ævar Arnfjörð Bjarmason wrote: > > > On Tue, Nov 20 2018, Duy Nguyen wrote: > > > On Mon, Nov 19, 2018 at 04:19:53PM +0100, Duy Nguyen wrote: > >> I promise to come back with something better (at least it still > >> sounds better in my mind). If that idea does not

Re: [PATCH 2/5] ieot: default to not writing IEOT section

2018-11-26 Thread Stefan Beller
On Mon, Nov 26, 2018 at 1:48 PM Ben Peart wrote: > > > > On 11/26/2018 2:59 PM, Stefan Beller wrote: > >>> +static int record_ieot(void) > >>> +{ > >>> + int val; > >>> + > >> > >> Initialize stack val to zero to en

Re: What's cooking in git.git (Nov 2018, #06; Wed, 21)

2018-11-26 Thread Stefan Beller
> > * sb/submodule-recursive-fetch-gets-the-tip (2018-10-31) 11 commits > [...] > > "git fetch --recurse-submodules" may not fetch the necessary commit > that is bound to the superproject, which is getting corrected. > > Is the discussion on this topic over? What was the outcome? Please don't

Re: [PATCH v2 0/9] diff --color-moved-ws fixes and enhancment

2018-11-26 Thread Stefan Beller
On Fri, Nov 23, 2018 at 3:17 AM Phillip Wood wrote: > > From: Phillip Wood > > Thanks to Stefan for his feedback on v1. I've updated patches 2 & 8 in > response to those comments - see the range-diff below for details (the > patch numbers are off by one in the range diff, I think because the >

Re: [PATCH v1 1/2] log -G: Ignore binary files

2018-11-26 Thread Stefan Beller
On Wed, Nov 21, 2018 at 1:08 PM Thomas Braun wrote: > > The -G option of log looks for the differences whose patch text > contains added/removed lines that match regex. > > The concept of differences only makes sense for text files, therefore > we need to ignore binary files when searching with

Re: [PATCH 2/5] ieot: default to not writing IEOT section

2018-11-26 Thread Stefan Beller
> > +static int record_ieot(void) > > +{ > > + int val; > > + > > Initialize stack val to zero to ensure proper default. I don't think that is needed here, as we only use `val` when we first write to it via git_config_get_bool. Did you spot this via code review and thought of defensive

Re: [PATCH] grep: use grep_opt->repo instead of explict repo argument

2018-11-26 Thread Stefan Beller
. > > While at there, use the right reference instead of the_repository and > the_index in this code. I was a bit careless in my attempt to kick > the_repository / the_index out of library code. It's normally safe to > just stick the_repository / the_index in bultin/ code, but it's n

Re: [PATCH v1 9/9] diff --color-moved-ws: handle blank lines

2018-11-20 Thread Stefan Beller
On Fri, Nov 16, 2018 at 3:04 AM Phillip Wood wrote: > > From: Phillip Wood > > When using --color-moved-ws=allow-indentation-change allow lines with > the same indentation change to be grouped across blank lines. For now > this only works if the blank lines have been moved as well, not for >

Re: [PATCH v1 8/9] diff --color-moved-ws: modify allow-indentation-change

2018-11-16 Thread Stefan Beller
On Fri, Nov 16, 2018 at 3:04 AM Phillip Wood wrote: > > From: Phillip Wood > > Currently diff --color-moved-ws=allow-indentation-change does not > support indentation that contains a mix of tabs and spaces. For > example in commit 546f70f377 ("convert.h: drop 'extern' from function >

Re: [PATCH v1 7/9] diff --color-moved-ws: optimize allow-indentation-change

2018-11-16 Thread Stefan Beller
On Fri, Nov 16, 2018 at 3:04 AM Phillip Wood wrote: > > From: Phillip Wood > > When running > > git diff --color-moved-ws=allow-indentation-change v2.18.0 v2.19.0 > > cmp_in_block_with_wsd() is called 694908327 times. Of those 42.7% > return after comparing a and b. By comparing the lengths

Re: [PATCH v1 2/9] diff: use whitespace consistently

2018-11-16 Thread Stefan Beller
On Fri, Nov 16, 2018 at 3:04 AM Phillip Wood wrote: > > From: Phillip Wood > > Most of the documentation uses 'whitespace' rather than 'white space' > or 'white spaces' convert to latter two to the former for consistency. Makes sense; this doesn't touch docs, but also code. $ git grep "white

Re: Confusing behavior with ignored submodules and `git commit -a`

2018-11-15 Thread Stefan Beller
On Thu, Nov 15, 2018 at 1:33 PM Michael Forney wrote: > > On 2018-11-15, Stefan Beller wrote: > > On Wed, Nov 14, 2018 at 10:05 PM Michael Forney > > wrote: > >> Looking at ff6f1f564c, I don't really see anything that might be > >> related to git-add, git

Re: [PATCH 18/23] submodule: use submodule repos for object lookup

2018-11-15 Thread Stefan Beller
On Thu, Nov 15, 2018 at 11:54 AM Jonathan Tan wrote: > > > +/* > > + * Initialize 'out' based on the provided submodule path. > > + * > > + * Unlike repo_submodule_init, this tolerates submodules not present > > + * in .gitmodules. This function exists only to preserve historical > > behavior, >

Re: Confusing behavior with ignored submodules and `git commit -a`

2018-11-15 Thread Stefan Beller
On Wed, Nov 14, 2018 at 10:05 PM Michael Forney wrote: > > +bmwill > > On 2018-11-14, Michael Forney wrote: > > On 2018-10-25, Stefan Beller wrote: > >> I guess reverting that commit is not a good idea now, as > >> I would expect something to break. > &

Re: Confusing behavior with ignored submodules and `git commit -a`

2018-11-15 Thread Stefan Beller
> I have a git repository which contains a number of submodules that > refer to external repositories. Some of these repositories need to > patched in some way, so patches are stored alongside the submodules, > and are applied when building. This mostly works fine, but causes > submodules to show

Re: [PATCH v2 1/1] bundle: cleanup lock files on error

2018-11-14 Thread Stefan Beller
On Wed, Nov 14, 2018 at 1:43 PM Martin Ågren wrote: > > On Wed, 14 Nov 2018 at 16:26, Gaël Lhez via GitGitGadget > wrote: > > However, the `.lock` file was still open and on Windows that means > > that it could not be deleted properly. This patch fixes that issue. > > Hmmm, doesn't the tempfile

[PATCH 21/23] commit: prepare free_commit_buffer and release_commit_memory for any repo

2018-11-13 Thread Stefan Beller
Pass the object pool to free_commit_buffer and release_commit_memory, such that we can eliminate access to 'the_repository'. Also remove the TODO in release_commit_memory, as commit->util was removed in 9d2c97016f (commit.h: delete 'util' field in struct commit, 2018-05-19) Signed-off-by: Ste

[PATCH 18/23] submodule: use submodule repos for object lookup

2018-11-13 Thread Stefan Beller
This converts the 'show_submodule_header' function to use the repository API properly, such that the submodule objects are not added to the main object store. Signed-off-by: Stefan Beller --- submodule.c | 73 ++--- 1 file changed, 58 insertions

[PATCH 22/23] path.h: make REPO_GIT_PATH_FUNC repository agnostic

2018-11-13 Thread Stefan Beller
git_pathdup uses the_repository internally, but the macro REPO_GIT_PATH_FUNC is specifically made for arbitrary repositories. Switch to repo_git_path which works on arbitrary repositories. Signed-off-by: Stefan Beller --- path.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 20/23] commit-graph: convert remaining functions to handle any repo

2018-11-13 Thread Stefan Beller
Convert all functions to handle arbitrary repositories in commit-graph.c that are used by functions taking a repository argument already. Notable exclusion is write_commit_graph and its local functions as that only works on the_repository. Signed-off-by: Stefan Beller --- commit-graph.c | 40

[PATCH 23/23] t/helper/test-repository: celebrate independence from the_repository

2018-11-13 Thread Stefan Beller
any accidental access is more likely to be found. Signed-off-by: Stefan Beller --- cache.h| 2 ++ t/helper/test-repository.c | 10 ++ 2 files changed, 12 insertions(+) diff --git a/cache.h b/cache.h index 59c8a93046..8864d7ec15 100644 --- a/cache.h +++ b/cach

[PATCH 02/23] packfile: allow has_packed_and_bad to handle arbitrary repositories

2018-11-13 Thread Stefan Beller
has_packed_and_bad is not widely used, so just migrate it all at once. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- packfile.c | 5 +++-- packfile.h | 2 +- sha1-file.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packfile.c b/packfile.c index

[PATCH 17/23] pretty: prepare format_commit_message to handle arbitrary repositories

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- contrib/coccinelle/the_repository.pending.cocci | 10 ++ pretty.c| 15 --- pretty.h| 7 ++- 3 files changed, 24 insertions

[PATCH 16/23] commit: prepare logmsg_reencode to handle arbitrary repositories

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- commit.h| 8 contrib/coccinelle/the_repository.pending.cocci | 9 + pretty.c| 13 +++-- 3 files changed, 24 insertions(+), 6

[PATCH 14/23] commit: prepare get_commit_buffer to handle any repo

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c| 8 +--- commit.h| 7 ++- contrib/coccinelle/the_repository.pending.cocci | 8 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/commit.c b

[PATCH 07/23] commit: allow parse_commit* to handle any repo

2018-11-13 Thread Stefan Beller
Just like the previous commit, parse_commit and friends are used a lot and are found in new patches, so we cannot change their signature easily. Re-introduce these function prefixed with 'repo_' that take a repository argument and keep the original as a shallow macro. Signed-off-by: Stefan

[PATCH 19/23] submodule: don't add submodule as odb for push

2018-11-13 Thread Stefan Beller
.) This code of push_submodule() is exercised in t5531 and continues to work, showing that the submodule odbc is not needed. Signed-off-by: Stefan Beller --- submodule.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/submodule.c b/submodule.c index 262f03f118..5818088df2 100644

[PATCH 08/23] commit-reach.c: allow paint_down_to_common to handle any repo

2018-11-13 Thread Stefan Beller
As the function is file local and not widely used, migrate it all at once. Signed-off-by: Stefan Beller --- commit-reach.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index 9f79ce0a22..67c2e43d5e 100644 --- a/commit-reach.c

[PATCH 05/23] object-store: prepare has_{sha1, object}_file to handle any repo

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- .../coccinelle/the_repository.pending.cocci | 30 +++ object-store.h| 22 ++ sha1-file.c | 15 ++ 3 files changed, 56 insertions(+), 11 deletions(-) diff

[PATCH 15/23] commit: prepare repo_unuse_commit_buffer to handle any repo

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c| 6 -- commit.h| 7 ++- contrib/coccinelle/the_repository.pending.cocci | 8 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/commit.c b

[PATCH 06/23] object: parse_object to honor its repository argument

2018-11-13 Thread Stefan Beller
In 8e4b0b6047 (object.c: allow parse_object to handle arbitrary repositories, 2018-06-28), we forgot to pass the repository down to the read_object_file. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- object.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 12/23] commit-reach: prepare get_merge_bases to handle any repo

2018-11-13 Thread Stefan Beller
Similarly to previous patches, the get_merge_base functions are used often in the code base, which makes migrating them hard. Implement the new functions, prefixed with 'repo_' and hide the old functions behind a wrapper macro. Signed-off-by: Stefan Beller --- commit-reach.c

[PATCH 04/23] object-store: prepare read_object_file to deal with any repo

2018-11-13 Thread Stefan Beller
not apply the resulting patch to keep the diff of this patch small. Signed-off-by: Stefan Beller --- contrib/coccinelle/the_repository.pending.cocci | 12 object-store.h | 10 -- 2 files changed, 20 insertions(+), 2 deletions(-) create mode

[PATCH 13/23] commit-reach: prepare in_merge_bases[_many] to handle any repo

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 15 +-- commit-reach.h | 12 ++-- contrib/coccinelle/the_repository.pending.cocci | 17 + 3 files changed, 36 insertions(+), 8 deletions

[PATCH 11/23] commit-reach.c: allow get_merge_bases_many_0 to handle any repo

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index 81015830cb..b3b1f62aba 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -216,7 +216,8 @@ static int remove_redundant(struct

[PATCH 03/23] object-store: allow read_object_file_extended to read from any repo

2018-11-13 Thread Stefan Beller
read_object_file_extended is not widely used, so migrate it all at once. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- object-store.h | 5 +++-- sha1-file.c| 11 ++- streaming.c| 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/object

[PATCH 09/23] commit-reach.c: allow merge_bases_many to handle any repo

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index 67c2e43d5e..a53b31e6a2 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -95,7 +95,9 @@ static struct commit_list

[PATCH 10/23] commit-reach.c: allow remove_redundant to handle any repo

2018-11-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit-reach.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commit-reach.c b/commit-reach.c index a53b31e6a2..81015830cb 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -156,7 +156,7 @@ struct commit_list

[PATCHv3 00/23] Bring more repository handles into our code base

2018-11-13 Thread Stefan Beller
in the last iteration (but did not receive any comment), as they demonstrate and fix a problem that is only exposed when using GIT_TEST_COMMIT_GRAPH=1 for the test suite. Previous discussion at https://public-inbox.org/git/20181030220817.61691-1-sbel...@google.com/ Thanks, Stefan Stefan Beller (23

[PATCH 01/23] sha1_file: allow read_object to read objects in arbitrary repositories

2018-11-13 Thread Stefan Beller
Allow read_object (a file local functon in sha1_file) to handle arbitrary repositories by passing the repository down to oid_object_info_extended. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- sha1-file.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff

Re: rebase-in-C stability for 2.20

2018-11-13 Thread Stefan Beller
> But maybe I'm being overly paranoid. What do those more familiar with > this think? I am not too worried, * as rebase is a main porcelain, that is even hard to use in a script. so any failures are not deep down in some automation, but when found exposed quickly (and hopefully reported). *

[PATCH] diff: align move detection error handling with other options

2018-11-13 Thread Stefan Beller
instead of an int; add a new bit to signal errors. Once the error is signaled, we discard the other bits, such that it doesn't matter if the error bit overlaps with any other bit. Signed-off-by: Stefan Beller --- c.f. ./git -c diff.colormovedws=bogus diff HEAD error: unknown color-moved-ws mode 'bogus

Re: [PATCH 1/1] bundle: refuse to create empty bundle

2018-11-13 Thread Stefan Beller
On Tue, Nov 13, 2018 at 12:33 PM Gaël Lhez wrote: > > Hello, > > I don't know why I receive these message (and especially now given the time > at which I pushed this) but I suppose someone (Johannes Schindelin ?) > probably pushed back my original commit from git for windows github to GIT >

Re: [PATCH 1/1] bundle: refuse to create empty bundle

2018-11-13 Thread Stefan Beller
On Tue, Nov 13, 2018 at 7:09 AM Gaël Lhez via GitGitGadget wrote: > > From: =?UTF-8?q?Ga=C3=ABl=20Lhez?= > > When an user tries to create an empty bundle via `git bundle create > ` where `` resolves to an empty list (for > example, like `master..master`), the command fails and warns the user >

Re: Re* [PATCH v3 1/1] protocol: advertise multiple supported versions

2018-11-13 Thread Stefan Beller
On Mon, Nov 12, 2018 at 7:24 PM Junio C Hamano wrote: > > Stefan Beller writes: > > >> + if (have_advertised_versions_already) > >> + BUG(_("attempting to register an allowed protocol version > >> after advertisement")); >

Re: [PATCH] remote-curl: die on server-side errors

2018-11-12 Thread Stefan Beller
server-side error > messages, as well as a test case for this issue. > > Signed-off-by: Josh Steadmon Reviewed-by: Stefan Beller

Re: [PATCH] Makefile: use CXXFLAGS for linking fuzzers

2018-11-12 Thread Stefan Beller
On Mon, Nov 12, 2018 at 2:03 PM wrote: > > OSS-Fuzz requires C++-specific flags to link fuzzers. Passing these in > CFLAGS causes lots of build warnings. Using separate CXXFLAGS avoids > this. > That makes sense in this context, > CFLAGS = -g -O2 -Wall > +CXXFLAGS ?= $(CFLAGS) ... but

Re: [PATCH v3 1/1] protocol: advertise multiple supported versions

2018-11-12 Thread Stefan Beller
On Mon, Nov 12, 2018 at 1:49 PM wrote: > > Currently the client advertises that it supports the wire protocol > version set in the protocol.version config. However, not all services > support the same set of protocol versions. When connecting to > git-receive-pack, the client automatically

Re: [PATCH 0/9] caching loose objects

2018-11-12 Thread Stefan Beller
On Mon, Nov 12, 2018 at 8:02 AM Derrick Stolee wrote: > This cleanup is actually really valuable, and affects much more than > this application. I second this. I'd value this series more for the cleanup than its application. ;-)

Re: [PATCH 6/9] sha1-file: use an object_directory for the main object dir

2018-11-12 Thread Stefan Beller
On Mon, Nov 12, 2018 at 8:09 AM Jeff King wrote: > > On Mon, Nov 12, 2018 at 10:48:36AM -0500, Derrick Stolee wrote: > > > > If the "the first one is the main store, the rest are alternates" bit is > > > too subtle, we could mark each "struct object_directory" with a bit for > > > "is_local". > >

Re: [PATCH 6/9] sha1-file: use an object_directory for the main object dir

2018-11-12 Thread Stefan Beller
On Mon, Nov 12, 2018 at 7:48 AM Derrick Stolee wrote: > [... lots of quoted text...] Some email readers are very good at recognizing unchanged quoted text and collapse it, not so at https://public-inbox.org/git/421d3b43-3425-72c9-218e-facd86e28...@gmail.com/ which I use to read through this

Re: [PATCH 2/9] submodule--helper: prefer strip_suffix() to ends_with()

2018-11-12 Thread Stefan Beller
On Mon, Nov 12, 2018 at 6:47 AM Jeff King wrote: > > Using strip_suffix() lets us avoid repeating ourselves. It also makes > the handling of "/" a bit less subtle (we strip one less character than > we matched in order to leave it in place, but we can just as easily > include the "/" when we add

[PATCH] coccicheck: introduce 'pending' semantic patches

2018-11-09 Thread Stefan Beller
Based-on-work-by: SZEDER Gábor Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- I dialed back on the workflow, as we may want to explore it first before writing it down. Stefan Makefile | 7 +-- contrib/coccinelle/README | 41 ++

  1   2   3   4   5   6   7   8   9   10   >