[PATCH v2] pack-objects: warn on split packs disabling bitmaps

2016-04-28 Thread Eric Wong
Junio C Hamano wrote: > Eric Wong writes: > > +++ b/Documentation/git-pack-objects.txt > > @@ -110,7 +110,8 @@ base-name:: > > --max-pack-size=:: > > Maximum size of each output pack file. The size can be suffixed with > > "k", "m", or "g". The minimum size allowed is limited to 1 MiB. >

Re: BUG on OSX `git p4 submit` can fail when the workspace root doesn't exist locally.

2016-04-28 Thread Luke Diamand
On 27 April 2016 at 21:53, Stefan Beller wrote: > On Wed, Apr 27, 2016 at 11:06 AM, Jacob Smith wrote: >> I debugged the issue using the script here: >> https://github.com/git/git/blob/master/git-p4.py >> I'm not sure how close to the main repo that is. >> >> On Wed, Apr 27, 2016 at 11:28 AM,

Re: What's cooking in git.git (Apr 2016, #07; Mon, 25)

2016-04-28 Thread Johannes Schindelin
Hi Junio, On Wed, 27 Apr 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Hi Junio, > > > > On Mon, 25 Apr 2016, Junio C Hamano wrote: > > > >> * js/win32-mmap (2016-04-22) 3 commits > >> (merged to 'next' on 2016-04-22 at cd39c60) > >> + mmap(win32): avoid expensive fstat() c

Re: [PATCH] pack-objects: warn on split packs disabling bitmaps

2016-04-28 Thread Eric Wong
Jeff King wrote: > On Wed, Apr 27, 2016 at 09:53:24PM +, Eric Wong wrote: > > > It can be tempting for a server admin to want a stable set of > > long-lived packs for dumb clients; but also want to enable > > bitmaps to serve smart clients more quickly. > But I did want to mention one thing,

Re: [PATCH 2/3] mmap(win32): avoid copy-on-write when it is unnecessary

2016-04-28 Thread Johannes Schindelin
Hi Hannes, On Wed, 27 Apr 2016, Johannes Sixt wrote: > Am 27.04.2016 um 08:43 schrieb Johannes Schindelin: > > On Tue, 26 Apr 2016, Johannes Sixt wrote: > > > Should we insert a check for MAP_PRIVATE to catch > > > unexpected use-cases (think of the index-helper daemon effort)? > > > > I agree, w

[PATCH] pull: make --rebase --verify-signatures illegal

2016-04-28 Thread Alexander 'z33ky' Hirsch
Previously git-pull would silently ignore the --verify-signatures option. Signed-off-by: Alexander 'z33ky' Hirsch <1ze...@gmail.com> --- We had some discussion back in December about a patch that added --verify-signatures to git-pull, that was declined. I proposed making git-pull --rebase --verif

[PATCH] Fix memory leak in git_connect with CONNECT_DIAG_URL

