Re: [PATCH] travis-ci: no longer use containers

2018-10-25 Thread Sebastian Staudt
Junio C Hamano writes: > > Sebastian Staudt writes: > > > Travis CI will soon deprecate the container-based infrastructure > > enabled by `sudo: false` in ce59dffb34190e780be2fa9f449f842cadee9753. > > > > More info: > > https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures > >

Re: [PATCH 2/3] http: add support for disabling SSL revocation checks in cURL

2018-10-25 Thread Junio C Hamano
Johannes Schindelin writes: >> I did not and I do not think it would. I was wondering if the >> ability to be able to specify these per destination is something >> very useful and deserves to be called out in the doc, together with >> ... > > I do not think that it needs to be called out

Re: [PATCH] http: give curl version warnings consistently

2018-10-25 Thread Junio C Hamano
Johannes Schindelin writes: > On Thu, 25 Oct 2018, Junio C Hamano wrote: > >> When a requested feature cannot be activated because the version of >> cURL library used to build Git with is too old, most of the codepaths >> give a warning like "$Feature is not supported with cURL < $Version", >>

Re: [PATCH v3 3/3] commit-slab: missing definitions and forward declarations (hdr-check)

2018-10-25 Thread Carlo Arenas
On Thu, Oct 25, 2018 at 2:09 PM Ramsay Jones wrote: > Yes, this will 'fix' the 'commit-reach.h' header (not surprising), > but I prefer my patch. ;-) I apologize, I joined the list recently and so might had missed a reroll; the merged series in pu doesn't seem to include it and the error was

Re: [PATCH v1 2/2] curl_off_t xcurl_off_t is not portable

2018-10-25 Thread Junio C Hamano
tbo...@web.de writes: > From: Torsten Bögershausen > Subject: Re: [PATCH v1 2/2] curl_off_t xcurl_off_t is not portable That title is misleading; it sounded as if the are these two typedefs and they do not work correctly on some platforms, but that is not what you are doing with the patch. >

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

2018-10-25 Thread Junio C Hamano
Stefan Beller writes: >> In this series I am addressing the comments by Stefan Beller about the >> tests in patch 9. >> >> If the new tests look OK, I'd say we try moving the series to "next" and >> see what happens? > > Sounds good to me. Which means (1) the plan sounds OK but I didn't look at

Re: [PATCH v5] branch: introduce --show-current display option

2018-10-25 Thread Junio C Hamano
Eric Sunshine writes: >> + test_when_finished " >> + git checkout branch-one >> + git branch -D branch-and-tag-name >> + " && >> + git checkout -b branch-and-tag-name && >> + test_when_finished "git tag -d branch-and-tag-name" && >> + git

Re: [PATCH] travis-ci: no longer use containers

2018-10-25 Thread SZEDER Gábor
On Fri, Oct 26, 2018 at 09:09:48AM +0900, Junio C Hamano wrote: > Sebastian Staudt writes: > > > Travis CI will soon deprecate the container-based infrastructure > > enabled by `sudo: false` in ce59dffb34190e780be2fa9f449f842cadee9753. > > > > More info: > >

Re: [PATCH 3/2] rebase -i: recognize short commands without arguments

2018-10-25 Thread Junio C Hamano
Johannes Sixt writes: > The sequencer instruction 'b', short for 'break', is rejected: > > error: invalid line 2: b > > The reason is that the parser expects all short commands to have > an argument. Permit short commands without arguments. > > Signed-off-by: Johannes Sixt > --- > I'll send

Re: [PATCH v5] archive: initialize archivers earlier

2018-10-25 Thread Junio C Hamano
Jeff King writes: > On Thu, Oct 25, 2018 at 01:32:14PM -0700, stead...@google.com wrote: > >> Initialize archivers as soon as possible when running git-archive. >> Various non-obvious behavior depends on having the archivers >> initialized, such as determining the desired archival format from

Re: [PATCH v3 1/3] [Outreachy] t3903-stash: test without configured user name

2018-10-25 Thread Junio C Hamano
Slavica Djukic writes: > From: Slavica Please make sure this matches your sign-off below. > This is part of enhancement request that ask for 'git stash' to work > even if 'user.name' and 'user.email' are not configured. > Due to an implementation detail, git-stash undesirably requires >

