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

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: Force Confirmation for Dropping Changed Lines

2017-01-25 Thread Jacob Keller
On Wed, Jan 25, 2017 at 6:32 PM, Junio C Hamano wrote: > Where did you get that "unset" from? If that is this paragraph in > Documentation/gitattributes.txt: > Ok so that whole section of documentation is very confusing to me. Maybe it could be improved for more readability.

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.

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. >

[PATCH 2/2] fsck: lazily load types under --connectivity-only

2017-01-25 Thread Jeff King
The recent fixes to "fsck --connectivity-only" load all of the objects with their correct types. This keeps the connectivity-only code path close to the regular one, but it also introduces some unnecessary inefficiency. While getting the type of an object is cheap compared to actually opening and

[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

[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

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

2017-01-25 Thread Jeff King
On Thu, Jan 26, 2017 at 12:13:44AM +, brian m. carlson wrote: > diff --git a/Documentation/Makefile b/Documentation/Makefile > index 19c42eb60..d1b7a6865 100644 > --- a/Documentation/Makefile > +++ b/Documentation/Makefile > @@ -179,10 +179,7 @@ ASCIIDOC = asciidoctor > ASCIIDOC_CONF = >

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

2017-01-25 Thread Jeff King
On Thu, Jan 26, 2017 at 02:16:54AM +0100, cornelius.w...@tngtech.com wrote: > 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

Re: sparse checkout - weird behavior

2017-01-25 Thread Paul Hammant
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. remote: Total 41331 (delta 0), reused 0 (delta 0), pack-reused 41326

sparse checkout - weird behavior

2017-01-25 Thread Paul Hammant
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. remote: Compressing objects: 100% (5/5), done. remote: Total 41331 (delta 0),

mergetool and difftool inconsistency?

2017-01-25 Thread Denton Liu
Hello all, I was wondering if there is any reason why 'git difftool' accepts the '-g|--gui' whereas 'git mergetool' does not have an option to accept that flag. Please let me know if this is intentional, otherwise I can write up a patch to add the GUI flag to 'mergetool'. Thanks!

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,

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

2017-01-25 Thread Junio C Hamano
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, especially when we know the >> command failed, would make the bug-hunting of

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

[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: [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: 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: 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

[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: 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] 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 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] 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

[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: 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: [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: [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.

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',

[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

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 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] 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. >

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

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

[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: [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] 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 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

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: 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: 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: [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: 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: [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: [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: [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] 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: 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: [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

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: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

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

[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 ---

[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 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 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 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 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 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 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

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

[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 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: [PATCH] tag: add tag.createReflog option

2017-01-25 Thread Junio C Hamano
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 log_all_ref_updates; > +... > +int

Re: [PATCH] Retire the `relink` command

2017-01-25 Thread Junio C Hamano
Jeff King writes: > On Wed, Jan 25, 2017 at 05:58:57PM +0100, 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

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

2017-01-25 Thread Junio C Hamano
Jeff King writes: > On Wed, Jan 25, 2017 at 05:58:42PM +0100, Johannes Schindelin wrote: > >> 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. > > Make sense as a

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

2017-01-25 Thread Junio C Hamano
Johannes Schindelin writes: > 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. Hmph. There is no longer ".com"? I briefly wondered if

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

2017-01-25 Thread Jeff King
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 negative, however. > > Quite frankly, it is annoying to be forced

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

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 10:21:48PM +0100, Cornelius Weig wrote: > On 01/25/2017 07:00 PM, Jeff King wrote: > > > - Is that the end of it, or is the desire really "I want reflogs for > > _everything_"? That seems like a sane thing to want. > > > > If so, then the update to

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

2017-01-25 Thread Jacob Keller
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 that group) and then resets the >> built-up options.

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

2017-01-25 Thread Junio C Hamano
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 simply catch it in review (or > preferably the person is clueful enough to

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

2017-01-25 Thread Jeff King
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 that group) and then resets the > built-up options. Doing "--unrelated" as above is orthogonal (though I > think in

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

2017-01-25 Thread Cornelius Weig
On 01/25/2017 07:00 PM, Jeff King wrote: > - Is that the end of it, or is the desire really "I want reflogs for > _everything_"? That seems like a sane thing to want. > > If so, then the update to core.logallrefupdates should turn it into > a tri-state: > > - false; no

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

2017-01-25 Thread Junio C Hamano
Jakub Narębski writes: >>> - Save your local modifications to a new 'stash', and run `git reset >>> - --hard` to revert them. The part is optional and gives >>> + Save your local modifications to a new 'stash', and revert the >>> + the changes in the working tree to

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

2017-01-25 Thread Junio C Hamano
Jeff King writes: > 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 >> +++ b/Documentation/git-stash.txt >> @@

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

2017-01-25 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > 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

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

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 05:58:42PM +0100, Johannes Schindelin wrote: > 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. Make sense as a goal. > - if (access(path.buf, X_OK) < 0)

Re: [PATCH] Retire the `relink` command

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 05:58:57PM +0100, 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

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

2017-01-25 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > These options have on thing in common: when specified right after one thing. > --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

Re: [PATCH 06/12] clone: disable save_commit_buffer

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 02:35:41PM -0500, Jeff King wrote: > On Wed, Jan 25, 2017 at 02:27:40PM -0500, Jeff King wrote: > > > > > For fetching operations like clone, we already disable > > > > > > s/clone/fetch/ you meant? > > > > Well, no, because this patch deals with clone. > > > > It's

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

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 07:50:53PM +0700, 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 the same

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

2017-01-25 Thread Junio C Hamano
Christian Couder writes: > Well, when we cannot freshen a loose file (with > freshen_loose_object()), we don't warn or die, we just write the loose > file. But here we cannot write the shared index file. I think that is an excellent point. Let me make sure I got you

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

2017-01-25 Thread Jeff King
On Wed, Jan 25, 2017 at 07:50:51PM +0700, Nguyễn Thái Ngọc Duy wrote: > 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 >

Re: GSoC 2017: application open, deadline = February 9, 2017

2017-01-25 Thread Jeff King
On Mon, Jan 23, 2017 at 04:02:02PM +0100, Matthieu Moy wrote: > If the answer to one of the above question is yes, then: > > * Who's willing to mentor? and to admin? I did co-admin last year and the year before, but I made Matthieu do all the work. :) I do not mind doing the administrative

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

2017-01-25 Thread Junio C Hamano
Stefan Beller writes: > On Mon, Jan 23, 2017 at 4:18 PM, Junio C Hamano wrote: >> >> * sb/unpack-trees-super-prefix (2017-01-12) 5 commits >> - SQUASH >> - unpack-trees: support super-prefix option >> - t1001: modernize style >> - t1000: modernize

  1   2   >