2016-04-28 Thread Mike Hommey
Signed-off-by: Mike Hommey --- connect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/connect.c b/connect.c index c53f3f1..dccf673 100644 --- a/connect.c +++ b/connect.c @@ -755,6 +755,7 @@ struct child_process *git_connect(int fd[2], const char *url, free(

[PATCH v5 1/2] http: support sending custom HTTP headers

2016-04-28 Thread Johannes Schindelin
We introduce a way to send custom HTTP headers with all requests. This allows us, for example, to send an extra token from build agents for temporary access to private repositories. (This is the use case that triggered this patch.) This feature can be used like this: git -c http.extrahea

[PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Johannes Schindelin
To support this developer's use case of allowing build agents token-based access to private repositories, we introduced the http.extraheader feature, allowing extra HTTP headers to be sent along with every HTTP request. This patch allows us to configure these extra HTTP headers for use with `git s

[PATCH v5 0/2] Add support for sending additional HTTP headers

2016-04-28 Thread Johannes Schindelin
My use case is an army of build agents that need only limited and selective access to otherwise private repositories. I apologize for sending out v5 after v4 was already acknowledged: my initial testing was on simple repositories and I forgot that my build agents need to handle submodules, too. S

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-28 Thread Lars Schneider
> On 25 Apr 2016, at 23:24, Jeff King wrote: > > On Mon, Apr 25, 2016 at 01:59:03PM -0700, Jacob Keller wrote: > However, I noticed that git config command line instructions such as "-c filter.lfs.smudge=" are not passed to Git submodule operations. Thus this does not work as exp

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 01:06:45PM +0200, Lars Schneider wrote: > I got my Git-LFS use case working with the patch below. > For me it was necessary to export GIT_CONFIG_PARAMETERS > to make it available to the Git process if the process is > invoked as follows [2]: > > (sanitize_submodule_env;

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 12:03:47PM +0200, Johannes Schindelin wrote: > diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c > index 3bd6883..b338f93 100644 > --- a/builtin/submodule--helper.c > +++ b/builtin/submodule--helper.c > @@ -127,7 +127,9 @@ static int module_name(int arg

[PATCHv4 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-04-28 Thread Elia Pinto
Implement the GIT_TRACE_CURL environment variable to allow a greater degree of detail of GIT_CURL_VERBOSE, in particular the complete transport header and all the data payload exchanged. It might be useful if a particular situation could require a more thorough debugging analysis. Document the new

[PATCHv4 0/2] Implement the GIT_TRACE_CURL environment variable

2016-04-28 Thread Elia Pinto
This is the fourth version but in reality is the complete rewriting of the patches discussed here (here called V1) $gmane/290520 $gmane/290521 *Changes from V3 ($gmane/292040) - add missing static to curl_dump - reorder the patch order - tried to fix all (but i am not sure) the problems reporte

[PATCHv4 2/2] imap-send.c: introduce the GIT_TRACE_CURL enviroment variable

2016-04-28 Thread Elia Pinto
Permit the use of the GIT_TRACE_CURL environment variable calling the curl_trace and curl_dump http.c helper routine. Helped-by: Torsten Bögershausen Helped-by: Ramsay Jones Helped-by: Junio C Hamano Helped-by: Eric Sunshine Helped-by: Jeff King Signed-off-by: Elia Pinto --- imap-send.c | 6

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 07:25:11AM -0400, Jeff King wrote: > > diff --git a/git-submodule.sh b/git-submodule.sh > > index 2a84d7e..b02f5b9 100755 > > --- a/git-submodule.sh > > +++ b/git-submodule.sh > > @@ -199,7 +199,7 @@ sanitize_submodule_env() > > { > > sanitized_config=$(git submodule--

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-28 Thread Lars Schneider
> On 28 Apr 2016, at 13:25, Jeff King wrote: > > On Thu, Apr 28, 2016 at 01:06:45PM +0200, Lars Schneider wrote: > >> I got my Git-LFS use case working with the patch below. >> For me it was necessary to export GIT_CONFIG_PARAMETERS >> to make it available to the Git process if the process is

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 08:05:04AM -0400, Jeff King wrote: > So AFAICT 14111fc49 is totally broken. It doesn't actually work for > git-submodule (because of the missing export), nor for git-fetch > (because that skips the shell script), and the one case we are testing > already worked without it (

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Johannes Schindelin
Hi Peff, Cc:ing Jacob, the author of the CONFIG_DATA_ENVIRONMENT sanitizing code. On Thu, 28 Apr 2016, Jeff King wrote: > On Thu, Apr 28, 2016 at 12:03:47PM +0200, Johannes Schindelin wrote: > > > diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c > > index 3bd6883..b338f93

Re: [PATCH v3 0/2] gitk: changes for the "Tags and heads" view

2016-04-28 Thread Mike Rappazzo
On Sun, Mar 27, 2016 at 11:06 AM, Michael Rappazzo wrote: > Changes since v2[1]: > - Instead of getting the remote info for each local branch individually, >grab it all at once and store the result > - Instead of a command line option to enable the new sorting option, >enable it with a p

[PATCH v2] pull: make --rebase --verify-signatures illegal

2016-04-28 Thread Alexander 'z33ky' Hirsch
Previously git-pull would silently ignore the --verify-signatures option. Signed-off-by: Alexander 'z33ky' Hirsch <1ze...@gmail.com> --- I made the error-message conform to the CodingGuidelines (removed capitalization and full stop). Also, in the previous mail I said that I proposed a patch for

[PATCH 0/5] fixes for sanitized submodule config

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 08:17:53AM -0400, Jeff King wrote: > So that case _is_ correct right now. It's just that t5550 isn't testing > the shell script part, which is broken. Probably running "git submodule > update" in the resulting clone would cover that. > > And for the fetch case, we probably

[PATCH 1/5] t5550: fix typo in $HTTPD_URL

2016-04-28 Thread Jeff King
Commit 14111fc (git: submodule honor -c credential.* from command line, 2016-02-29) accidentally wrote $HTTP_URL. It happened to work because we ended up with "credential..helper", which we treat the same as "credential.helper", applying it to all URLs. Signed-off-by: Jeff King --- t/t5550-http-

[PATCH 2/5] t5550: break submodule config test into multiple sub-tests

2016-04-28 Thread Jeff King
Right now we test only the cloning case, but there are other interesting cases (e.g., fetching). Let's pull the setup bits into their own test, which will make things flow more logically once we start adding more tests which use the setup. Let's also introduce some whitespace to the clone-test to

[PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS

2016-04-28 Thread Jeff King
Commit 14111fc (git: submodule honor -c credential.* from command line, 2016-02-29) taught git-submodule.sh to save the sanitized value of $GIT_CONFIG_PARAMETERS when clearing the environment for a submodule. However, it failed to export the result, meaning that it had no effect for any sub-program

[PATCH 4/5] submodule--helper: move config-sanitizing to submodule.c

2016-04-28 Thread Jeff King
These functions should be used by any code which spawns a submodule process, which may happen in submodule.c (e.g., for spawning fetch). Let's move them there and make them public so that submodule--helper can continue to use them. Sine they're now public, let's also provide a basic overview of th

[PATCH 5/5] submodule: use prepare_submodule_repo_env consistently

2016-04-28 Thread Jeff King
Before 14111fc (git: submodule honor -c credential.* from command line, 2016-02-29), it was sufficient for code which spawned a process in a submodule to just set the child process's "env" field to "local_repo_env" to clear the environment of any repo-specific variables. That commit introduced a m

Re: [RFC] How to pass Git config command line instructions to Submodule commands?

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 02:05:20PM +0200, Lars Schneider wrote: > I am no expert in the Submodule code but I think the cloning of > the submodules is not yet guarded with sanitize_submodule_env [3]. > That means the submodule is cloned with the GIT_CONFIG_PARAMETERS > of the super project. That mi

feature request for cc-cmd

2016-04-28 Thread Michal Hocko
Hi, currently I am using --cc-cmd for larger patch series which are of interest of different parties (e.g. kernel tree wide stuff) and I do not want to spam all of them by patches which are not of their interest but I still want them to receive the cover letter because that is useful to get a conte

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 02:19:37PM +0200, Johannes Schindelin wrote: > > Should we consider just white-listing all of "http.*"? > > > > That would help other cases which have come up, like: > > > > http://thread.gmane.org/gmane.comp.version-control.git/264840 > > > > which wants to turn off h

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 02:19:37PM +0200, Johannes Schindelin wrote: > > Should we consider just white-listing all of "http.*"? > > > > That would help other cases which have come up, like: > > > > http://thread.gmane.org/gmane.comp.version-control.git/264840 > > > > which wants to turn off h

Re: [PATCH 0/5] fixes for sanitized submodule config

2016-04-28 Thread Johannes Schindelin
Hi Peff, On Thu, 28 Apr 2016, Jeff King wrote: > On Thu, Apr 28, 2016 at 08:17:53AM -0400, Jeff King wrote: > > > So that case _is_ correct right now. It's just that t5550 isn't testing > > the shell script part, which is broken. Probably running "git submodule > > update" in the resulting clone

[PATCH 2/4] git_connect: avoid quoting the path on the command line when it's not necessary

2016-04-28 Thread Mike Hommey
Some remote systems can employ restricted shells that aren't very smart with quotes, so avoid quoting when it's not strictly necessary. The list of "safe" characters comes from Mercurial's shell quoting function used for its ssh client side. There likely are more that could be added to the list.

[PATCH 3/4] git_connect: allow a file descriptor to be allocated for stderr

2016-04-28 Thread Mike Hommey
It can be useful to the caller of git_connect() to get access to stderr, so add a flag that makes start_command allocate a file descriptor for it. Signed-off-by: Mike Hommey --- connect.c | 2 ++ connect.h | 1 + 2 files changed, 3 insertions(+) diff --git a/connect.c b/connect.c index 919bf9e.

[PATCH 1/4] git_connect: extend to take a pseudo format string for the program to run

2016-04-28 Thread Mike Hommey
Currently, the path extracted from the url is passed as last argument to the program/command passed to git_connect(). In every case the function is used in the git code base, it's enough, but in order to allow the reuse of e.g. the GIT_SSH/GIT_SSH_COMMAND logic, additional flexibility is welcome.

[PATCH 4/4] git_connect: add a flag to consider the path part of ssh urls relative

2016-04-28 Thread Mike Hommey
In Mercurial ssh urls, the path part of the url is relative to the home directory of the account being logged to instead of being absolute. Add a flag allowing git_connect() to handle this kind of usecase. Signed-off-by: Mike Hommey --- connect.c | 10 +++--- connect.h | 1 + 2 files chang

[RFC PATCH 0/4] git_connect: add some flexibility

2016-04-28 Thread Mike Hommey
As you may be aware, I'm working on a git remote helper to access mercurial repositories (https://github.com/glandium/git-cinnabar/). At the moment, a small part is written in C, relying on the git code base, but eventually, there would be more C. As I want to get rid of the dependency on Mercuri

Re: [PATCHv4 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 11:57:47AM +, Elia Pinto wrote: > +static void curl_dump(const char *text, unsigned char *ptr, size_t size, > char nohex, char nopriv) We usually use "int" for our boolean flags. Space savings don't matter outside of a struct (and if they did, you should be using a si

Re: [PATCHv4 2/2] imap-send.c: introduce the GIT_TRACE_CURL enviroment variable

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 11:57:48AM +, Elia Pinto wrote: > diff --git a/imap-send.c b/imap-send.c > index 938c691..61c6787 100644 > --- a/imap-send.c > +++ b/imap-send.c > @@ -1444,6 +1444,12 @@ static CURL *setup_curl(struct imap_server_conf *srvc) > if (0 < verbosity || getenv("GIT_CURL

Re: [PATCH 2/5] t5550: break submodule config test into multiple sub-tests

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 6:37 AM, Jeff King wrote: > Right now we test only the cloning case, but there are other > interesting cases (e.g., fetching). Let's pull the setup > bits into their own test, which will make things flow more > logically once we start adding more tests which use the > setup

Re: [PATCH 1/5] t5550: fix typo in $HTTPD_URL

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 6:36 AM, Jeff King wrote: > Commit 14111fc (git: submodule honor -c credential.* from > command line, 2016-02-29) accidentally wrote $HTTP_URL. It > happened to work because we ended up with "credential..helper", > which we treat the same as "credential.helper", applying it

Re: [RFC/PATCH] Ordering of remotes for fetch --all

2016-04-28 Thread Guido Martínez
Hi Jeff, thanks for your comments. On Mon, Apr 25, 2016 at 11:37 PM, Jeff King wrote: > On Mon, Apr 25, 2016 at 11:15:05PM +0200, Guido Martínez wrote: > >> I run a server with several git mirrors, that are updated every hour. On >> that same server, users clone those projects and work on them. W

Re: [PATCH 1/5] t5550: fix typo in $HTTPD_URL

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 08:24:05AM -0700, Jacob Keller wrote: > On Thu, Apr 28, 2016 at 6:36 AM, Jeff King wrote: > > Commit 14111fc (git: submodule honor -c credential.* from > > command line, 2016-02-29) accidentally wrote $HTTP_URL. It > > happened to work because we ended up with "credential.

Re: [PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 6:37 AM, Jeff King wrote: > Commit 14111fc (git: submodule honor -c credential.* from > command line, 2016-02-29) taught git-submodule.sh to save > the sanitized value of $GIT_CONFIG_PARAMETERS when clearing > the environment for a submodule. However, it failed to > export

Re: [PATCH 2/5] t5550: break submodule config test into multiple sub-tests

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 08:21:21AM -0700, Stefan Beller wrote: > > -test_expect_success 'cmdline credential config passes into submodules' ' > > +test_expect_success 'set up repo with http submodules' ' > > set up or setup? > > $ grep -r "set up" |wc -l > 69 > $ grep -r "setup" |wc -l > 1162 >

Re: [PATCH 2/5] t5550: break submodule config test into multiple sub-tests

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 8:21 AM, Stefan Beller wrote: > On Thu, Apr 28, 2016 at 6:37 AM, Jeff King wrote: >> Right now we test only the cloning case, but there are other >> interesting cases (e.g., fetching). Let's pull the setup >> bits into their own test, which will make things flow more >> lo

Re: [PATCH 1/5] t5550: fix typo in $HTTPD_URL

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 8:25 AM, Jeff King wrote: > On Thu, Apr 28, 2016 at 08:24:05AM -0700, Jacob Keller wrote: > >> On Thu, Apr 28, 2016 at 6:36 AM, Jeff King wrote: >> > Commit 14111fc (git: submodule honor -c credential.* from >> > command line, 2016-02-29) accidentally wrote $HTTP_URL. It >

Re: [PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 6:37 AM, Jeff King wrote: > Commit 14111fc (git: submodule honor -c credential.* from > command line, 2016-02-29) taught git-submodule.sh to save > the sanitized value of $GIT_CONFIG_PARAMETERS when clearing > the environment for a submodule. However, it failed to > export

Re: [PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 08:25:29AM -0700, Stefan Beller wrote: > > +test_expect_success 'cmdline credential config passes submodule update' ' > > + # advance the submodule HEAD so that a fetch is required > > + git commit --allow-empty -m foo && > > + git push "$HTTPD_DOCUMENT_RO

Re: [PATCH 4/5] submodule--helper: move config-sanitizing to submodule.c

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 6:38 AM, Jeff King wrote: > These functions should be used by any code which spawns a > submodule process, which may happen in submodule.c (e.g., > for spawning fetch). Let's move them there and make them > public so that submodule--helper can continue to use them. > > Sine

Re: [PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 08:28:29AM -0700, Jacob Keller wrote: > > diff --git a/git-submodule.sh b/git-submodule.sh > > index 2a84d7e..3a40d4b 100755 > > --- a/git-submodule.sh > > +++ b/git-submodule.sh > > @@ -200,6 +200,7 @@ sanitize_submodule_env() > > sanitized_config=$(git submodule--

Re: [PATCH 4/5] submodule--helper: move config-sanitizing to submodule.c

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 08:30:45AM -0700, Stefan Beller wrote: > > +/* > > + * This function is intended as a callback for use with > > + * git_config_from_parameters(). It ignores any config options which > > + * are not suitable for passing along to a submodule, and accumulates the > > rest > >

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 6:49 AM, Jeff King wrote: > On Thu, Apr 28, 2016 at 02:19:37PM +0200, Johannes Schindelin wrote: > >> > Should we consider just white-listing all of "http.*"? >> > >> > That would help other cases which have come up, like: >> > >> > http://thread.gmane.org/gmane.comp.vers

Re: [PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 8:28 AM, Jeff King wrote: > On Thu, Apr 28, 2016 at 08:25:29AM -0700, Stefan Beller wrote: > >> > +test_expect_success 'cmdline credential config passes submodule update' ' >> > + # advance the submodule HEAD so that a fetch is required >> > + git commit --allow

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 08:37:10AM -0700, Jacob Keller wrote: > I think I prefer a blacklist approach, since it reduces the need for > future changes, since most cases will either not put config on the > environment or (based on feedback on the mailing list and bug reports) > the user will believe

Re: [PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 8:36 AM, Jeff King wrote: > On Thu, Apr 28, 2016 at 08:28:29AM -0700, Jacob Keller wrote: > >> > diff --git a/git-submodule.sh b/git-submodule.sh >> > index 2a84d7e..3a40d4b 100755 >> > --- a/git-submodule.sh >> > +++ b/git-submodule.sh >> > @@ -200,6 +200,7 @@ sanitize_sub

Re: [PATCH 0/5] fixes for sanitized submodule config

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 7:02 AM, Johannes Schindelin wrote: > Hi Peff, > > On Thu, 28 Apr 2016, Jeff King wrote: > >> On Thu, Apr 28, 2016 at 08:17:53AM -0400, Jeff King wrote: >> >> > So that case _is_ correct right now. It's just that t5550 isn't testing >> > the shell script part, which is brok

Re: [PATCH 0/5] fixes for sanitized submodule config

2016-04-28 Thread Jacob Keller
On Thu, Apr 28, 2016 at 8:56 AM, Stefan Beller wrote: > On Thu, Apr 28, 2016 at 7:02 AM, Johannes Schindelin > wrote: >> Hi Peff, >> >> On Thu, 28 Apr 2016, Jeff King wrote: >> >>> On Thu, Apr 28, 2016 at 08:17:53AM -0400, Jeff King wrote: >>> >>> > So that case _is_ correct right now. It's just

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 8:39 AM, Jeff King wrote: > On Thu, Apr 28, 2016 at 08:37:10AM -0700, Jacob Keller wrote: > >> I think I prefer a blacklist approach, since it reduces the need for >> future changes, since most cases will either not put config on the >> environment or (based on feedback on

Re: [PATCH 2/4] git_connect: avoid quoting the path on the command line when it's not necessary

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 7:12 AM, Mike Hommey wrote: > Some remote systems can employ restricted shells that aren't very smart > with quotes, so avoid quoting when it's not strictly necessary. > > The list of "safe" characters comes from Mercurial's shell quoting > function used for its ssh client

Re: [PATCH 4/5] submodule--helper: move config-sanitizing to submodule.c

2016-04-28 Thread Lars Schneider
> On 28 Apr 2016, at 15:38, Jeff King wrote: > > These functions should be used by any code which spawns a > submodule process, which may happen in submodule.c (e.g., > for spawning fetch). Let's move them there and make them > public so that submodule--helper can continue to use them. > > Sin

Re: [PATCH 49/83] builtin/apply: move 'lock_file' global into 'struct apply_state'

2016-04-28 Thread Christian Couder
On Mon, Apr 25, 2016 at 7:55 PM, Junio C Hamano wrote: > Eric Sunshine writes: > >>> + /* >>> +* Since lockfile.c keeps a linked list of all created >>> +* lock_file structures, it isn't safe to free(lock_file). >>> +*/ >>> + struct lock_file *lock_file; >> >>

Re: Strangeness with git-add and nested repositories

2016-04-28 Thread Stefan Beller
On Wed, Apr 27, 2016 at 11:10 PM, Andrew J wrote: > Hi Stefan, > > On Wed, Apr 27, 2016 at 9:08 AM, Stefan Beller wrote: >> I think (pure speculation), that it the error is in the context >> (repository) switching logic. >> What happens if you alter the order, i.e. give testfile first and then >>

Re: Strangeness with git-add and nested repositories

2016-04-28 Thread Junio C Hamano
Stefan Beller writes: > I think (pure speculation), that it the error is in the context > (repository) switching logic. > What happens if you alter the order, i.e. give testfile first and then > the files in the nested > repos? > > git add -- file path/to/subdir/file > > should do internally

Re: Strangeness with git-add and nested repositories

2016-04-28 Thread Junio C Hamano
Junio C Hamano writes: > * "git add -- path/to/subdir/file", when any of path/, path/to/, >path/to/subdir/ is a Git repository that is different from the >current Git repository, must fail. If any of the leading directories in that long path is actually a git repository that is differen

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 09:09:44AM -0700, Stefan Beller wrote: > > I think the key thing with a blacklist is somebody has to go to the work > > to audit the existing keys. > > Would it be sufficient to wait until someone screams at the mailing list > for some key to be blacklisted? (I mean in the

Re: [PATCH 3/5] submodule: export sanitized GIT_CONFIG_PARAMETERS

2016-04-28 Thread Johannes Schindelin
Hi, On Thu, 28 Apr 2016, Jeff King wrote: > On Thu, Apr 28, 2016 at 08:25:29AM -0700, Stefan Beller wrote: > > > > +test_expect_success 'cmdline credential config passes submodule update' ' > > > + # advance the submodule HEAD so that a fetch is required > > > + git commit --allow-em

Re: Strangeness with git-add and nested repositories

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 9:39 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> I think (pure speculation), that it the error is in the context >> (repository) switching logic. >> What happens if you alter the order, i.e. give testfile first and then >> the files in the nested >> repos? >> >>

Re: [PATCH] Fixed grammar mistake in the french localization

2016-04-28 Thread Ralf Thielow
CC'ed Jean-Noël who maintains French translation. Antonin writes: > "tous le dépôts distants" -> "tous les dépôts distants" > --- > po/fr.po | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/po/fr.po b/po/fr.po > index 88b0b8a7..36c7c99 100644 > --- a/po/fr.po > +++ b/po/

Re: [PATCH] pull: make --rebase --verify-signatures illegal

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 2:52 AM, Alexander 'z33ky' Hirsch <1ze...@gmail.com> wrote: > Previously git-pull would silently ignore the --verify-signatures > option. > > Signed-off-by: Alexander 'z33ky' Hirsch <1ze...@gmail.com> > --- > > We had some discussion back in December about a patch that added

Re: [PATCH v2] pull: make --rebase --verify-signatures illegal

2016-04-28 Thread Junio C Hamano
Alexander 'z33ky' Hirsch <1ze...@gmail.com> writes: > Previously git-pull would silently ignore the --verify-signatures > option. I do not see a point of making it error out. Adding a warning about the option being ignored might be a worthwhile thing to do (e.g. it may solicit responses from tho

Re: [PATCHv4 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 4:57 AM, Elia Pinto wrote: > Implement the GIT_TRACE_CURL environment variable to allow a > greater degree of detail of GIT_CURL_VERBOSE, in particular > the complete transport header and all the data payload exchanged. > It might be useful if a particular situation could r

Re: [PATCHv4 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-04-28 Thread Junio C Hamano
Jeff King writes: >> + for (w = 0; (w < width) && (i + w < size); w++) { >> + if (nohex && (i + w + 1 < size) && ptr[i + w] == '\r' >> +&& ptr[i + w + 1] == '\n') { >> +i += (w + 2 - width); >> +

Re: [RFC PATCH 0/4] git_connect: add some flexibility

2016-04-28 Thread Junio C Hamano
Mike Hommey writes: > As you may be aware, I'm working on a git remote helper to access > mercurial repositories (https://github.com/glandium/git-cinnabar/). > > At the moment, a small part is written in C, relying on the git code > base, but eventually, there would be more C. > > As I want to ge

Re: [PATCHv4 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 10:26:06AM -0700, Stefan Beller wrote: > > +'GIT_TRACE_CURL':: > > + Enables a curl full trace dump of all incoming and outgoing data, > > + including descriptive information, of the git transport protocol. > > + This is similar to doing curl --trace-ascii

Re: [PATCH 05/29] refname_is_safe(): insist that the refname already be normalized

2016-04-28 Thread David Turner
On Wed, 2016-04-27 at 16:37 -0400, Jeff King wrote: > On Wed, Apr 27, 2016 at 04:34:53PM -0400, David Turner wrote: > > > > I thought the point is that one is a lesser check than the other, > > > and > > > we > > > need different rules for different situations. So we might allow > > > deletion on

Re: [PATCH 15/29] ref_transaction_create(): disallow recursive pruning

2016-04-28 Thread David Turner
On Wed, 2016-04-27 at 14:15 -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > If a casual reader sees this code: > > > > ref_transaction_delete(transaction, r->name, r->sha1, > >REF_ISPRUNING | REF_NODEREF, NULL, &err) > > > > it gives an incorrect impressi

Re: [PATCHv4 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 10:44 AM, Jeff King wrote: > On Thu, Apr 28, 2016 at 10:26:06AM -0700, Stefan Beller wrote: > >> > +'GIT_TRACE_CURL':: >> > + Enables a curl full trace dump of all incoming and outgoing data, >> > + including descriptive information, of the git transport protoco

Re: [PATCHv4 1/2] http.c: implement the GIT_TRACE_CURL environment variable

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 10:48:38AM -0700, Stefan Beller wrote: > >> How does it overwrite the GIT_CURL_VERBOSE variable? > > > > You can't use both, as they are both triggered using the CURLOPT_VERBOSE > > option of curl. The main difference is that with GIT_CURL_VERBOSE, we > > rely on curl to pr

[PATCH] submodule init: fail gracefully with a missing .gitmodules file

2016-04-28 Thread Stefan Beller
When there is no .gitmodules file availabe to initialize a submodule from, `submodule_from_path` just returns NULL. We need to check for that and abort gracefully. When `submodule init` was implemented in shell, a missing .gitmodules file would result in an error message No url found for submo

Re: [PATCH v6 03/19] index-helper: new daemon for caching index and related stuff

2016-04-28 Thread Junio C Hamano
David Turner writes: > From: Nguyễn Thái Ngọc Duy > ... > The biggest gain is not having to verify the trailing SHA-1, which > takes lots of time especially on large index files. But this also > opens doors for further optimiztions: optimizAtion > Git can poke the daemon via unix domain socket

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Junio C Hamano
Jeff King writes: > On Thu, Apr 28, 2016 at 09:09:44AM -0700, Stefan Beller wrote: > >> > I think the key thing with a blacklist is somebody has to go to the work >> > to audit the existing keys. >> >> Would it be sufficient to wait until someone screams at the mailing list >> for some key to be

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 12:06:56PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Thu, Apr 28, 2016 at 09:09:44AM -0700, Stefan Beller wrote: > > > >> > I think the key thing with a blacklist is somebody has to go to the work > >> > to audit the existing keys. > >> > >> Would it be s

Re: [PATCH] submodule init: fail gracefully with a missing .gitmodules file

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 11:28 AM, Stefan Beller wrote: > When there is no .gitmodules file availabe to initialize a submodule > from, `submodule_from_path` just returns NULL. We need to check for > that and abort gracefully. When `submodule init` was implemented in shell, > a missing .gitmodules f

Re: [PATCH] Fixed grammar mistake in the french localization

2016-04-28 Thread Jean-Noël AVILA
Cherry-picked, fixed and PR to Jiang Xin JN -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Junio C Hamano
Jeff King writes: > It's definitely sufficient, it's just annoying if a user shows up every > week and says "I want X.Y", and then somebody else shows up a week later > and says "I want X.Z". > > Are we serving any purpose in vetting each one (and if so, what)? Personally I do not think we would

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 12:28 PM, Junio C Hamano wrote: > Jeff King writes: > >> It's definitely sufficient, it's just annoying if a user shows up every >> week and says "I want X.Y", and then somebody else shows up a week later >> and says "I want X.Z". >> >> Are we serving any purpose in vettin

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Junio C Hamano
Johannes Schindelin writes: > - if (starts_with(var, "credential.")) > + if (starts_with(var, "credential.") || > + (starts_with(var, "http.") && > + ends_with(var, ".extraheader"))) I know you are fond of indenting with HT without aligning things

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Junio C Hamano
Stefan Beller writes: > So when going with that philosophy, the user might be missing > switches like > > -c-for-this-repo-only core.worktree=... -c > submodule.worktree=align-relative-to-parent > > i.e. when shifting the responsibility to the user, we need to have > switches to pass options

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Junio C Hamano
Junio C Hamano writes: > Users use "git -c" and hope to affect what happens in submodules, > only because "git submodule" support is still immature and does not > have options to do that. You certainly smell a linkage between > "pass options to a selected subset of submodules" and your recent >

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Stefan Beller
On Thu, Apr 28, 2016 at 12:52 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> So when going with that philosophy, the user might be missing >> switches like >> >> -c-for-this-repo-only core.worktree=... -c >> submodule.worktree=align-relative-to-parent >> >> i.e. when shifting the resp

[PATCHv2 1/2] submodule init: fail gracefully with a missing .gitmodules file

2016-04-28 Thread Stefan Beller
When there is no .gitmodules file availabe to initialize a submodule from, `submodule_from_path` just returns NULL. We need to check for that and abort gracefully. When `submodule init` was implemented in shell, a missing .gitmodules file would result in an error message No url found for submo

[PATCH 2/2] submodule--helper update-clone: abort gracefully on missing .gitmodules

2016-04-28 Thread Stefan Beller
When there is no .gitmodules file availabe to initialize a submodule from, `submodule_from_path` just returns NULL. We need to check for that and abort gracefully. When `git submodule update` was implemented in shell, this error out with the warning Submodule path '%s' not initialized May

[PATCH v2] trailer: load config to handle core.commentChar

2016-04-28 Thread Rafal Klys
Fall throught git_default_config when reading config to update the comment_line_char from default '#' to possible different value set in core.commentChar. Signed-off-by: Rafal Klys --- Added fallthru instead of reading config third time. Added test, updated commit message. I even tried to chan

Re: [PATCH] Fixed grammar mistake in the french localization

2016-04-28 Thread Ralf Thielow
Jean-Noël AVILA writes: > Cherry-picked, fixed and PR to Jiang Xin > Thanks > JN > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe f

Re: [PATCH 15/29] ref_transaction_create(): disallow recursive pruning

2016-04-28 Thread Junio C Hamano
David Turner writes: > Since there is a manual check for that case, the code will fail at test > time. I see a difference between "We make it hard to write incorrect code" and "We keep it easy to write incorrect code but a runtime check will catch mistakes anyway", and I tend to prefer the forme

Re: [PATCH 49/83] builtin/apply: move 'lock_file' global into 'struct apply_state'

2016-04-28 Thread Junio C Hamano
Christian Couder writes: >> I do not think you need to think about "free"ing. > > Yeah, lockfile.h says: > ... > and: > ... Yup, we are now on the same page. >> Even if the libified version of the apply internal can be called >> multiple times to process multiple patch inputs, there is no need

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 12:28:21PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > It's definitely sufficient, it's just annoying if a user shows up every > > week and says "I want X.Y", and then somebody else shows up a week later > > and says "I want X.Z". > > > > Are we serving any pur

Re: [PATCH v5 2/2] submodule: pass on http.extraheader config settings

2016-04-28 Thread Jeff King
On Thu, Apr 28, 2016 at 12:52:03PM -0700, Junio C Hamano wrote: > "git" is not always about submodules, so "-c-but-not-for-submodules" > option does not belong to "git" wrapper. > > Users use "git -c" and hope to affect what happens in submodules, > only because "git submodule" support is still i

  1   2   >