Re: [PATCH v5] branch: introduce --show-current display option

2018-10-25 Thread Junio C Hamano
Eric Sunshine writes: >> + test_when_finished "git tag -d branch-and-tag-name" && >> + git tag branch-and-tag-name && > > If git-tag crashes before actually creating the new tag, then "git tag > -d", passed to test_when_finished(), will error out too, which is > probably undesirable

Re: [RFC PATCH] index-pack: improve performance on NFS

2018-10-25 Thread Junio C Hamano
"Jansen, Geert" writes: > The index-pack command determines if a sha1 collision test is needed by > checking the existence of a loose object with the given hash. In my tests, I > can improve performance of “git clone” on Amazon EFS by 8x when used with a > non-default mount option

Re: [PATCH] travis-ci: no longer use containers

2018-10-25 Thread Junio C Hamano
Sebastian Staudt writes: > Travis CI will soon deprecate the container-based infrastructure > enabled by `sudo: false` in ce59dffb34190e780be2fa9f449f842cadee9753. > > More info: > https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures Thanks for posting a patch that would serve

[PATCH v2] list-objects.c: don't segfault for missing cmdline objects

2018-10-25 Thread Matthew DeVore
When a command is invoked with both --exclude-promisor-objects, --objects-edge-aggressive, and a missing object on the command line, the rev_info.cmdline array could get a NULL pointer for the value of an 'item' field. Prevent dereferencing of a NULL pointer in that situation. There are a few

Re: [PATCH] Clear --exclude list after 'git rev-parse --all'

2018-10-25 Thread Junio C Hamano
Jeff King writes: > An easy test is: > > $ git rev-list --no-walk --exclude='*' --all --all > 3289ca716320457af5d2dd550b716282ad22da11 > ...a bunch of other tip commits... > > $ git rev-parse --exclude='*' --all --all > [no output, but it should print those same tip commits] I

[PATCH 10/10] builtin/fetch: check for submodule updates in any ref update

2018-10-25 Thread Stefan Beller
Gerrit, the code review tool, has a different workflow than our mailing list based approach. Usually users upload changes to a Gerrit server and continuous integration and testing happens by bots. Sometimes however a user wants to checkout a change locally and look at it locally. For this use

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

2018-10-25 Thread Stefan Beller
Currently when git-fetch is asked to recurse into submodules, it dispatches a plain "git-fetch -C " (with some submodule related options such as prefix and recusing strategy, but) without any information of the remote or the tip that should be fetched. But this default fetch is not sufficient, as

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

2018-10-25 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 07/10] submodule: migrate get_next_submodule to use repository structs

2018-10-25 Thread Stefan Beller
We used to recurse into submodules, even if they were broken having only an objects directory. The child process executed in the submodule would fail though if the submodule was broken. This patch tightens the check upfront, such that we do not need to spawn a child process to find out if the

[PATCH 05/10] submodule: store OIDs in changed_submodule_names

2018-10-25 Thread Stefan Beller
'calculate_changed_submodule_paths' uses a local list to compute the changed submodules, and then produces the result by copying appropriate items into the result list. Instead use the result list directly and prune items afterwards using string_list_remove_empty_items. By doing so we'll have

[PATCH 06/10] repository: repo_submodule_init to take a submodule struct

2018-10-25 Thread Stefan Beller
When constructing a struct repository for a submodule for some revision of the superproject where the submodule is not contained in the index, it may not be present in the working tree currently either. In that situation giving a 'path' argument is not useful. Upgrade the repo_submodule_init

[PATCH 03/10] submodule.c: sort changed_submodule_names before searching it

2018-10-25 Thread Stefan Beller
We can string_list_insert() to maintain sorted-ness of the list as we find new items, or we can string_list_append() to build an unsorted list and sort it at the end just once. As we do not rely on the sortedness while building the list, we pick the "append and sort at the end" as it has better

[PATCH 04/10] submodule.c: tighten scope of changed_submodule_names struct

2018-10-25 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

[PATCH 02/10] submodule.c: fix indentation

2018-10-25 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

[PATCH 00/10] Resending sb/submodule-recursive-fetch-gets-the-tip

