Re: [PATCH/RFC 2/2] git rebase -i: Warn removed or dupplicated commits

2015-05-27 Thread Stephen Kelly
Galan Rémi remi.galan-alfonso at ensimag.grenoble-inp.fr writes: Check if commits were removed (i.e. a line was deleted) or dupplicated (e.g. the same commit is picked twice), can print warnings or abort git rebase according to the value of the configuration variable rebase.checkLevel. I

[PATCH] t7063: hide stderr from setup inside prereq

2015-05-27 Thread Jeff King
When t7063 starts, it runs update-index --untracked-cache to see if we support the untracked cache. Its output goes straight to stderr, even if the test is not run with -v. Let's wrap it in a prereq that will hide the output by default, but show it with -v. Signed-off-by: Jeff King p...@peff.net

Recovering from 'fatal: core.bare and core.worktree do not make sense'

2015-05-27 Thread SZEDER Gábor
Hi, the other day I said 'git config core.worktree /somewhere' in a bare repo while thinking I was in a regular one, user error. The 'fatal: core.bare and core.worktree do not make sense' error from the next command made me realize immediately that I was wrong, that's good. However... OK,

Re: [PATCH/RFC 2/2] git rebase -i: Warn removed or dupplicated commits

2015-05-27 Thread Matthieu Moy
Stephen Kelly steve...@gmail.com writes: Galan Rémi remi.galan-alfonso at ensimag.grenoble-inp.fr writes: Check if commits were removed (i.e. a line was deleted) or dupplicated (e.g. the same commit is picked twice), can print warnings or abort git rebase according to the value of the

Re: [PATCH] git-new-workdir: add windows compatibility

2015-05-27 Thread Johannes Schindelin
Hi Daniel, On 2015-05-26 19:16, Daniel Smith wrote: Thanks to everyone for reviewing my proposed patch an providing valuable feedback. This was my first patch submission to a large open source project like Git and the whole process was a little daunting. Heh, yeah, it can be quite

Re: [PATCH 3/3] clone: add `--seed` shorthand

2015-05-27 Thread Jeff King
On Sun, May 24, 2015 at 12:07:53PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Having slept on it, I really think --seed should be fetch from the seed into temp refs, and not what I posted earlier. Yeah, I think that is the right way to do it. In the meantime, do you

FW: Query on git submodules

2015-05-27 Thread Frawley, Sarah
Thanks Heiko for getting back to me. Correct when I referred to 10+ layers I meant nested repositories which make up a large hierarchy.  Some repositories are repeated across the hierarchy.  We check-out submodules to tag versions (as opposed to master branch).  If we need to roll out a

Re: [PATCH/RFC 2/2] git rebase -i: Warn removed or dupplicated commits

2015-05-27 Thread Remi Galan Alfonso
Thank you for reviewing the code. Eric Sunshinesunsh...@sunshineco.com writes: + # To uppercase + checkLevel=$(echo $checkLevel | tr '[:lower:]' '[:upper:]') Is there precedence elsewhere for recognizing uppercase and lowercase variants of config values? It seems to be

Re: [PATCH 0/5] Fix verify_lock() to report errors via strbuf

2015-05-27 Thread Michael Haggerty
On 05/23/2015 01:34 AM, Michael Haggerty wrote: verify_lock() is a helper function called while committing reference transactions. But when it fails, instead of recording its error message in a strbuf to be passed back to the caller of ref_transaction_commit(), the error message was being

[PATCH/WIP 0/8] Make git-am a builtin

2015-05-27 Thread Paul Tan
git-am is a commonly used command for applying a series of patches from a mailbox to the current branch. Currently, it is implemented by the shell script git-am.sh. However, compared to C, shell scripts have certain deficiencies: they need to spawn a lot of processes, introduce a lot of

[PATCH/WIP 2/8] wrapper: implement xfopen()

2015-05-27 Thread Paul Tan
A common usage pattern of fopen() is to check if it succeeded, and die() if it failed: FILE *fp = fopen(path, w); if (!fp) die_errno(_(could not open '%s' for writing), path); Implement a wrapper function xfopen() for the above, so that we can save a few lines of

Re: [PATCH/RFC 2/2] git rebase -i: Warn removed or dupplicated commits

2015-05-27 Thread Remi Galan Alfonso
Eric Sunshinesunsh...@sunshineco.com writes: Shouldn't this case also 'die' when rebase.checkLevel is error? And, why doesn't the user get advice about configuring rebase.checkLevel in this case? Stephen Kellysteve...@gmail.com writes: I sometimes duplicate commits deliberately if I want to

