[PATCH v3 3/4] urlmatch: split host and port fields in `struct url_info`

2017-01-25 Thread Patrick Steinhardt
The `url_info` structure contains information about a normalized URL with the URL's components being represented by different fields. The host and port part though are to be accessed by the same `host` field, so that getting the host and/or port separately becomes more involved than really

[PATCH v3 4/4] urlmatch: allow globbing for the URL host part

2017-01-25 Thread Patrick Steinhardt
The URL matching function computes for two URLs whether they match not. The match is performed by splitting up the URL into different parts and then doing an exact comparison with the to-be-matched URL. The main user of `urlmatch` is the configuration subsystem. It allows to set certain

[PATCH v3 2/4] urlmatch: enable normalization of URLs with globs

2017-01-25 Thread Patrick Steinhardt
The `url_normalize` function is used to validate and normalize URLs. As such, it does not allow for some special characters to be part of the URLs that are to be normalized. As we want to allow using globs in some configuration keys making use of URLs, namely `http..`, but still normalize them, we

[PATCH v3 0/4] urlmatch: allow regexp-based matches

2017-01-25 Thread Patrick Steinhardt
Hi, This is version three of my patch series. The previous version can be found at [1]. The use case is to be able to configure an HTTP proxy for all subdomains of a domain where there are hundreds of subdomains. This version addresses a comment by Philip Oakley regarding the documentation. You

[PATCH v3 1/4] mailmap: add Patrick Steinhardt's work address

2017-01-25 Thread Patrick Steinhardt
Signed-off-by: Patrick Steinhardt --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 9c87a3840..ea59205b9 100644 --- a/.mailmap +++ b/.mailmap @@ -177,6 +177,7 @@ Paolo Bonzini

[PATCH v2] git-p4: Fix git-p4.mapUser on Windows

2017-01-25 Thread George Vanburgh
From: George Vanburgh When running git-p4 on Windows, with multiple git-p4.mapUser entries in git config - no user mappings are applied to the generated repository. Reproduction Steps: 1. Add multiple git-p4.mapUser entries to git config on a Windows machine 2.

Re: [PATCH v2 4/4] urlmatch: allow globbing for the URL host part

2017-01-25 Thread Patrick Steinhardt
On Tue, Jan 24, 2017 at 05:52:39PM -, Philip Oakley wrote: > From: "Patrick Steinhardt" > > a quick comment on the documentation part .. > > > The URL matching function computes for two URLs whether they match not. > > The match is performed by splitting up the

Re: Fixing the warning about warning(""); was: Re: [PATCH] difftool.c: mark a file-local symbol with static

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 01:28:27PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > The only advantage is that it is self-documenting, so somebody does not > > come through later and convert ("%s", "") back to (""). We could also > > write a comment. But I am happy if we

Re: [PATCH] Add more proposals to SoC 2017 ideas page. (lots of submodule stuff)

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 02:11:15PM -0800, Stefan Beller wrote: > > Thanks. I've applied and pushed, though I'll admit I didn't really read > > it carefully for content. A few of the ideas look like they would need > > to be aggregated to be big enough for a SoC project, but that can be > >

Re: [PATCH] connect: handle putty/plink also in GIT_SSH_COMMAND

2017-01-25 Thread Junio C Hamano
Junio C Hamano writes: > Yes. Here is what comes on an obvious clean-up patch (which will be > sent as a follow-up to this message). ... and this is the "obvious clean-up patch" to apply directly on top of Segev's GIT_SSH_COMMAND support, which comes before the previous one.

Re: SubmittingPatches: drop temporal reference for PGP signing

2017-01-25 Thread Stefan Beller
On Tue, Jan 24, 2017 at 10:54 PM, Philip Oakley wrote: >> -Do not PGP sign your patch, at least for now. Most likely, your >> -maintainer or other people on the list would not have your PGP >> -key and would not bother obtaining it anyway. Your patch is not >> -judged by

Re: What's cooking in git.git (Jan 2017, #04; Mon, 23)

2017-01-25 Thread Junio C Hamano
Jeff King writes: > I guess the way to dig would be to add a test that looks at the output > of "type mv" or something, push it to a Travis-hooked branch, and then > wait for the output Sounds tempting ;-)

Re: [PATCHv3 3/3] submodule absorbing: fix worktree/gitdir pointers recursively for non-moves