2018-10-25 Thread Stefan Beller
Thanks Jonathan for your thoughtful comments, here is the product of the discussion: * I split up the patch to fetch in the worktree to be 2 patches, each giving motivation on its own. * the last patch is vastly simplified in code, but takes an extra test * in [1], you remark "commits" ought not

[PATCH 01/10] sha1-array: provide oid_array_filter

2018-10-25 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(+)

Re: [PATCH] revision.c: drop missing objects from cmdline

2018-10-25 Thread Matthew DeVore
On Tue, Oct 23, 2018 at 9:54 PM Junio C Hamano wrote: > > Matthew DeVore writes: > > > No code which reads cmdline in struct rev_info can handle NULL objects > > in cmdline.rev[i].item, so stop adding them to the cmdline.rev array. > > "The code is not prepared to have cmdline.rev[].item that is

Re: [PATCH] upload-pack: fix broken if/else chain in config callback

2018-10-25 Thread Josh Steadmon
On 2018.10.24 10:50, Johannes Schindelin wrote: > Maybe a lot of explanation, but definitely a good one. The explanation and > the patch look good to me. > > Thanks, > Dscho Agreed, as a newbie I definitely appreciate detailed explanations. Looks good to me as well. Reviewed-by: Josh Steadmon

git filter-branch --filter-renames ?

2018-10-25 Thread Jason Cooper
All, I recently needed to extract the git history of a portion of an existing repository. My initial attempts using --subdirectory-filter, subtrees, etc weren't as successful as I'd hoped. The primary reason for my failures were due to the fact that this particular source repository has seen a

Re: [PATCH 8/9] fetch: retry fetching submodules if needed objects were not fetched

2018-10-25 Thread Stefan Beller
On Tue, Oct 23, 2018 at 4:38 PM Jonathan Tan wrote: > > > > Another thing you need to clarify is what happens if the fetch-by-commit > > > fails. Right now, it seems that it will make the whole thing fail, which > > > might be a surprising change in behavior. > > > > But a positive surprise, I

Re: [PATCH] i18n: make GETTEXT_POISON a runtime option

2018-10-25 Thread Jeff King
On Thu, Oct 25, 2018 at 02:24:41AM +0100, Ramsay Jones wrote: > >> Yeah, my thinko. The latter would be closer to what this patch > >> wants to have, but obviously the former would be more flexible and > >> useful in wider context. Both have the "Huh?" factor---what they > >> are doing has

Re: 'ds/test-multi-pack-index' vs. 'ab/commit-graph-progress'

2018-10-25 Thread Ævar Arnfjörð Bjarmason
On Thu, Oct 25 2018, SZEDER Gábor wrote: > when branch 'ds/test-multi-pack-index' is merged with > 'ab/commit-graph-progress', IOW 'master', 'next', or 'pu', > 'GIT_TEST_MULTI_PACK_INDEX=1 ./t6500-gc.sh' fails with: > > expecting success: > git -c gc.writeCommitGraph=true gc

Re: [PATCH v5] archive: initialize archivers earlier

2018-10-25 Thread Jeff King
On Thu, Oct 25, 2018 at 01:32:14PM -0700, stead...@google.com wrote: > Initialize archivers as soon as possible when running git-archive. > Various non-obvious behavior depends on having the archivers > initialized, such as determining the desired archival format from the > provided filename. >

Re: [PATCH v3 3/3] commit-slab: missing definitions and forward declarations (hdr-check)

2018-10-25 Thread Ramsay Jones
On 25/10/2018 19:54, Ramsay Jones wrote: > > > On 25/10/2018 12:04, Carlo Marcelo Arenas Belón wrote: >> struct commmit needs to be defined before commit-slab can generate >> working code, object_id should be at least known through a forward >> declaration >> >> Signed-off-by: Carlo Marcelo

Re: [PATCH sg/test-rebase-editor-fix] t3404-rebase-interactive: test abbreviated commands

2018-10-25 Thread Johannes Sixt
Am 25.10.18 um 22:54 schrieb Johannes Sixt: Test each short command at least once. The commands changed here are chosen such that - tests do not have a prerequisite, - the 'git rebase' command is not guarded by test_must_fail. The pick commands are optional noise words in the FAKE_LINES

