Re: [PATCH v7 1/9] connect: document why we sometimes call get_port after get_host_and_port

2016-05-21 Thread Torsten Bögershausen
On 22.05.16 01:17, Mike Hommey wrote: > Signed-off-by: Mike Hommey > --- > connect.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/connect.c b/connect.c > index c53f3f1..caa2a3c 100644 > --- a/connect.c > +++ b/connect.c > @@ -742,6 +742,12 @@ struct child_process *git_connect(i

Re: [PATCH v7 1/9] connect: document why we sometimes call get_port after get_host_and_port

2016-05-21 Thread Eric Sunshine
On Sat, May 21, 2016 at 7:17 PM, Mike Hommey wrote: > Signed-off-by: Mike Hommey > --- > diff --git a/connect.c b/connect.c > @@ -742,6 +742,12 @@ struct child_process *git_connect(int fd[2], const char > *url, > transport_check_allowed("ssh"); > g

Re: Subtree split unsquashes everything

2016-05-21 Thread Joseph Musser
Thanks for the response. I began to wonder if indeed I was using the correct paradigm, since the split operation would leave the subtree prefix as `/` which is an impossible prefix when creating a subtree. Attempting to add a new subtree with prefix `/` results in an error because the prefix direc

Re: t0008 test fails with ksh

2016-05-21 Thread Jeff King
On Fri, May 20, 2016 at 09:03:31AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > ... However, > > the double-quote character ( '"' ) shall not be treated specially > > within a here-document, except when the double-quote appears within > > "$()", "``", or "${}". > > > > So OK, t

Re: [PATCH] t0008: 4 tests fail with ksh88

2016-05-21 Thread Jeff King
On Fri, May 20, 2016 at 08:16:43AM -0700, Junio C Hamano wrote: > > Acked-by: Jeff King > > I didn't see him acking this exact version, so if you didn't include > this line here, I would have missed it. Thanks. I don't think I ever saw an actual patch to ack until now; I just said the idea see

Re: [PATCH] contrib/subtree: add repo url to commit messages

2016-05-21 Thread David A. Greene
Mathias Nyman writes: > For recalling where a subtree came from; git-subtree operations 'add' > and 'pull', when called with the parameter add this to the > commit message: > git-subtree-repo: I am sorry it tooks a couple of months to respond. I am finally coming up for air at work. What

Re: Subtree split unsquashes everything

2016-05-21 Thread David A. Greene
Joseph Musser writes: > I ran `git subtree split -P=subdir/subdir/ -b newbranch` and the > outcome seems to be perfect except that each squash merge has turned > into a full merge, bringing along all history from the other repo. Why > does it do this and how can I preserve my repo history, includ

[PATCH v7 5/9] connect: group CONNECT_DIAG_URL handling code

2016-05-21 Thread Mike Hommey
Previous changes made both branches handling CONNECT_DIAG_URL identical. We can now remove one of those branches and have CONNECT_DIAG_URL be handled in one place. Signed-off-by: Mike Hommey --- connect.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/connec

[PATCH v7 3/9] connect: re-derive a host:port string from the separate host and port variables

2016-05-21 Thread Mike Hommey
The last uses of the hostandport variable, besides being strdup'ed before being split into host and port, is to fill the host header in the git protocol and to test whether to proxy the request. Instead of relying on parse_connect_url() to return a host:port string that makes sense there, re-deriv

[PATCH v7 7/9] connect: change the --diag-url output to separate user and host

2016-05-21 Thread Mike Hommey
Signed-off-by: Mike Hommey --- connect.c | 6 ++ t/t5500-fetch-pack.sh | 14 -- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/connect.c b/connect.c index 48d9cd2..52d34c7 100644 --- a/connect.c +++ b/connect.c @@ -710,10 +710,8 @@ struct child_proces

[PATCH v7 2/9] connect: call get_host_and_port() earlier

2016-05-21 Thread Mike Hommey
Currently, get_host_and_port() is called in git_connect() for the ssh protocol, and in git_tcp_connect_sock() for the git protocol. Instead of doing this, just call it from a single place, right after parse_connect_url(), and pass the host and port separately to git_*_connect() functions. We howev

[PATCH v7 4/9] connect: make parse_connect_url() return separated host and port

2016-05-21 Thread Mike Hommey
Now that nothing besides CONNECT_DIAG_URL is using hostandport, we can have parse_connect_url() itself do the host and port splitting. This still leaves "user@" part of the host, if there is one, which will be addressed in a subsequent change. This however does add /some/ handling of the "user@" p

[PATCH v7 9/9] connect: move ssh command line preparation to a separate function

2016-05-21 Thread Mike Hommey
Signed-off-by: Mike Hommey --- connect.c | 108 +- 1 file changed, 58 insertions(+), 50 deletions(-) diff --git a/connect.c b/connect.c index 04ce210..ddfda4e 100644 --- a/connect.c +++ b/connect.c @@ -680,6 +680,61 @@ static enum proto

[PATCH v7 8/9] connect: actively reject git:// urls with a user part

2016-05-21 Thread Mike Hommey
Currently, urls of the for git://user@host don't work because user@host is not resolving at the DNS level, but we shouldn't be relying on it being an invalid host name, and actively reject it for containing a username in the first place. Signed-off-by: Mike Hommey --- connect.c | 3 +++ 1 file c

[PATCH v7 6/9] connect: make parse_connect_url() return the user part of the url as a separate value

2016-05-21 Thread Mike Hommey
Signed-off-by: Mike Hommey --- connect.c | 51 ++- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/connect.c b/connect.c index c0fad4f..48d9cd2 100644 --- a/connect.c +++ b/connect.c @@ -588,11 +588,13 @@ static char *get_port(char *

[PATCH v7 0/9] connect: various cleanups

2016-05-21 Thread Mike Hommey
Difference with v6: - Dropped the core.gitProxy change as per discussion. - Added a comment about the extra get_port. Note that after this series, parse_connect_url can be further refactored to avoid the kind of back-and-forth with host_end, get_host_and_port and get_port. Mike Hommey (9): conn

[PATCH v7 1/9] connect: document why we sometimes call get_port after get_host_and_port

2016-05-21 Thread Mike Hommey
Signed-off-by: Mike Hommey --- connect.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/connect.c b/connect.c index c53f3f1..caa2a3c 100644 --- a/connect.c +++ b/connect.c @@ -742,6 +742,12 @@ struct child_process *git_connect(int fd[2], const char *url, transp

Re: Subtree Split Includes Commits Outside Prefix Directory

2016-05-21 Thread David A. Greene
ELI writes: > I then reviewed the commit history of contrib/subtree/git-subtree.sh > and determined that the last successful subtree push was performed > prior to the integration of this change: > https://git.kernel.org/cgit/git/git.git/commit/contrib/subtree/git-subtree.sh?id=933cfeb90b5d03b4096

Re: Git subtree stumbles over annotated tags

2016-05-21 Thread David A. Greene
Gregor Jasny writes: > Hello, > > On 10/03/16 16:51, Gregor Jasny wrote: >> today I discovered that it's a bad idea to "git subtree pull" from an >> annotated tag. This issue got discussed in those two threads: >> >> http://comments.gmane.org/gmane.comp.version-control.git/247503> >> http://comm

Re: [PATCH 0/3] subtree: add 'git-subtree-repo' and list command

2016-05-21 Thread David A. Greene
Nicola Paolucci writes: > To my knowledge 'git subtree' currently lacks a way to > track where injected repositories come from originally. > Adding this information allows for useful extensions to > the command and makes it easier to use subtrees to track > external dependencies. Thanks for wor

[PATCH 4/5] diff: don't include common trailing empty lines with -W

2016-05-21 Thread René Scharfe
Empty lines between functions are shown by diff -W, as it considers them to be part of the function preceding them. They are not interesting in most languages. The previous patch stopped showing them in the special case of a function added at the end of a file. Stop extending context to those em

[PATCH 5/5] grep: don't extend context to trailing empty lines with -W

2016-05-21 Thread René Scharfe
Empty lines between functions are shown by grep -W, as it considers them to be part of the function preceding them. They are not interesting in most languages. The previous patches stopped showing them for diff -W. Stop showing empty lines trailing a function with grep -W. Grep scans the lines

[PATCH 3/5] diff: ignore empty lines before added functions with -W

2016-05-21 Thread René Scharfe
If a new function and a preceding empty line is appended, diff -W shows the previous function in full in order to provide context for that empty line. In most languages empty lines between sections are not interesting in and off themselves and showing a whole extra function for them is not what w

[PATCH 2/5] diff: handle appended chunks better with -W

2016-05-21 Thread René Scharfe
If lines are added at the end of a file, diff -W shows the whole file. That's because get_func_line() only considers the pre-image and gives up if it sees a record index beyond its end. Consider the post-image as well to see if the added lines already make up a full function. If it doesn't then s

[PATCH 1/5] diff: factor out match_func_rec()

2016-05-21 Thread René Scharfe
Add match_func_rec(), a helper that wraps accessing a record and calling the appropriate function for checking if it contains a function line. Signed-off-by: Rene Scharfe --- We'll use it in the next patch. A follow-up patch could inline def_ff() into it. xdiff/xemit.c | 15 +++ 1

Re: [Bug?] log -p -W showing the whole file for a patch that adds to the end?

2016-05-21 Thread René Scharfe
Am 11.05.2016 um 00:51 schrieb Junio C Hamano: > The helper function get_func_line() however gets confused when a > hunk adds a new function at the very end, and returns -1 to signal > that it did not find a suitable "function header line", i.e. the > beginning of previous function. The caller the

Mac OS Git non-interactive shell problem

2016-05-21 Thread Shannon Pekary
I recently had a problem with SmartGIt that I think is related to the Mac version of the Git install, or perhaps git itself. Its hard for me to tell. Here is the recreation steps: - Install a clean El Capitan - Install the latest SmartGit - Install the latest Mac OS Git from the Git website - en

Re: [PATCH 14/21] i18n: rebase-interactive: mark strings for translation

2016-05-21 Thread Vasco Almeida
Às 12:57 de 21-05-2016, Ævar Arnfjörð Bjarmason escreveu: > On Wed, May 18, 2016 at 5:27 PM, Vasco Almeida wrote: >> > Mark strings in git-rebase--interactive.sh for translation. There is no >> > need to source git-sh-i18n since git-rebase.sh already does so. > Cool, thanks for working on this. >

Re: [PATCH 05/21] i18n: sequencer: mark entire sentences for translation

2016-05-21 Thread Ævar Arnfjörð Bjarmason
On Wed, May 18, 2016 at 11:02 PM, Vasco Almeida wrote: > Às 19:28 de 18-05-2016, Eric Sunshine escreveu: >> On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida >> wrote: >>> Mark entire sentences of error message rather than assembling one using >>> placeholders (e.g. "Cannot %s during a %s"). That

Re: [PATCH 14/21] i18n: rebase-interactive: mark strings for translation

2016-05-21 Thread Ævar Arnfjörð Bjarmason
On Wed, May 18, 2016 at 5:27 PM, Vasco Almeida wrote: > Mark strings in git-rebase--interactive.sh for translation. There is no > need to source git-sh-i18n since git-rebase.sh already does so. Cool, thanks for working on this. > --- a/git-rebase--interactive.sh > +++ b/git-rebase--interactive.s

[PATCH v7 2/2] convert: ce_compare_data() checks for a sha1 of a path

2016-05-21 Thread tboegi
From: Torsten Bögershausen To compare a file in working tree with the index, convert_to_git() is used, the result is hashed and the hash value compared with ce->sha1. Deep down would_convert_crlf_at_commit() is invoked, to check if CRLF are converted or not. The "new safer autocrlf handling" che

[PATCH v7 1/2] read-cache: factor out get_sha1_from_index() helper

2016-05-21 Thread tboegi
From: Torsten Bögershausen Factor out the retrieval of the sha1 for a given path in read_blob_data_from_index() into the function get_sha1_from_index(). This will be used in the next commit, when convert.c can do the analyze for "text=auto" without slurping the whole blob into memory at once. A