2017-01-25 Thread Brandon Williams
On 01/25, Stefan Beller wrote: > Consider having a submodule 'sub' and a nested submodule at 'sub/nested'. > When nested is already absorbed into sub, but sub is not absorbed into > its superproject, then we need to fixup the gitfile and core.worktree > setting for 'nested' when absorbing 'sub',

Re: [PATCH v3 14/21] read-cache: touch shared index files when used

2017-01-25 Thread Christian Couder
On Mon, Jan 23, 2017 at 7:53 PM, Junio C Hamano wrote: > Christian Couder writes: > >> Also in general the split-index mode is useful when you often write >> new indexes, and in this case shared index files that are used will >> often be freshened,

Re: [PATCH] connect: handle putty/plink also in GIT_SSH_COMMAND

2017-01-25 Thread Johannes Schindelin
Hi Junio, On Mon, 9 Jan 2017, Junio C Hamano wrote: > IOW, "give an escape hatch to override auto-detected tortoiseplink and > plink variables" suggestion should be taken as an "in addition to" > suggestion (as opposed to an "instead of" suggestion). I was not clear > in my very first message,

[PATCH] fixup! worktree move: new command

2017-01-25 Thread Johannes Schindelin
This is required for the test to pass on Windows, where $TRASH_DIRECTORY is a POSIX path, while Git works with Windows paths instead. Using `$(pwd)` is the common workaround: it reports a Windows path (while `$PWD` would report the POSIX equivalent which, however, would only be understood by shell

[PATCH 4/5] revision.c: refactor ref selection handler after --exclude

2017-01-25 Thread Nguyễn Thái Ngọc Duy
Behavior change: "--exclude --blah --remotes" will not exclude remote branches any more. Only "--exclude --remotes" does. This is because --exclude is going to have a new friend --decorate-reflog who haves the same way. When you allow a distant --remotes to complement a previous option, things

Re: [PATCH 1/3] Documentation/stash: remove mention of git reset --hard

2017-01-25 Thread Jakub Narębski
W dniu 24.01.2017 o 21:14, Jeff King pisze: > On Sat, Jan 21, 2017 at 08:08:02PM +, Thomas Gummerer wrote: > >> diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt >> index 2e9cef06e6..0ad5335a3e 100644 >> --- a/Documentation/git-stash.txt >> +++

Re: [PATCH v2 0/7] Macros for Asciidoctor support

2017-01-25 Thread Johannes Schindelin
Hi Brian, On Sun, 22 Jan 2017, brian m. carlson wrote: > There are two major processors of AsciiDoc: AsciiDoc itself, and > Asciidoctor. Both have advantages and disadvantages, but traditionally > the documentation has been built with AsciiDoc, leading to some > surprising breakage when

Fixing the warning about warning(""); was: Re: [PATCH] difftool.c: mark a file-local symbol with static

2017-01-25 Thread Johannes Schindelin
Hi Peff, On Tue, 24 Jan 2017, Jeff King wrote: > On Tue, Jan 24, 2017 at 01:52:13PM -0800, Junio C Hamano wrote: > > > > I dunno. As ugly as the "%s" thing is in the source, at least it > > > doesn't change the output. Not that an extra space is the end of the > > > world, but it seems like

[PATCH 2/5] revision.c: group ref selection options together

2017-01-25 Thread Nguyễn Thái Ngọc Duy
These options have on thing in common: when specified right after --exclude, they will de-select refs instead of selecting them by default. This change makes it possible to introduce new options that use these options in the same way as --exclude. Such an option would just implement something

[PATCH 3/5] revision.c: allow to change pseudo opt parsing function

2017-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- revision.c | 11 --- revision.h | 4 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/revision.c b/revision.c index 6ebd38d1c8..cda2606c66 100644 --- a/revision.c +++ b/revision.c @@ -2273,10 +2273,15 @@ int

[PATCH 5/5] revision.c: add --decorate-reflog

2017-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- revision.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/revision.c b/revision.c index 45cffcab44..b77face513 100644 --- a/revision.c +++ b/revision.c @@ -2157,6 +2157,49 @@ static

[PATCH 0/5] Prep steps for --decorate-reflog

2017-01-25 Thread Nguyễn Thái Ngọc Duy
I'm still half way through implementing --decorate-reflog that can select what refs to decorate using --branches, --remotes, --tags... But I want to make sure I'm heading the right direction first since I'm not really sure if this is the right way (implementation wise). This series does not

[PATCH 1/5] rev-list-options.txt: delete an empty line

2017-01-25 Thread Nguyễn Thái Ngọc Duy
The convention has been option name is followed immediately by its description without a line break. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/rev-list-options.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/rev-list-options.txt

Re: What's cooking in git.git (Jan 2017, #04; Mon, 23)

2017-01-25 Thread Johannes Schindelin
Hi Peff, On Tue, 24 Jan 2017, Jeff King wrote: > On Tue, Jan 24, 2017 at 11:04:21AM +0100, Lars Schneider wrote: > > > "fsck: prepare dummy objects for --connectivity-check" seems to > > make t1450-fsck.sh fail on macOS with TravisCI: > > > > Initialized empty Git repository in

[PATCH] mingw: allow hooks to be .exe files

2017-01-25 Thread Johannes Schindelin
This change is necessary to allow the files in .git/hooks/ to optionally have the file extension `.exe` on Windows, as the file names are hardcoded otherwise. Signed-off-by: Johannes Schindelin --- Published-As: https://github.com/dscho/git/releases/tag/exe-as-hook-v1

[PATCH] Retire the `relink` command

2017-01-25 Thread Johannes Schindelin
Back in the olden days, when all objects were loose and rubber boots were made out of wood, it made sense to try to share (immutable) objects between repositories. Ever since the arrival of pack files, it is but an anachronism. Let's move the script to the contrib/examples/ directory and no

git clone problem

2017-01-25 Thread Jordi Durban
Hi all! Not sure if that will reach the goal, but let's it a try. I have a problem with the git clone command: when I try to clone a remote repository with the following: git clone --recursive https://github.com/whatever.git what I actually obtain is a copy of my own files in the current

Re: [PATCH] Add more proposals to SoC 2017 ideas page. (lots of submodule stuff)

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 01:59:31PM -0800, Stefan Beller wrote: > This applies to the repo at https://github.com/git/git.github.io Thanks. I've applied and pushed, though I'll admit I didn't really read it carefully for content. A few of the ideas look like they would need to be aggregated to

Re: Force Confirmation for Dropping Changed Lines

2017-01-25 Thread Jacob Keller
On Wed, Jan 25, 2017 at 2:16 PM, Hilco Wijbenga wrote: > How can I force Git to not assume my change to the first line is "redundant"? > My guess is that you probably want a custom merge driver for your file types. That's where I would look initially. Thanks, Jake >

Re: Force Confirmation for Dropping Changed Lines

2017-01-25 Thread Hilco Wijbenga
On 25 January 2017 at 14:24, Jacob Keller wrote: > On Wed, Jan 25, 2017 at 2:16 PM, Hilco Wijbenga > wrote: >> How can I force Git to not assume my change to the first line is "redundant"? >> > > My guess is that you probably want a custom merge

Re: [PATCH] Retire the `relink` command

2017-01-25 Thread Eric Wong
Johannes Schindelin wrote: > Back in the olden days, when all objects were loose and rubber boots were > made out of wood, it made sense to try to share (immutable) objects > between repositories. > > Ever since the arrival of pack files, it is but an anachronism. >

[PATCHv2] submodule update: run custom update script for initial populating as well

2017-01-25 Thread Stefan Beller
In 1b4735d9f3 (submodule: no [--merge|--rebase] when newly cloned, 2011-02-17), all actions were defaulted to checkout for populating a submodule initially, because merging or rebasing makes no sense in that situation. Other commands however do make sense, such as the custom command that was

[PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-25 Thread brian m. carlson
AsciiDoc uses a configuration file to implement macros like linkgit, while Asciidoctor uses Ruby extensions. Implement a Ruby extension that implements the linkgit macro for Asciidoctor in the same way that asciidoc.conf does for AsciiDoc. Adjust the Makefile to use it by default.

Re: Force Confirmation for Dropping Changed Lines

2017-01-25 Thread Jacob Keller
On Wed, Jan 25, 2017 at 3:57 PM, Hilco Wijbenga wrote: > On 25 January 2017 at 15:46, Junio C Hamano wrote: >> Jacob Keller writes: >> Mmm, that sounds complex. The "my-code.x" is made up so I could keep my example

Re: merge maintaining history

2017-01-25 Thread Jacob Keller
On Wed, Jan 25, 2017 at 4:31 PM, David J. Bakeman wrote: > OK so what I've done so far is to clone the original then I added > another remote connected to new repo. Then I did git merge newrepo. It > did a bunch of stuff that flashed by really fast and then reported a >

Re: [RFC 12/14] fetch-pack: do not printf after closing stdout

2017-01-25 Thread Stefan Beller
On Wed, Jan 25, 2017 at 2:03 PM, Jonathan Tan wrote: > In fetch-pack, during a stateless RPC, printf is invoked after stdout is > closed. Update the code to not do this, preserving the existing > behavior. This seems to me as if it could go as an independent bugfix(?)

Re: Force Confirmation for Dropping Changed Lines

2017-01-25 Thread Jacob Keller
On Wed, Jan 25, 2017 at 2:51 PM, Hilco Wijbenga wrote: > On 25 January 2017 at 14:24, Jacob Keller wrote: >> On Wed, Jan 25, 2017 at 2:16 PM, Hilco Wijbenga >> wrote: >>> How can I force Git to not assume my change to

Re: [PATCHv2 3/3] submodule absorbing: fix worktree/gitdir pointers recursively for non-moves

2017-01-25 Thread Junio C Hamano
Stefan Beller writes: > Consider having a submodule 'sub' and a nested submodule at 'sub/nested'. > When nested is already absorbed into sub, but sub is not absorbed into > its superproject, then we need to fixup the gitfile and core.worktree > setting for 'nested' when

[PATCHv3 3/3] submodule absorbing: fix worktree/gitdir pointers recursively for non-moves

2017-01-25 Thread Stefan Beller
Consider having a submodule 'sub' and a nested submodule at 'sub/nested'. When nested is already absorbed into sub, but sub is not absorbed into its superproject, then we need to fixup the gitfile and core.worktree setting for 'nested' when absorbing 'sub', but we do not need to move its git dir

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

2017-01-25 Thread Junio C Hamano
Mike Hommey writes: > For instance, after changing my laptop for a new one, I copied my > configs, but had some environment differences that broke gpg. > With this change applied, the output becomes, on this new machine: > gpg: keyblock resource

Re: [PATCH v2 0/7] Macros for Asciidoctor support

2017-01-25 Thread brian m. carlson
On Wed, Jan 25, 2017 at 06:30:00PM -0500, Jeff King wrote: > On Wed, Jan 25, 2017 at 11:19:26PM +, brian m. carlson wrote: > > > On Wed, Jan 25, 2017 at 04:35:44PM -0500, Jeff King wrote: > > > On Wed, Jan 25, 2017 at 02:28:55PM +0100, Johannes Schindelin wrote: > > > > > > > > The need for

Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Cornelius Weig
> > It may have been obvious, but to be explicit for somebody new, > !prefixcmp() corresponds to starts_with(). IOW, we changed the > meaning of the return value when moving from cmp-lookalike (where 0 > means "equal") to "does it start with this string?" bool (where 1 > means "yes"). > I see.

[RFC 13/14] fetch: send want-ref and receive fetched refs

2017-01-25 Thread Jonathan Tan
Teach fetch to send refspecs to the underlying transport, and teach all components used by the HTTP transport (remote-curl, transport-helper, fetch-pack) to understand and propagate the names and SHA-1s of the refs fetched. Signed-off-by: Jonathan Tan ---

[RFC 00/14] Allow fetch-pack to send ref names (globs allowed)

2017-01-25 Thread Jonathan Tan
Hello everyone - this is a proposal for a protocol change to allow the fetch-pack/upload-pack to converse in terms of ref names (globs allowed), and also an implementation of the server (upload-pack) and fetch-from-HTTP client (fetch-pack invoked through fetch). Negotiation currently happens by

[RFC 04/14] fetch: refactor the population of hashes

2017-01-25 Thread Jonathan Tan
Populate SHA-1 ref hashes in get_ref_map instead of do_fetch. Besides tightening scopes of variables in the code, this also prepares for a future patch where get_ref_map is called multiple times within do_fetch. Signed-off-by: Jonathan Tan --- builtin/fetch.c | 37

[RFC 05/14] fetch: refactor fetch_refs into two functions

2017-01-25 Thread Jonathan Tan
Refactor the fetch_refs function into a function that does the fetching of refs and another function that stores them. This prepares for a future patch where some processing may be done between those tasks. Signed-off-by: Jonathan Tan --- builtin/fetch.c | 19

[RFC 12/14] fetch-pack: do not printf after closing stdout

2017-01-25 Thread Jonathan Tan
In fetch-pack, during a stateless RPC, printf is invoked after stdout is closed. Update the code to not do this, preserving the existing behavior. Signed-off-by: Jonathan Tan --- builtin/fetch-pack.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-)

[RFC 03/14] upload-pack: test negotiation with changing repo

2017-01-25 Thread Jonathan Tan
Make upload-pack report "not our ref" errors to the client. (If not, the client would be left waiting for a response when the server is already dead.) Add tests to check the behavior of upload-pack and fetch-pack when upload-pack is served from a changing repository (for example, when different

[RFC 14/14] DONT USE advertise_ref_in_want=1

2017-01-25 Thread Jonathan Tan
--- t/t5500-fetch-pack.sh | 2 ++ upload-pack.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index 18fe23c97..f39dbcab8 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -551,6 +551,7 @@

[RFC 07/14] fetch-pack: put shallow info in out param

2017-01-25 Thread Jonathan Tan
Expand the transport fetch method signature, by adding an out parameter, to allow transports to return information about the refs they have fetched. Then communicate shallow status information through this mechanism instead of by modifying the input list of refs. This does require clients to

[RFC 11/14] fetch-pack: support want-ref

2017-01-25 Thread Jonathan Tan
Teach fetch-pack to use the want-ref mechanism whenever the server advertises it. Signed-off-by: Jonathan Tan --- builtin/fetch-pack.c | 5 +- fetch-pack.c | 173 -- fetch-pack.h | 2 +

[RFC 01/14] upload-pack: move parsing of "want" line

2017-01-25 Thread Jonathan Tan
Refactor to parse "want" lines when the prefix is found. This makes it easier to add support for another prefix, which will be done in a subsequent commit. Signed-off-by: Jonathan Tan --- upload-pack.c | 28 ++-- 1 file changed, 14

[RFC 02/14] upload-pack: allow ref name and glob requests

2017-01-25 Thread Jonathan Tan
Currently, while performing packfile negotiation [1], upload-pack allows clients to specify their desired objects only as SHA-1s. This causes: (a) vulnerability to failure when an object turns non-existent during negotiation, which may happen if, for example, upload-pack is provided by

[RFC 10/14] fetch-pack: support partial names and globs

2017-01-25 Thread Jonathan Tan
Teach fetch-pack to support partial ref names and ref patterns as input. This does not use "want-ref" yet - support for that will be added in a future patch. Signed-off-by: Jonathan Tan --- builtin/fetch-pack.c | 40 - remote.c

[RFC 08/14] fetch-pack: check returned refs for matches

2017-01-25 Thread Jonathan Tan
Instead of setting "matched" on matched refs, detect matches by checking the sought refs against the returned refs. Also, since the "matched" field in struct ref is now no longer used, remove it. This is the 2nd of 3 patches to eliminate using input refs to communicate information obtained by

[RFC 09/14] transport: put ref oid in out param

2017-01-25 Thread Jonathan Tan
Return new OID information obtained through fetching in new structs instead of reusing the existing ones. With this change, the input structs are no longer used for output, and are thus marked const. This is the 3rd of 3 patches to eliminate using input refs to communicate information obtained by

[RFC 06/14] fetch: refactor to make function args narrower

2017-01-25 Thread Jonathan Tan
Refactor find_non_local_tags and get_ref_map to only take the information they need instead of the entire transport struct. Besides improving code clarity, this also improves their flexibility, which will be needed in a future patch. Signed-off-by: Jonathan Tan ---

Re: [PATCH] connect: handle putty/plink also in GIT_SSH_COMMAND

2017-01-25 Thread Junio C Hamano
Johannes Schindelin writes: > Now, with the patch in question (without the follow-up, which I would like > to ask you to ignore, just like you did so far), Git would not figure out > that your script calls PuTTY eventually. The work-around? Easy: > >

Re: Force Confirmation for Dropping Changed Lines

2017-01-25 Thread Junio C Hamano
Jacob Keller writes: >> Mmm, that sounds complex. The "my-code.x" is made up so I could keep >> my example as simple as possible. In reality, it's Maven's POM files >> (pom.xml). >> >> So there is no setting for any of this? There is no way to switch off >> auto merging

Re: merge maintaining history

2017-01-25 Thread David J. Bakeman
On 01/20/2017 03:37 AM, Jakub Narębski wrote: > W dniu 19.01.2017 o 22:42, Junio C Hamano pisze: >> "David J. Bakeman" writes: > > [...] >>> Thanks I think that's close but it's a little more complicated I think >>> :<( I don't know if this diagram will work but lets try.

[PATCH] Revert "push: change submodule default to check when submodules exist"

2017-01-25 Thread Stefan Beller
This reverts commit 04a1d8b1ae5eeecb90675cfaca2850bf26269485. In the previous commit we set push.recurseSubmodules to "check" by default. This check is done by walking all remote refs that are known. For remotes we only store the refs/heads/* (and tags), which doesn't include all commits. In

Re: What's cooking in git.git (Jan 2017, #04; Mon, 23)

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 06:01:11PM +0100, Johannes Schindelin wrote: > > Looks like "mv" prompts and then fails to move the file (so we get the > > dangling blob for the source blob, and fsck doesn't report failure > > because we didn't actually corrupt the destination blob). > > IIRC I had

Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Junio C Hamano
Jeff King writes: > I made a lot of suppositions about your desires there, so maybe you > really do want just tag.createReflog. But "core.logallrefupdates = > always" sounds a lot more useful to me. Thanks for saving me from typing exactly the same thing ;-)

[ANNOUNCE] Git Rev News edition 23

2017-01-25 Thread Christian Couder
Hi everyone, The 23rd edition of Git Rev News is now published: https://git.github.io/rev_news/2017/01/25/edition-23/ Thanks a lot to all the contributors and helpers! Enjoy, Christian, Thomas, Jakub and Markus.

Re: [PATCH 4/5] revision.c: refactor ref selection handler after --exclude

2017-01-25 Thread Jacob Keller
On Wed, Jan 25, 2017 at 4:50 AM, Nguyễn Thái Ngọc Duy wrote: > Behavior change: "--exclude --blah --remotes" will not exclude remote > branches any more. Only "--exclude --remotes" does. > > This is because --exclude is going to have a new friend --decorate-reflog > who haves

Re: [PATCH 01/12] for_each_alternate_ref: handle failure from real_pathdup()

2017-01-25 Thread Junio C Hamano
Jeff King writes: > In older versions of git, if real_path() failed to resolve > the alternate object store path, we would die() with an > error. However, since 4ac9006f8 (real_path: have callers use > real_pathdup and strbuf_realpath, 2016-12-12) we use the > real_pathdup()

Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 01:19:06AM +0100, cornelius.w...@tngtech.com wrote: > From: Cornelius Weig > > Git does not create a history for tags, in contrast to common > expectation to simply version everything. This can be changed by using > the `--create-reflog` flag

Re: What's cooking in git.git (Jan 2017, #04; Mon, 23)

2017-01-25 Thread Junio C Hamano
Jeff King writes: > On Wed, Jan 25, 2017 at 06:01:11PM +0100, Johannes Schindelin wrote: > >> > Looks like "mv" prompts and then fails to move the file (so we get the >> > dangling blob for the source blob, and fsck doesn't report failure >> > because we didn't actually corrupt

[PATCH] Add more proposals to SoC 2017 ideas page. (lots of submodule stuff)

2017-01-25 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Peff, This applies to the repo at https://github.com/git/git.github.io If you're looking for a co-admin/mentors, I can help out. Thanks, Stefan SoC-2017-Ideas.md | 57 +++

Re: [PATCH v1 1/3] blame: add --aggregate option

2017-01-25 Thread Jeff King
On Tue, Jan 24, 2017 at 11:27:32PM -0600, Edmundo Carmona Antoranz wrote: > To avoid taking up so much space on normal output printing duplicate > information on consecutive lines that "belong" to the same revision, > this option allows to print a single line with the information about > the

Re: [PATCH] connect: handle putty/plink also in GIT_SSH_COMMAND

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 02:35:36PM -0800, Junio C Hamano wrote: > -- >8 -- > Subject: [PATCH] connect: core.sshvariant to correct misidentification I have been watching this discussion from the sidelines, and I agree that this direction is a big improvement. > +static void

Re: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: > >> +enum log_refs_config { >> +LOG_REFS_UNSET = -1, >> +LOG_REFS_NONE = 0, >> +LOG_REFS_NORMAL, /* see should_create_reflog for rules */ >> +LOG_REFS_ALWAYS >> +}; >> +extern enum log_refs_config

Re: [PATCHv2 3/3] submodule absorbing: fix worktree/gitdir pointers recursively for non-moves

2017-01-25 Thread Stefan Beller
On Tue, Jan 24, 2017 at 4:46 PM, Brandon Williams wrote: > On 01/24, Stefan Beller wrote: >> + connect_work_tree_and_git_dir(path, real_new_git_dir); > > Memory leak with 'real_new_git_dir' yup. :( > The scope of 'real_sub_git_dir' and 'real_common_git_dir'

Re: [PATCH v2 0/7] Macros for Asciidoctor support

2017-01-25 Thread brian m. carlson
On Wed, Jan 25, 2017 at 04:35:44PM -0500, Jeff King wrote: > On Wed, Jan 25, 2017 at 02:28:55PM +0100, Johannes Schindelin wrote: > > > > The need for the extensions could be replaced with a small amount of > > > Ruby code, if that's considered desirable. Previous opinions on doing > > > so were

Re: [PATCH v2 25/27] attr: store attribute stack in attr_check structure

2017-01-25 Thread Brandon Williams
On 01/25, Brandon Williams wrote: > On 01/25, Junio C Hamano wrote: > > Brandon Williams writes: > > > > >> In my mind, the value of having a constant check_attr is primarily > > >> that it gives us a stable pointer to serve as a hashmap key, > > >> i.e. the identifier for

Re: diff --color-words breaks spacing

2017-01-25 Thread Jeff King
On Tue, Jan 24, 2017 at 09:39:31AM -0800, Phil Hord wrote: > I noticed some weird spacing when comparing files with git diff > --color-words. The space before a colored word disappears sometimes. I _think_ this is working as designed, though it is a bit tricky (and it may be possible to make it

[PATCHv3] submodule update: run custom update script for initial populating as well

2017-01-25 Thread Stefan Beller
In 1b4735d9f3 (submodule: no [--merge|--rebase] when newly cloned, 2011-02-17), all actions were defaulted to checkout for populating a submodule initially, because merging or rebasing makes no sense in that situation. Other commands however do make sense, such as the custom command that was

Re: [PATCH] Add more proposals to SoC 2017 ideas page. (lots of submodule stuff)

2017-01-25 Thread Stefan Beller
On Wed, Jan 25, 2017 at 2:06 PM, Jeff King wrote: > On Wed, Jan 25, 2017 at 01:59:31PM -0800, Stefan Beller wrote: > >> This applies to the repo at https://github.com/git/git.github.io > > Thanks. I've applied and pushed, though I'll admit I didn't really read > it carefully for

Force Confirmation for Dropping Changed Lines

2017-01-25 Thread Hilco Wijbenga
Hi all, Most of the time, when a later commit changes a line in an identical fashion during, say, a rebase, you want Git to silently continue by dropping the duplicate change from the later commit. I have a common (for me) scenario where I want Git to specifically ask me to resolve this

Re: [PATCH] Add more proposals to SoC 2017 ideas page. (lots of submodule stuff)

2017-01-25 Thread Stefan Beller
On Wed, Jan 25, 2017 at 2:26 PM, Jeff King wrote: > On Wed, Jan 25, 2017 at 02:11:15PM -0800, Stefan Beller wrote: > >> > Thanks. I've applied and pushed, though I'll admit I didn't really read >> > it carefully for content. A few of the ideas look like they would need >> > to be

Re: [PATCH 4/5] revision.c: refactor ref selection handler after --exclude

2017-01-25 Thread Junio C Hamano
Jacob Keller writes: > On Wed, Jan 25, 2017 at 1:27 PM, Jeff King wrote: >> On Wed, Jan 25, 2017 at 03:57:18PM -0500, Jeff King wrote: >> >>> IOW, the ref-selector options build up until a group option is given, >>> which acts on the built-up options (over

Re: [PATCH] connect: handle putty/plink also in GIT_SSH_COMMAND

2017-01-25 Thread Junio C Hamano
Jeff King writes: > On Wed, Jan 25, 2017 at 02:35:36PM -0800, Junio C Hamano wrote: > >> -- >8 -- >> Subject: [PATCH] connect: core.sshvariant to correct misidentification > > I have been watching this discussion from the sidelines, and I agree > that this direction is a big

Re: [PATCH v2 0/7] Macros for Asciidoctor support

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 11:19:26PM +, brian m. carlson wrote: > On Wed, Jan 25, 2017 at 04:35:44PM -0500, Jeff King wrote: > > On Wed, Jan 25, 2017 at 02:28:55PM +0100, Johannes Schindelin wrote: > > > > > > The need for the extensions could be replaced with a small amount of > > > > Ruby

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

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

Re: [PATCH v2 25/27] attr: store attribute stack in attr_check structure

2017-01-25 Thread Brandon Williams
On 01/25, Junio C Hamano wrote: > Brandon Williams writes: > > >> In my mind, the value of having a constant check_attr is primarily > >> that it gives us a stable pointer to serve as a hashmap key, > >> i.e. the identifier for each call site, in a later iteration. > > > > We

Re: [PATCHv2] submodule update: run custom update script for initial populating as well

2017-01-25 Thread Brandon Williams
On 01/25, Stefan Beller wrote: > In 1b4735d9f3 (submodule: no [--merge|--rebase] when newly cloned, > 2011-02-17), all actions were defaulted to checkout for populating > a submodule initially, because merging or rebasing makes no sense > in that situation. > > Other commands however do make

Re: Force Confirmation for Dropping Changed Lines

2017-01-25 Thread Hilco Wijbenga
On 25 January 2017 at 15:46, Junio C Hamano wrote: > Jacob Keller writes: > >>> Mmm, that sounds complex. The "my-code.x" is made up so I could keep >>> my example as simple as possible. In reality, it's Maven's POM files >>> (pom.xml). >>> >>> So there

Re: [PATCH] Documentation: implement linkgit macro for Asciidoctor

2017-01-25 Thread Eric Wong
Jeff King wrote: > On Thu, Jan 26, 2017 at 12:13:44AM +, brian m. carlson wrote: > > + > > + def process(parent, target, attrs) > > +if parent.document.basebackend? 'html' > > + prefix = parent.document.attr('git-relative-html-prefix') > > +

Re: Fixing the warning about warning(""); was: Re: [PATCH] difftool.c: mark a file-local symbol with static

2017-01-25 Thread Johannes Sixt
Am 25.01.2017 um 23:01 schrieb Jeff King: +#pragma GCC diagnostic ignored "-Wformat-zero-length" Last time I used #pragma GCC in a cross-platform project, it triggered an "unknown pragma" warning for MSVC. (It was the C++ compiler, I don't know if the C compiler would also warn.) It would

[PATCH] refs: add option core.logAllRefUpdates = always

2017-01-25 Thread cornelius . weig
Hi peff, you made it easy for me. Most of your patch still applied, only the tests didn't quite fit. Maybe you can have a look if I've overlooked something, since you know the changes best? Thanks for supporting this with your patch!

[PATCH] refs: add option core.logAllRefUpdates = always

2017-01-25 Thread cornelius . weig
From: Cornelius Weig When core.logallrefupdates is true, we only create a new reflog for refs that are under certain well-known hierarchies. The reason is that we know that some hierarchies (like refs/tags) do not typically change, and that unknown hierarchies might

Re: Force Confirmation for Dropping Changed Lines

2017-01-25 Thread Junio C Hamano
Jacob Keller writes: > Setting the merge driver to "unset" will do what you want, but it > would leave the current branch as the tentative answer and doesn't > actually make it easy to resolve properly. That would only require > putting "pom.xml merge=unset" in the

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

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

[PATCH 1/2] fsck: move typename() printing to its own function

2017-01-25 Thread Jeff King
When an object has a problem, we mention its type. But we do so by feeding the result of typename() directly to fprintf(). This is potentially dangerous because typename() can return NULL for some type values (like OBJ_NONE). It's doubtful that this can be triggered in practice with the current

[PATCH 0/2] (re-)optimizing fsck --connectivity-only

2017-01-25 Thread Jeff King
I've been playing around with the newly-fixed `fsck --connectivity-only`. While it's much faster than it was, I was sad to find a case that is still much slower than "git rev-list --objects --all". This goes on top of my origin/jk/fsck-connectivity-check-fix, and gives a noticeable speedup. IMHO

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

2017-01-25 Thread Jeff King
On Thu, Jan 26, 2017 at 08:54:10AM +0900, Mike Hommey wrote: > > Implementation-wise, I'd be happier if we do not add any new > > callsites of strbuf_split(), which is a horrible interface. But > > that is a minor detail. > > What would you suggest otherwise? Try string_list_split() (or its

Re: sparse checkout - weird behavior

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 09:59:38PM -0500, Paul Hammant wrote: > Here's a simple reproducible bug - something unexpected in sparse-checkout > mode: > > $ git clone g...@github.com:jekyll/jekyll.git --no-checkout > Cloning into 'jekyll'... > remote: Counting objects: 41331, done. >

Re: sparse checkout - weird behavior

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 10:21:19PM -0500, Paul Hammant wrote: > Related bug (maybe the same). Reproduction: > > $ git clone g...@github.com:jekyll/jekyll.git --no-checkout > Cloning into 'jekyll'... > remote: Counting objects: 41331, done. > remote: Compressing objects: 100% (5/5), done.

  1   2   >