[PATCH sg/test-rebase-editor-fix] t3404-rebase-interactive: test abbreviated commands

2018-10-25 Thread Johannes Sixt
Test each short command at least once. The commands changed here are chosen such that - tests do not have a prerequisite, - the 'git rebase' command is not guarded by test_must_fail. The pick commands are optional noise words in the FAKE_LINES variable. Test them, too. Signed-off-by: Johannes

[PATCH 3/2] rebase -i: recognize short commands without arguments

2018-10-25 Thread Johannes Sixt
The sequencer instruction 'b', short for 'break', is rejected: error: invalid line 2: b The reason is that the parser expects all short commands to have an argument. Permit short commands without arguments. Signed-off-by: Johannes Sixt --- I'll send a another patch in a moment that tests

[PATCH v5] archive: initialize archivers earlier

2018-10-25 Thread steadmon
Initialize archivers as soon as possible when running git-archive. Various non-obvious behavior depends on having the archivers initialized, such as determining the desired archival format from the provided filename. Since 08716b3c11 ("archive: refactor file extension format-guessing",

Re: [PATCH v3] archive: initialize archivers earlier

2018-10-25 Thread Josh Steadmon
On 2018.10.23 13:09, Junio C Hamano wrote: > stead...@google.com writes: > > > diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh > > index 2a97b27b0a..cfd5ca492f 100755 > > --- a/t/t5000-tar-tree.sh > > +++ b/t/t5000-tar-tree.sh > > @@ -39,6 +39,8 @@ test_lazy_prereq TAR_NEEDS_PAX_FALLBACK '

Re: [PATCH v5] branch: introduce --show-current display option

2018-10-25 Thread Eric Sunshine
On Thu, Oct 25, 2018 at 3:04 PM Daniels Umanovskis wrote: > When called with --show-current, git branch will print the current > branch name and terminate. Only the actual name gets printed, > without refs/heads. In detached HEAD state, nothing is output. > > Signed-off-by: Daniels Umanovskis >

Re: New semantic patches vs. in-flight topics [was: Re: [PATCH 00/19] Bring more repository handles into our code base]

2018-10-25 Thread Stefan Beller
On Wed, Oct 24, 2018 at 6:59 PM SZEDER Gábor wrote: > > On Mon, Oct 22, 2018 at 11:54:06AM -0700, Stefan Beller wrote: > > > For the sake of a good history, I would think running 'make coccicheck' > > and applying the resulting patches would be best as part of the (dirty) > > merge of any topic

[PATCH v3 1/3] [Outreachy] t3903-stash: test without configured user name

2018-10-25 Thread Slavica Djukic
From: Slavica This is part of enhancement request that ask for 'git stash' to work even if 'user.name' and 'user.email' are not configured. Due to an implementation detail, git-stash undesirably requires 'user.name' and 'user.email' to be set, but shouldn't. The issue is discussed here:

[PATCH v3 1/3] [Outreachy] t3903-stash: test without configured user name

2018-10-25 Thread Slavica Djukic
Changes since v1: *changed: test_must_fail git config user.email to: test_unconfig user.email && test_unconfig user.name This is done to make sure that user.email and user.name are not set, instead of asserting it with

Re: [PATCH] worktree: populate lock_reason in get_worktrees and light refactor/cleanup in worktree files

2018-10-25 Thread Eric Sunshine
On Thu, Oct 25, 2018 at 1:47 AM Nickolai Belakovski wrote: > The motivation for the change is some work that I'm doing to add a > worktree atom in ref-filter.c. I wanted that atom to be able to access > all fields of the worktree struct and noticed that lock_reason wasn't > getting populated so I

[PATCH v5] branch: introduce --show-current display option

2018-10-25 Thread Daniels Umanovskis
When called with --show-current, git branch will print the current branch name and terminate. Only the actual name gets printed, without refs/heads. In detached HEAD state, nothing is output. Intended both for scripting and interactive/informative use. Unlike git branch --list, no filtering is

Re: [PATCH] http: give curl version warnings consistently

2018-10-25 Thread Johannes Schindelin
Hi Junio, On Thu, 25 Oct 2018, Junio C Hamano wrote: > When a requested feature cannot be activated because the version of > cURL library used to build Git with is too old, most of the codepaths > give a warning like "$Feature is not supported with cURL < $Version", > marked for l10n. A few of

Re: [PATCH v3 2/3] shallow: offer to prune only non-existing entries

2018-10-25 Thread Jonathan Tan
> On Wed, 24 Oct 2018, Johannes Schindelin wrote: > > > On Wed, 24 Oct 2018, Junio C Hamano wrote: > > > > > Jonathan, do you see any issues with the use of lookup_commit() in > > > this change wrt lazy clone? I am wondering what happens when the > > > commit in question is at, an immediate

Re: [PATCH v3 3/3] commit-slab: missing definitions and forward declarations (hdr-check)

2018-10-25 Thread Ramsay Jones
On 25/10/2018 12:04, Carlo Marcelo Arenas Belón wrote: > struct commmit needs to be defined before commit-slab can generate > working code, object_id should be at least known through a forward > declaration > > Signed-off-by: Carlo Marcelo Arenas Belón > --- > commit-slab-impl.h | 2 ++ >

[PATCH v2 3/3] http: when using Secure Channel, ignore sslCAInfo by default

2018-10-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin As of cURL v7.60.0, the Secure Channel backend can use the certificate bundle provided via `http.sslCAInfo`, but that would override the Windows Certificate Store. Since this is not desirable by default, let's tell Git to not ask cURL to use that bundle by default when

[PATCH v2 2/3] http: add support for disabling SSL revocation checks in cURL

2018-10-25 Thread Brendan Forster via GitGitGadget
From: Brendan Forster This adds support for a new http.schannelCheckRevoke config value. This config value is only used if http.sslBackend is set to "schannel", which forces cURL to use the Windows Certificate Store when validating server certificates associated with a remote server. This

[PATCH v2 1/3] http: add support for selecting SSL backends at runtime

2018-10-25 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin As of version 7.56.0, curl supports being compiled with multiple SSL backends. This patch adds the Git side of that feature: by setting http.sslBackend to "openssl" or "schannel", Git for Windows can now choose the SSL backend at runtime. This comes in handy on

[PATCH v2 0/3] Allow choosing the SSL backend cURL uses (plus related patches)

2018-10-25 Thread Johannes Schindelin via GitGitGadget
This topic branch brings support for choosing cURL's SSL backend (a feature developed in Git for Windows' context) at runtime via http.sslBackend, and two more patches that are related (and only of interest for Windows users). Changes since v1: * Reworded the commit message of v1's patch 2/3,