Bug: .gitconfig folder

2015-05-27 Thread Jorge
If you have a folder named ~/.gitconfig instead of a file with that name, when you try to run some global config editing command it will fail with a wrong error message: fatal: Out of memory? mmap failed: No such device You can reproduce it: $rm ~/.gitconfig $mkdir ~/.gitconfig $ls -la

[PATCH/WIP 1/8] wrapper: implement xopen()

2015-05-27 Thread Paul Tan
A common usage pattern of open() is to check if it was successful, and die() if it was not: int fd = open(path, O_WRONLY | O_CREAT, 0777); if (fd 0) die_errno(_(Could not open '%s' for writing.), path); Implement a wrapper function xopen() that does the above so

[PATCH/WIP 3/8] am: implement patch queue mechanism

2015-05-27 Thread Paul Tan
git-am applies a series of patches. If the process terminates abnormally, we want to be able to resume applying the series of patches. This requires the session state to be saved in a persistent location. Implement the mechanism of a patch queue, represented by 2 integers -- the index of the

[PATCH/WIP 4/8] am: split out mbox/maildir patches with git-mailsplit

2015-05-27 Thread Paul Tan
git-am.sh supports mbox, stgit and mercurial patches. Re-implement support for splitting out mbox/maildirs using git-mailsplit, while also implementing the framework required to support other patch formats in the future. Re-implement support for the --patch-format option (since a5a6755 (git-am

[PATCH/WIP 7/8] am: apply patch with git-apply

2015-05-27 Thread Paul Tan
Implement applying the patch to the index using git-apply. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/builtin/am.c b/builtin/am.c index 0b8a42d..7126df3 100644

[PATCH/WIP 8/8] am: commit applied patch

2015-05-27 Thread Paul Tan
Implement do_commit(), which commits the index which contains the results of applying the patch, along with the extracted commit message and authorship information. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 46 ++ 1 file changed, 46

[PATCH/WIP 5/8] am: detect mbox patches

2015-05-27 Thread Paul Tan
Since 15ced75 (git-am foreign patch support: autodetect some patch formats, 2009-05-27), git-am.sh is able to autodetect mbox, stgit and mercurial patches through heuristics. Re-implement support for autodetecting mbox/maildir files. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c |

[PATCH/WIP 6/8] am: extract patch, message and authorship with git-mailinfo

2015-05-27 Thread Paul Tan
For the purpose of applying the patch and committing the results, implement extracting the patch data, commit message and authorship from an e-mail message using git-mailinfo. git-mailinfo is run as a separate process, but ideally in the future, we should be be able to access its functionality

Re: [PATCH/WIP 1/8] wrapper: implement xopen()

2015-05-27 Thread Stefan Beller
On Wed, May 27, 2015 at 6:33 AM, Paul Tan pyoka...@gmail.com wrote: A common usage pattern of open() is to check if it was successful, and die() if it was not: int fd = open(path, O_WRONLY | O_CREAT, 0777); if (fd 0) die_errno(_(Could not open '%s' for

Re: [PATCH/RFC 1/2] git-rebase -i: Add key word drop to remove a commit

2015-05-27 Thread Remi Galan Alfonso
Thank you for reviewing the code. Johannes Schindelinjohannes.schinde...@gmx.de writes: Please note that you can already just comment-out the line if you need to keep a visual trace. Alternatively, you can replace the `pick` command by `noop`. If you really need the `drop` command (with

Re: [PATCH/RFC 1/2] git-rebase -i: Add key word drop to remove a commit

2015-05-27 Thread Matthieu Moy
Remi Galan Alfonso remi.galan-alfo...@ensimag.grenoble-inp.fr writes: It also has some effects with the second part of this patch (checks removed and/or duplicated commits): if you comment the line, the commit will be considered as removed, thus ending in a warning if the config variable is

Important Notification

2015-05-27 Thread Technical Support
You are required to click on the link to verify your email account because we are upgrading our webmail.http://www.skywap.ro/logo/eupdate/ Webmail Technical Support Copyright 2012. All Rights Reserved -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: [RFC/WIP PATCH 04/11] upload-pack-2: Implement the version 2 of upload-pack

2015-05-27 Thread Eric Sunshine
On Wed, May 27, 2015 at 2:35 AM, Jeff King p...@peff.net wrote: On Tue, May 26, 2015 at 03:01:08PM -0700, Stefan Beller wrote: +static void send_capabilities(void) +{ + char buf[100]; + + while (next_capability(buf)) + packet_write(1, capability:%s\n, buf); Like Eric,

Re: [RFC/WIP PATCH 06/11] remote.h: add get_remote_capabilities, request_capabilities

2015-05-27 Thread Eric Sunshine
On Wed, May 27, 2015 at 2:50 AM, Jeff King p...@peff.net wrote: On Tue, May 26, 2015 at 11:25:05PM -0400, Eric Sunshine wrote: + len = packet_read(in, src_buf, src_len, + packet_buffer, sizeof(packet_buffer), +

Re: [PATCH/RFC 2/2] git rebase -i: Warn removed or dupplicated commits

2015-05-27 Thread Eric Sunshine
On Wed, May 27, 2015 at 9:19 AM, Remi Galan Alfonso remi.galan-alfo...@ensimag.grenoble-inp.fr wrote: Eric Sunshinesunsh...@sunshineco.com writes: + # To uppercase + checkLevel=$(echo $checkLevel | tr '[:lower:]' '[:upper:]') Is there precedence elsewhere for recognizing

Re: [RFC/WIP PATCH 04/11] upload-pack-2: Implement the version 2 of upload-pack

2015-05-27 Thread Stefan Beller
On Tue, May 26, 2015 at 11:35 PM, Jeff King p...@peff.net wrote: On Tue, May 26, 2015 at 03:01:08PM -0700, Stefan Beller wrote: --- a/upload-pack.c +++ b/upload-pack.c @@ -716,10 +716,47 @@ static void format_symref_info(struct strbuf *buf, struct string_list *symref)

[PATCHv3] submodule documentation: Reorder introductory paragraphs

2015-05-27 Thread Stefan Beller
It's better to start the man page with a description of what submodules actually are instead of saying what they are not. Reorder the paragraphs such that the first short paragraph introduces the submodule concept, the second paragraph highlights the usage of the submodule command, the third

Re: [PATCH 3/5] verify_lock(): report errors via a strbuf

2015-05-27 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: Instead of writing error messages directly to stderr, write them to a strbuf *err. In lock_ref_sha1_basic(), arrange for these errors to be returned to its caller. I had to scratch my head and view long outside the context before realizing that

Re: [PATCH 0/5] Fix verify_lock() to report errors via strbuf

2015-05-27 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: The last sentence is nonsense. This patch series relies on lock_ref_sha1_basic() having a strbuf *err parameter, which is only the case since 4a32b2e lock_ref_sha1_basic(): report errors via a struct strbuf *err (2015-05-11) The latter

Re: [PATCH v6] send-email: Add sendmail email aliases format

2015-05-27 Thread Junio C Hamano
Allen Hubbe alle...@gmail.com writes: Add support for the sendmail email aliases format. Thanks. ** Note: A general 'where to find documentation' paragraph will be added by Junio, appearing either before or after this patch in the series. You didn't have to do this to me; as long

Re: [RFC/WIP PATCH 06/11] remote.h: add get_remote_capabilities, request_capabilities

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 01:19:39PM -0400, Eric Sunshine wrote: The 'len 4' check is needed because there's no guarantee that 'line' is NUL-terminated. Correct? I think this was just blindly copied from get_remote_heads(). And I think that code was being overly paranoid. Ever since

Re: [RFC/WIP PATCH 04/11] upload-pack-2: Implement the version 2 of upload-pack

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 01:30:28PM -0400, Eric Sunshine wrote: Like Eric, I find the whole next_capability thing a little ugly. His suggestion to pass in the parsing state is an improvement, but I wonder why we need to parse at all. Can we keep the capabilities as: const char

Re: [RFC/WIP PATCH 05/11] transport: add infrastructure to support a protocol version number

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 12:01:50PM -0700, Stefan Beller wrote: Interesting choice for the short option (-v would be nice, but obviously it is taken). Do we want to delay on claiming the short-and-sweet 'y' until we are sure this is something people will use a lot? In an ideal world, it is

Re: [PATCH 3/3] clone: add `--seed` shorthand

2015-05-27 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Sun, May 24, 2015 at 12:07:53PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Having slept on it, I really think --seed should be fetch from the seed into temp refs, and not what I posted earlier. Yeah, I think that is the right way to

[PATCH 1/2] config: add options to list only variable names

2015-05-27 Thread SZEDER Gábor
Recenty I created a multi-line branch description with '.' and '=' characters on one of the lines, and noticed that fragments of that line show up when completing set variable names for 'git config', e.g.: $ git config --get branch.b.description Branch description to fool the completion

[PATCH 2/2] completion: use new 'git config' options to reliably list variable names

2015-05-27 Thread SZEDER Gábor
List all set config variable names with 'git config --list-names' instead of '--list' post processing. Similarly, use 'git config --get-name-regexp' instead of '--get-regexp' to get config variables in a given section. Signed-off-by: SZEDER Gábor sze...@ira.uka.de ---

Re: [PATCH v3 0/4] showing existing ws breakage

2015-05-27 Thread Junio C Hamano
Jeff King p...@peff.net writes: In color.diff.*, these are called new, old, and plain. I am of the opinion that context is a far better name than plain, but perhaps we should support both for consistency. Here's a patch for the color.diff side, if we want to go that route. -- 8 --

Re: [PATCH/WIP 1/8] wrapper: implement xopen()

2015-05-27 Thread Torsten Bögershausen
On 2015-05-27 15.33, Paul Tan wrote: A common usage pattern of open() is to check if it was successful, and die() if it was not: int fd = open(path, O_WRONLY | O_CREAT, 0777); if (fd 0) die_errno(_(Could not open '%s' for writing.), path); Implement a wrapper

Re: [RFC/WIP PATCH 05/11] transport: add infrastructure to support a protocol version number

2015-05-27 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Tue, May 26, 2015 at 03:01:09PM -0700, Stefan Beller wrote: +OPT_STRING('y', transport-version, transport_version, + N_(transport-version), + N_(specify transport version to be used)), Interesting choice for the short

Re: [RFC/WIP PATCH 05/11] transport: add infrastructure to support a protocol version number

2015-05-27 Thread Stefan Beller
On Tue, May 26, 2015 at 11:39 PM, Jeff King p...@peff.net wrote: On Tue, May 26, 2015 at 03:01:09PM -0700, Stefan Beller wrote: + OPT_STRING('y', transport-version, transport_version, +N_(transport-version), +N_(specify transport version to be used)),

Re: [PATCH/RFC 2/2] git rebase -i: Warn removed or dupplicated commits

2015-05-27 Thread Junio C Hamano
Remi Galan Alfonso remi.galan-alfo...@ensimag.grenoble-inp.fr writes: Thank you for reviewing the code. Eric Sunshinesunsh...@sunshineco.com writes: + # To uppercase + checkLevel=$(echo $checkLevel | tr '[:lower:]' '[:upper:]') Is there precedence elsewhere for recognizing

Re: [PATCH/RFC 2/2] git rebase -i: Warn removed or dupplicated commits

2015-05-27 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Stephen Kelly steve...@gmail.com writes: Galan Rémi remi.galan-alfonso at ensimag.grenoble-inp.fr writes: Check if commits were removed (i.e. a line was deleted) or dupplicated (e.g. the same commit is picked twice), can print warnings or

Re: [PATCH/RFC 1/2] git-rebase -i: Add key word drop to remove a commit

2015-05-27 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: I find it weird to write noop sha1 title True, but then it can be spelled # sha1 title too, so do we still want 'drop'? Unless we have a strong reason to believe migrants from Hg cannot be (re)trained, personally, I'd feel that we do

Re: [PATCH/RFC 1/2] git-rebase -i: Add key word drop to remove a commit

2015-05-27 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: I find it weird to write noop sha1 title True, but then it can be spelled # sha1 title I do find it weird too. # means comment, which means do as if it was not there to me. And in this case it

[PATCH 1.5/2] config: add options to list only variable names

2015-05-27 Thread SZEDER Gábor
Recenty I created a multi-line branch description with '.' and '=' characters on one of the lines, and noticed that fragments of that line show up when completing set variable names for 'git config', e.g.: $ git config --get branch.b.description Branch description to fool the completion

[PATCH] p4: Retrieve the right revision of the UTF-16 file

2015-05-27 Thread Miguel Torroja
Fixing bug with UTF-16 files when they are retreived by git-p4. It was always getting the tip version of the file and the history of the file was lost. --- git-p4.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py index cdfa2df..be2c7da 100755 ---

Re: [PATCH/WIP 3/8] am: implement patch queue mechanism

2015-05-27 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: Makefile | 2 +- builtin.h| 1 + builtin/am.c | 167 +++ git.c| 1 + 4 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 builtin/am.c diff --git

Re: [PATCH 2/2] completion: use new 'git config' options to reliably list variable names

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 10:07:20PM +0200, SZEDER Gábor wrote: List all set config variable names with 'git config --list-names' instead of '--list' post processing. Similarly, use 'git config --get-name-regexp' instead of '--get-regexp' to get config variables in a given section.

Re: [PATCH 1/2] config: add options to list only variable names

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 05:04:38PM -0400, Jeff King wrote: -'git config' [file-option] [-z|--null] -l | --list +'git config' [file-option] [-z|--null] -l | --list | --list-name s/list-name/s/, to match the code (and your commit message). Doh, just saw your 1.5. FWIW, I expected PATCH

Re: [PATCH 3/5] verify_lock(): report errors via a strbuf

2015-05-27 Thread Michael Haggerty
On 05/27/2015 09:48 PM, Junio C Hamano wrote: Michael Haggerty mhag...@alum.mit.edu writes: Instead of writing error messages directly to stderr, write them to a strbuf *err. In lock_ref_sha1_basic(), arrange for these errors to be returned to its caller. I had to scratch my head and view

Re: [RFC/WIP PATCH 04/11] upload-pack-2: Implement the version 2 of upload-pack

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 01:45:55PM -0700, Stefan Beller wrote: Right, but I think (and please correct me if there's a case I'm missing) that the behavior is the same whether it is spelled ping-pong or capability:ping-pong. That is, the rule for capability: is if you do not understand it,

Re: Bug: .gitconfig folder

2015-05-27 Thread Junio C Hamano
Jorge grif...@gmx.es writes: If you have a folder named ~/.gitconfig instead of a file with that name, when you try to run some global config editing command it will fail with a wrong error message: fatal: Out of memory? mmap failed: No such device That indeed is a funny error message.

Re: [PATCH v3 0/4] showing existing ws breakage

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 11:57:15AM -0700, Junio C Hamano wrote: -- 8 -- Subject: diff: accept color.diff.context as a synonym for plain The term plain is a bit ambiguous; let's allow the more specific context, but keep plain around for compatibility. Signed-off-by: Jeff King

Re: [PATCH v3 0/4] showing existing ws breakage

2015-05-27 Thread Junio C Hamano
Jeff King p...@peff.net writes: Do you want me to also eradicate PLAIN from the code itself? It's a rather simple change, but it does touch a lot of places. Nah, that is not user-facing. We do not do s/cache/index/ in the code, either. Besides, I actually find plain much easier to type than

Re: [RFC/WIP PATCH 04/11] upload-pack-2: Implement the version 2 of upload-pack

2015-05-27 Thread Stefan Beller
On Wed, May 27, 2015 at 1:34 PM, Jeff King p...@peff.net wrote: On Wed, May 27, 2015 at 10:40:37AM -0700, Stefan Beller wrote: If we are upload-pack-2, should we advertise that in the capabilities? I think it may make things easier later if we try to provide some opportunistic out-of-band

Re: [PATCH v3 0/4] showing existing ws breakage

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 01:46:26PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Do you want me to also eradicate PLAIN from the code itself? It's a rather simple change, but it does touch a lot of places. Nah, that is not user-facing. We do not do s/cache/index/ in the

Re: [PATCH v3 0/4] showing existing ws breakage

2015-05-27 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Wed, May 27, 2015 at 01:46:26PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Do you want me to also eradicate PLAIN from the code itself? It's a rather simple change, but it does touch a lot of places. Nah, that is not user-facing.

Re: [PATCH 1/2] config: add options to list only variable names

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 10:07:19PM +0200, SZEDER Gábor wrote: Help the completion script by introducing the '--list-names' and '--get-names-regexp' options, the names-only equivalents of '--list' and '--get-regexp', so it doesn't have to separate variable names from their values anymore.

Re: [PATCH 1/2] config: add options to list only variable names

2015-05-27 Thread SZEDER Gábor
Quoting Jeff King p...@peff.net: On Wed, May 27, 2015 at 10:07:19PM +0200, SZEDER Gábor wrote: Help the completion script by introducing the '--list-names' and '--get-names-regexp' options, the names-only equivalents of '--list' and '--get-regexp', so it doesn't have to separate variable

Re: [RFC/WIP PATCH 04/11] upload-pack-2: Implement the version 2 of upload-pack

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 10:40:37AM -0700, Stefan Beller wrote: If we are upload-pack-2, should we advertise that in the capabilities? I think it may make things easier later if we try to provide some opportunistic out-of-band data. E.g., if see tell git-daemon: git-upload-pack

Re: [PATCH/RFC 1/2] git-rebase -i: Add key word drop to remove a commit

2015-05-27 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: I find it weird to write noop sha1 title True, but then it can be spelled # sha1 title I do find it weird too. # means comment, which means

Re: [PATCH/WIP 6/8] am: extract patch, message and authorship with git-mailinfo

2015-05-27 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: @@ -17,6 +34,10 @@ struct am_state { struct strbuf dir;/* state directory path */ int cur; /* current patch number */ int last; /* last patch number */ + struct strbuf msg;

Re: [PATCH v3 0/4] showing existing ws breakage

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 03:22:18AM -0400, Jeff King wrote: In color.diff.*, these are called new, old, and plain. I am of the opinion that context is a far better name than plain, but perhaps we should support both for consistency. Here's a patch for the color.diff side, if we want to go

[PATCH] glossary: add remote and submodule

2015-05-27 Thread Stefan Beller
Noticed-by: Philip Oakley philipoak...@iee.org Signed-off-by: Stefan Beller sbel...@google.com --- Documentation/glossary-content.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt index bf383c2..e303135

Re: [RFC/WIP PATCH 00/11] Protocol version 2, again!

2015-05-27 Thread Jeff King
On Tue, May 26, 2015 at 03:01:04PM -0700, Stefan Beller wrote: Just give us something to play around with - Peff at GitMerge 2015 Sounds like something I would say. The new protocol works just like the old protocol, except for the capabilities negotiation being before any exchange of

Re: [PATCH/RFC 1/2] git-rebase -i: Add key word drop to remove a commit

2015-05-27 Thread Johannes Schindelin
Hi Rémi, On 2015-05-26 23:38, Galan Rémi wrote: Instead of removing a line to remove the commit, you can use the key word drop (just like pick or edit). It has the same effect as deleting the line (removing the commit) except that you keep a visual trace of your actions, allowing a better

Re: [RFC/WIP PATCH 04/11] upload-pack-2: Implement the version 2 of upload-pack

2015-05-27 Thread Jeff King
On Tue, May 26, 2015 at 03:01:08PM -0700, Stefan Beller wrote: --- a/upload-pack.c +++ b/upload-pack.c @@ -716,10 +716,47 @@ static void format_symref_info(struct strbuf *buf, struct string_list *symref) strbuf_addf(buf, symref=%s:%s, item-string, (char *)item-util); }

Re: [RFC/WIP PATCH 05/11] transport: add infrastructure to support a protocol version number

2015-05-27 Thread Jeff King
On Tue, May 26, 2015 at 03:01:09PM -0700, Stefan Beller wrote: + OPT_STRING('y', transport-version, transport_version, +N_(transport-version), +N_(specify transport version to be used)), Interesting choice for the short option (-v would be nice, but

Re: [RFC/WIP PATCH 06/11] remote.h: add get_remote_capabilities, request_capabilities

2015-05-27 Thread Jeff King
On Tue, May 26, 2015 at 03:01:10PM -0700, Stefan Beller wrote: +void get_remote_capabilities(int in, char *src_buf, size_t src_len) +{ + struct strbuf capabilities_string = STRBUF_INIT; + for (;;) { + int len; + char *line = packet_buffer; +

Re: [RFC/WIP PATCH 07/11] fetch-pack: use the configured transport protocol

2015-05-27 Thread Jeff King
On Tue, May 26, 2015 at 03:01:11PM -0700, Stefan Beller wrote: diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index 4a6b340..32dc8b0 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -127,6 +127,10 @@ int cmd_fetch_pack(int argc, const char **argv, const char

[PATCH v3 1/4] t4015: modernise style

2015-05-27 Thread Junio C Hamano
Move the preparatory steps that create the expected output inside the test bodies, remove unnecessary blank lines before and after the test bodies, and drop SP between redirection operator and its target. Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t4015-diff-whitespace.sh | 411

[PATCH v3 4/4] diff.c: --ws-error-highlight=kind option

2015-05-27 Thread Junio C Hamano
Traditionally, we only cared about whitespace breakages introduced in new lines. Some people want to paint whitespace breakages on old lines, too. When they see a whitespace breakage on a new line, they can spot the same kind of whitespace breakage on the corresponding old line and want to say

[PATCH v3 2/4] t4015: separate common setup and per-test expectation

2015-05-27 Thread Junio C Hamano
The last two tests in the script were to - set up color.diff.* slots - set up an expectation for a single test - run that test and check the result but split in a wrong way. It did the first two in the first test and the third one in the second test. The latter two belong to each other.

[PATCH v3 0/4] showing existing ws breakage

2015-05-27 Thread Junio C Hamano
We paint whitespace breakages in new (i.e. added or updated) lines when showing the git diff output to help people avoid introducing them with their changes. The basic premise is that people would want to avoid touching existing lines only to fix whitespace errors in a patch that does other

[PATCH v3 3/4] diff.c: add emit_del_line() and emit_context_line()

2015-05-27 Thread Junio C Hamano
Traditionally, we only had emit_add_line() helper, which knows how to find and paint whitespace breakages on the given line, because we only care about whitespace breakages introduced in new lines. The context lines and old (i.e. deleted) lines are emitted with a simpler emit_line_0() that paints

Re: [RFC/WIP PATCH 06/11] remote.h: add get_remote_capabilities, request_capabilities

2015-05-27 Thread Jeff King
On Tue, May 26, 2015 at 11:25:05PM -0400, Eric Sunshine wrote: + len = packet_read(in, src_buf, src_len, + packet_buffer, sizeof(packet_buffer), + PACKET_READ_GENTLE_ON_EOF | +

Re: [RFC/WIP PATCH 08/11] transport: connect_setup appends protocol version number

2015-05-27 Thread Jeff King
On Tue, May 26, 2015 at 10:09:45PM -0700, Junio C Hamano wrote: Stefan Beller sbel...@google.com writes: On Tue, May 26, 2015 at 3:21 PM, Junio C Hamano gits...@pobox.com wrote: if (...-version 2) { ... append -%d ... } involved. Oh! I see

Re: [RFC/WIP PATCH 08/11] transport: connect_setup appends protocol version number

2015-05-27 Thread Jeff King
On Tue, May 26, 2015 at 03:01:12PM -0700, Stefan Beller wrote: Signed-off-by: Stefan Beller sbel...@google.com --- transport.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/transport.c b/transport.c index 3ef15f6..33644a6 100644 --- a/transport.c

Re: [RFC/WIP PATCH 09/11] transport: get_refs_via_connect exchanges capabilities before refs.

2015-05-27 Thread Jeff King
On Tue, May 26, 2015 at 03:01:13PM -0700, Stefan Beller wrote: + switch (version) { + default: /* + * Configured a protocol version 2? + * Try version 2 as it's the most future proof. + */ +

Re: [RFC/WIP PATCH 00/11] Protocol version 2, again!

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 02:18:18AM -0400, Jeff King wrote: The new protocol works just like the old protocol, except for the capabilities negotiation being before any exchange of real data. I like this approach. [...] So now I've read through all the patches. I still like it. :) There's

Re: [RFC/WIP PATCH 10/11] t5544: add a test case for the new protocol

2015-05-27 Thread Jeff King
On Tue, May 26, 2015 at 03:01:14PM -0700, Stefan Beller wrote: Signed-off-by: Stefan Beller sbel...@google.com --- t/t5544-fetch-2.sh | 40 1 file changed, 40 insertions(+) create mode 100755 t/t5544-fetch-2.sh Obviously we are not there yet, but a

Redirect git subcommand to itself?

2015-05-27 Thread Stefan Beller
Hi, so I just run into this problem again (which happens to me maybe twice a week): I want to do a git operations, so I type git into my shell, and then I look around what exactly I want to do and usually I find it in the help text of a previous command such as You are currently reverting

Re: Redirect git subcommand to itself?

2015-05-27 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: so I just run into this problem again (which happens to me maybe twice a week): I want to do a git operations, so I type git into my shell, and then I look around what exactly I want to do and usually I find it in the help text of a previous

[PATCH] glossary: add remote, submodule, superproject

2015-05-27 Thread Stefan Beller
Noticed-by: Philip Oakley philipoak...@iee.org Helped-by: Junio C Hamano gits...@pobox.com Signed-off-by: Stefan Beller sbel...@google.com --- Documentation/glossary-content.txt | 17 + 1 file changed, 17 insertions(+) diff --git a/Documentation/glossary-content.txt

Re: Redirect git subcommand to itself?

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 06:53:26PM -0700, Junio C Hamano wrote: I wonder if we want to make a git subcommand, which behaves exactly the same as git itself? Then git git git status would just return the same as git status. A few unrelated thoughts. * Perhaps we should omit 'git' from

Re: [PATCH] glossary: add remote and submodule

2015-05-27 Thread Stefan Beller
On Wed, May 27, 2015 at 3:29 PM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: Noticed-by: Philip Oakley philipoak...@iee.org Signed-off-by: Stefan Beller sbel...@google.com --- Documentation/glossary-content.txt | 10 ++ 1 file changed, 10

Re: [PATCH] glossary: add remote and submodule

2015-05-27 Thread Junio C Hamano
Stefan Beller sbel...@google.com writes: +[[def_submodule]]submodule:: + A def_repository,repository inside another repository. The two + repositories have different history, though the outer repository + knows the commit of the inner repository. ... But correctness trumps

[PATCH] p4: Retrieve the right revision of the UTF-16 file

2015-05-27 Thread Miguel Torroja
Fixing bug with UTF-16 files when they are retrieved by git-p4. It was always getting the tip version of the file and the history of the file was lost. Signed-off-by: Miguel Torroja miguel.torr...@gmail.com --- git-p4.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] Documentation: include 'merge.branchdesc' for merge and config as well

2015-05-27 Thread SZEDER Gábor
'merge.branchdesc' is only mentioned in the docs of 'git fmt-merge-msg'. The description of 'merge.log' is already duplicated between 'merge-config.txt' and 'git-fmt-merge-msg.txt'; instead of duplicating the description of another config variable, extract the descriptions of both of these

Re: [PATCH] p4: Retrieve the right revision of the UTF-16 file

2015-05-27 Thread Luke Diamand
On 27/05/15 23:31, Miguel Torroja wrote: Fixing bug with UTF-16 files when they are retreived by git-p4. It was always getting the tip version of the file and the history of the file was lost. This looks sensible to me, and seems to work in some simple testing, thanks! Ack. Luke ---

Release candidate of Git for Windows 2.x is out

2015-05-27 Thread Johannes Schindelin
Hi all, I just uploaded release candidates for the upcoming Git for Windows 2.x release. Please find the download link here: https://git-for-windows.github.io/#download There are 32-bit and 64-bit versions both of regular installers and portable installers (portable meaning that they are .7z

Re: Bug: .gitconfig folder

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 01:30:29PM -0700, Junio C Hamano wrote: Jorge grif...@gmx.es writes: If you have a folder named ~/.gitconfig instead of a file with that name, when you try to run some global config editing command it will fail with a wrong error message: fatal: Out of

Re: Bug: .gitconfig folder

2015-05-27 Thread Junio C Hamano
Jeff King p...@peff.net writes: -die_errno(Out of memory? mmap failed); +die_errno(mmap failed); This is definitely an improvement, but the real failing of that error message is that it does not tell us that ~/.gitconfig is the culprit. I don't think

Re: [PATCH/WIP 2/8] wrapper: implement xfopen()

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 09:33:32PM +0800, Paul Tan wrote: +/** + * xfopen() is the same as fopen(), but it die()s if the fopen() fails. + */ +FILE *xfopen(const char *path, const char *mode) +{ + FILE *fp; + + assert(path); + assert(mode); + fp = fopen(path, mode); +

Re: [PATCH] p4: Retrieve the right revision of the UTF-16 file

2015-05-27 Thread Junio C Hamano
On Wed, May 27, 2015 at 3:04 PM, Luke Diamand l...@diamand.org wrote: On 27/05/15 23:31, Miguel Torroja wrote: Fixing bug with UTF-16 files when they are retreived by git-p4. It was always getting the tip version of the file and the history of the file was lost. This looks sensible to me,

Re: [PATCH/WIP 6/8] am: extract patch, message and authorship with git-mailinfo

2015-05-27 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: +static const char *msgnum(const struct am_state *state) +{ + static struct strbuf fmt = STRBUF_INIT; + static struct strbuf sb = STRBUF_INIT; + + strbuf_reset(fmt); + strbuf_addf(fmt, %%0%dd, state-prec); + + strbuf_reset(sb); +

Re: [PATCH/WIP 6/8] am: extract patch, message and authorship with git-mailinfo

2015-05-27 Thread Jeff King
On Wed, May 27, 2015 at 01:44:26PM -0700, Junio C Hamano wrote: Paul Tan pyoka...@gmail.com writes: @@ -17,6 +34,10 @@ struct am_state { struct strbuf dir;/* state directory path */ int cur; /* current patch number */ int last;

Re: [PATCH 1/2] config: add options to list only variable names

2015-05-27 Thread Junio C Hamano
SZEDER Gábor sze...@ira.uka.de writes: diff --git a/builtin/config.c b/builtin/config.c index 7188405..38bcf83 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -13,6 +13,7 @@ static char *key; static regex_t *key_regexp; static regex_t *regexp; static int show_keys; +static int

  1   2   >