Re: [PATCH 2/3] http: add support for disabling SSL revocation checks in cURL

2018-10-25 Thread Johannes Schindelin
Hi Junio, On Thu, 18 Oct 2018, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> In any case, you can use "http..$variable" to say "I want the > >> http.$variable to be in effect but only when I am talking to ". > >> Does it make sense for this new variable, too? That is, does it >

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

2018-10-25 Thread Stefan Beller
> In this series I am addressing the comments by Stefan Beller about the > tests in patch 9. > > If the new tests look OK, I'd say we try moving the series to "next" and > see what happens? Sounds good to me. Thanks, Stefan

[RFC PATCH] index-pack: improve performance on NFS

2018-10-25 Thread Jansen, Geert
The index-pack command determines if a sha1 collision test is needed by checking the existence of a loose object with the given hash. In my tests, I can improve performance of “git clone” on Amazon EFS by 8x when used with a non-default mount option (lookupcache=pos) that's required for a Gitlab

Re: [PATCH] fetch-pack: be more precise in parsing v2 response

2018-10-25 Thread Stefan Beller
On Thu, Oct 25, 2018 at 2:04 AM Junio C Hamano wrote: > > Junio C Hamano writes: > > > Jonathan Tan writes: > > > >> +GIT_TRACE_PACKET="$(pwd)/log" test_must_fail git -C http_child \ > >> +-c protocol.version=2 \ > >> +fetch "$HTTPD_URL/one_time_sed/http_parent" 2>

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

2018-10-25 Thread Stefan Beller
On Thu, Oct 25, 2018 at 11:03 AM Michael Forney wrote: > > On 2018-03-16, Michael Forney wrote: > > Hi, > > > > In the past few months have noticed some confusing behavior with > > ignored submodules. I finally got around to bisecting this to commit > > 5556808690ea245708fb80383be5c1afee2fb3eb

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

2018-10-25 Thread Michael Forney
On 2018-03-16, Michael Forney wrote: > Hi, > > In the past few months have noticed some confusing behavior with > ignored submodules. I finally got around to bisecting this to commit > 5556808690ea245708fb80383be5c1afee2fb3eb (add, reset: ensure > submodules can be added or reset). > > Here is a

[PATCH] travis-ci: no longer use containers

2018-10-25 Thread Sebastian Staudt
Travis CI will soon deprecate the container-based infrastructure enabled by `sudo: false` in ce59dffb34190e780be2fa9f449f842cadee9753. More info: https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures Signed-off-by: Sebastian Staudt --- .travis.yml | 2 -- 1 file changed, 2

Re: [PATCH v4 2/3] reset: add new reset.quiet config setting

2018-10-25 Thread Ramsay Jones
On 25/10/2018 10:26, Junio C Hamano wrote: > Junio C Hamano writes: > >> To be honest, I find the second sentence in your rewrite even more >> confusing. It reads as if `reset.quiet` configuration variable >> can be used to restore the "show what is yet to be added" >> behaviour, due to the

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[PATCH v1 1/2] path.c: char is not (always) signed

2018-10-25 Thread tboegi
From: Torsten Bögershausen If a "char" in C is signed or unsigned is not specified, because it is out of tradition "implementation dependent". Therefore constructs like "if (name[i] < 0)" are not portable, use "if (name[i] & 0x80)" instead. Detected by "gcc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0

[PATCH v1 2/2] curl_off_t xcurl_off_t is not portable

2018-10-25 Thread tboegi
From: Torsten Bögershausen Comparing signed and unsigned values is not always portable. When setting DEVELOPER = 1 DEVOPTS = extra-all "gcc (Raspbian 6.3.0-18+rpi1+deb9u1) 6.3.0 20170516" errors out with "comparison is always false due to limited range of data type" "[-Werror=type-limits]"

Git Gui on OSX Mojave Dark Flashes on Repaints

2018-10-25 Thread Matthew Orres
On the newest version of Git available via Homebrew (2.19.1), when the gui tool needs to repaint the screen (refresh a file, change a focused file, stage files) the window that is repainted flashes a dark gray before returning to white. This was not occurring on High Sierra yesterday, but has

Bug: git log changes output depending on how the output is used

2018-10-25 Thread buckmartin
I noticed that the piped output still prints the (HEAD -> ) : git log --pretty=format:"%d*%B" --decorate-refs='refs/tags/*' *bar (tag: "123")*foo git log --pretty=format:"%d*%B" --decorate-refs='refs/tags/*' > tmp.tmp (HEAD -> branch)*bar (tag: "123")*foo I would expect the output

Re: the opposite of .gitignore, whitelist

2018-10-25 Thread Jason Cooper
Hi all, On 10/25/18 1:37 AM, Junio C Hamano wrote: > "lhf...@163.com" writes: > >> I have a good idea, add a file to git that is the opposite of .gitignore..., > Do negative patterns in .gitignore file help without inventing > anything new? I did this several years ago in an attempt to track

[PATCH] Move upstream status from gitstring to f

2018-10-25 Thread Khinshan Khan
Upstream status should be spaced even if other statuses don't exist for consistency of view. Eg: if a repository is freshly cloned, the prompt shows "(master=)" but with an additional status like a change, it'll show "(master *=)". Now it'll show "(master =)" and accounts for other states as well.

Re: [PATCH v4 2/3] reset: add new reset.quiet config setting

2018-10-25 Thread Ben Peart
On 10/25/2018 5:26 AM, Junio C Hamano wrote: Junio C Hamano writes: To be honest, I find the second sentence in your rewrite even more confusing. It reads as if `reset.quiet` configuration variable can be used to restore the "show what is yet to be added" behaviour, due to the

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

2018-10-25 Thread Antonio Ospite
On Thu, 25 Oct 2018 17:40:47 +0900 Junio C Hamano wrote: > Antonio Ospite writes: > > > this series teaches git to try and read the .gitmodules file from the > > index (:.gitmodules) or from the current branch (HEAD:.gitmodules) when > > the file is not readily available in the working tree. >

Re: [PATCH v3 7/7] revision.c: refactor basic topo-order logic

2018-10-25 Thread Derrick Stolee
On 10/25/2018 5:43 AM, Jeff King wrote: On Thu, Oct 11, 2018 at 12:21:44PM -0400, Derrick Stolee wrote: 2. INDEGREE: using the indegree_queue priority queue (ordered by maximizing the generation number), add one to the in- degree of each parent for each commit that is walked. Since

[PATCH] packfile: close multi-pack-index in close_all_packs

2018-10-25 Thread Derrick Stolee
Whenever we delete pack-files from the object directory, we need to also delete the multi-pack-index that may refer to those objects. Sometimes, this connection is obvious, like during a repack. Other times, this is less obvious, like when gc calls a repack command and then does other actions on

Re: [PATCH 2/3] http: add support for disabling SSL revocation checks in cURL

2018-10-25 Thread Johannes Schindelin
Hi Junio, On Thu, 25 Oct 2018, Junio C Hamano wrote: > Eric Sunshine writes: > > > On Mon, Oct 15, 2018 at 6:14 AM Brendan Forster via GitGitGadget > > wrote: > >> This config value is only used if http.sslBackend is set to "schannel", > >> which forces cURL to use the Windows Certificate

Re: [PATCH v3 2/3] khash: silence -Wunused-function in delta-islands from khash

2018-10-25 Thread SZEDER Gábor
On Thu, Oct 25, 2018 at 04:04:26AM -0700, Carlo Marcelo Arenas Belón wrote: > showing the following when compiled with latest clang (OpenBSD, Fedora > and macOS): s/^s/S/ This applies to your other commit messages as well. But more importantly, please be explicit about the compiler version that

'ds/test-multi-pack-index' vs. 'ab/commit-graph-progress'

2018-10-25 Thread SZEDER Gábor
Hi, when branch 'ds/test-multi-pack-index' is merged with 'ab/commit-graph-progress', IOW 'master', 'next', or 'pu', 'GIT_TEST_MULTI_PACK_INDEX=1 ./t6500-gc.sh' fails with: expecting success: git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr &&

[PATCH v3 3/3] commit-slab: missing definitions and forward declarations (hdr-check)

2018-10-25 Thread Carlo Marcelo Arenas Belón
struct commmit needs to be defined before commit-slab can generate working code, object_id should be at least known through a forward declaration Signed-off-by: Carlo Marcelo Arenas Belón --- commit-slab-impl.h | 2 ++ commit-slab.h | 2 ++ 2 files changed, 4 insertions(+) diff --git

[PATCH v3 1/3] commit-slab: move MAYBE_UNUSED into git-compat-util

2018-10-25 Thread Carlo Marcelo Arenas Belón
after 36da893114 ("config.mak.dev: enable -Wunused-function", 2018-10-18) it is expected to be used to prevent -Wunused-function warnings for code that was macro generated Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- commit-slab-impl.h | 4 +--- git-compat-util.h

[PATCH v3 0/3] delta-islands: avoid unused function messages

2018-10-25 Thread Carlo Marcelo Arenas Belón
the macro generated code from delta-islands (using khash) triggers some unused function warnings in macOS, OpenBSD and some linux with a newer version of clang because of its use of static functions. Changes from v2: * Relay in the C code including git-compat-util as suggested by Jeff * Commit

[PATCH v3 2/3] khash: silence -Wunused-function in delta-islands from khash

2018-10-25 Thread Carlo Marcelo Arenas Belón
showing the following when compiled with latest clang (OpenBSD, Fedora and macOS): delta-islands.c:23:1: warning: unused function 'kh_destroy_str' [-Wunused-function] delta-islands.c:23:1: warning: unused function 'kh_clear_str' [-Wunused-function] delta-islands.c:23:1: warning:

Re: [PATCH] Clear --exclude list after 'git rev-parse --all'

2018-10-25 Thread Jeff King
On Wed, Oct 24, 2018 at 11:49:06AM +0200, Andreas Gruenbacher wrote: > > That is why I asked what "problem" this patch fixes. Without > > answering that question, it is unclear if the patch is completing > > missing coverage for "--all", or it is cargo culting an useless > > clearing done for

Re: git pull defaults for recursesubmodules

2018-10-25 Thread Junio C Hamano
Tommi Vainikainen writes: > After reading SubmittingPatches I didn't find if I should now send a > fresh patch with > changes squashed together or new commits appended after first commit in that > patch. Patch is updated accordingly as fresh patch. (just on mechanics, not on the contents of

Re: [PATCH v3] send-email: explicitly disable authentication

2018-10-25 Thread Junio C Hamano
Joshua Watt writes: > It can be necessary to disable SMTP authentication by a mechanism other > than sendemail.smtpuser being undefined. For example, if the user has > sendemail.smtpuser set globally but wants to disable authentication > locally in one repository. > > --smtp-auth and

Re: [PATCH v3 7/7] revision.c: refactor basic topo-order logic

2018-10-25 Thread Jeff King
On Thu, Oct 11, 2018 at 12:21:44PM -0400, Derrick Stolee wrote: > > > 2. INDEGREE: using the indegree_queue priority queue (ordered > > > by maximizing the generation number), add one to the in- > > > degree of each parent for each commit that is walked. Since > > > we walk in order

[PATCH v2] sequencer: cleanup for gcc warning in non developer mode

2018-10-25 Thread Carlo Marcelo Arenas Belón
as shown by: sequencer.c: In function ‘write_basic_state’: sequencer.c:2392:37: warning: zero-length gnu_printf format string [-Wformat-zero-length] write_file(rebase_path_verbose(), ""); where write_file will create an empty file if told to write an empty string as can be inferred by

Re: [PATCH 2/3] mingw: replace MSVCRT's fstat() with a Win32-based implementation

2018-10-25 Thread Junio C Hamano
"brian m. carlson" writes: > Yeah, that behavior is quite old. I'm surprised that Linux ever did > that. > ... > I don't feel strongly either way. I feel confident the rest of Git > doesn't use that field, so I don't see any downsides to keeping it other > than the slight overhead of

Re: [PATCH v4 2/3] reset: add new reset.quiet config setting

2018-10-25 Thread Junio C Hamano
Junio C Hamano writes: > To be honest, I find the second sentence in your rewrite even more > confusing. It reads as if `reset.quiet` configuration variable > can be used to restore the "show what is yet to be added" > behaviour, due to the parenthetical mention of the default behaviour >

Re: [PATCH v4 2/2] worktree: add per-worktree config files

2018-10-25 Thread Junio C Hamano
Duy Nguyen writes: >> > +extensions.worktreeConfig:: >> > + If set, by default "git config" reads from both "config" and >> > + "config.worktree" file from GIT_DIR in that order. In >> > + multiple working directory mode, "config" file is shared while >> > + "config.worktree" is

Re: [PATCH] sequencer: cleanup for gcc 8.2.1 warning

2018-10-25 Thread Carlo Arenas
On Thu, Oct 25, 2018 at 1:08 AM Junio C Hamano wrote: > For a single-use, not using the macro and just using "%s", "" should > suffice. OK, will send it as v2 then but would think it will be better if applied as a "fixup" on top of the original branch: 34b47315d9 ("rebase -i: move rebase--helper

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

2018-10-25 Thread SZEDER Gábor
On Tue, Oct 16, 2018 at 04:35:49PM -0700, Stefan Beller wrote: > 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. This patch breaks the test suite with 'GIT_TEST_COMMIT_GRAPH=1', in

Re: [PATCH] fetch-pack: be more precise in parsing v2 response

2018-10-25 Thread Junio C Hamano
Junio C Hamano writes: > Jonathan Tan writes: > >> +GIT_TRACE_PACKET="$(pwd)/log" test_must_fail git -C http_child \ >> +-c protocol.version=2 \ >> +fetch "$HTTPD_URL/one_time_sed/http_parent" 2> err && > > Because test_must_fail is a shell function, the above is not

  1   2   >