Re: [PATCH v2 3/6] match_basename: use strncmp instead of strcmp

2013-03-09 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > strncmp is provided length information which could be taken advantage > by the underlying implementation. I may be missing something fundamental, but I somehow find the above does not make any sense. strcmp(a, b) has to pay attention to NUL in these strings and s

Re: Memory corruption when rebasing with git version 1.8.1.5 on arch

2013-03-09 Thread Jeff King
On Sat, Mar 09, 2013 at 11:54:36AM +0100, Bernhard Posselt wrote: > >Also, I can almost reproduce here, as PatrickHeller/core.git is public. > >However, I suspect the problem is particular to your work built on top, > >which looks like it is at commit 0525bbd73c9015499ba92d1ac654b980aaca35b2. > >I

Re: [PATCH] format-patch: RFC 2047 says multi-octet character may not be split

2013-03-09 Thread Kirill Smelkov
On Sat, Mar 09, 2013 at 11:07:19AM -0800, Junio C Hamano wrote: > Kirill Smelkov writes: > > P.S. sorry for the delay - I harmed my arm yesterday. > > Ouch. Take care and be well soon. Thanks, and thanks fr accepting the patch. -- To unsubscribe from this list: send the line "unsubscribe git" in

[PATCH v2 6/6] exclude: filter patterns by directory level

2013-03-09 Thread Nguyễn Thái Ngọc Duy
A non-basename pattern that does not contain /**/ can't match anything outside the attached directory. Record its directory level and avoid matching unless the pathname is also at the same directory level. This optimization shines when there are a lot of non-basename patterns are the root .gitigno

[PATCH v2 5/6] dir.c: pass pathname length to last_exclude_matching

2013-03-09 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- dir.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dir.c b/dir.c index 7b6a625..880b5e6 100644 --- a/dir.c +++ b/dir.c @@ -764,9 +764,9 @@ int is_excluded_from_list(const char *pathname, */ static struct exclude *l

[PATCH v2 4/6] match_{base,path}name: replace strncmp_icase with strnequal_icase

2013-03-09 Thread Nguyễn Thái Ngọc Duy
We could also optimize for ignore_case, assuming that non-ascii characters are not used in most repositories. We could check that all patterns and pathnames are ascii-only, then use git's toupper() before after user0m0.516s0m0.433s user0m0.523s0m0.437s user0m0.532s

[PATCH v2 2/6] dir.c: inline convenient *_icase helpers

2013-03-09 Thread Nguyễn Thái Ngọc Duy
Like the previous patch, this cuts down the number of str*cmp calls in read_directory (which does _a lot_). Again sorted results on webkit.git: before after user0m0.554s0m0.548s user0m0.564s0m0.549s user0m0.571s0m0.554s user0m0.576s0m0.557s user0m0.

[PATCH v2 3/6] match_basename: use strncmp instead of strcmp

2013-03-09 Thread Nguyễn Thái Ngọc Duy
strncmp is provided length information which could be taken advantage by the underlying implementation. Even better, we need to check if the lengths are equal before calling strncmp, eliminating a bit of strncmp calls. before after user0m0.548s0m0.516s user0m0.549s0m0.

[PATCH v2 1/6] match_pathname: avoid calling strncmp if baselen is 0

2013-03-09 Thread Nguyễn Thái Ngọc Duy
This reduces "git status" user time by a little bit. This is the sorted results of 10 consecutive runs of "git ls-files --exclude-standard -o" on webkit.git, compiled with gcc -O2: before after user0m0.607s0m0.554s user0m0.613s0m0.564s user0m0.613s0m0.571s user

[PATCH v2 0/6] Exclude optimizations

2013-03-09 Thread Nguyễn Thái Ngọc Duy
v2 includes strncmp_equal and directory level pattern filter. user time of "git ls-files --exclude-standard -o" on webkit.git below. Looking pretty good. before after user0m0.607s0m0.365s user0m0.613s0m0.366s user0m0.613s0m0.374s user0m0.621s0m0.374s us

Re: [PATCH 2/2] shell: new no-interactive-login command to print a custom message

2013-03-09 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Nieder writes: >> If I disable git-shell's interactive mode by removing the >> ~/git-shell-commands directory, attempts to use 'ssh' in produce a >> message intended for the administrator: > > Sorry, but -ECANTPARSE. s/in produce/produces/ perhaps? Or if you > m

Re: [PATCH 2/2] shell: new no-interactive-login command to print a custom message

2013-03-09 Thread Junio C Hamano
Jonathan Nieder writes: > If I disable git-shell's interactive mode by removing the > ~/git-shell-commands directory, attempts to use 'ssh' in produce a > message intended for the administrator: Sorry, but -ECANTPARSE. s/in produce/produces/ perhaps? Or if you meant "ssh in" as a verb, then "a

Re: [PATCH v2 2/3] mergetools/p4merge: create a base if none available

2013-03-09 Thread Junio C Hamano
Kevin Bracey writes: > diff --git a/git-sh-setup.sh b/git-sh-setup.sh > index 795edd2..aa9a732 100644 > --- a/git-sh-setup.sh > +++ b/git-sh-setup.sh > @@ -249,6 +249,19 @@ clear_local_git_env() { > unset $(git rev-parse --local-env-vars) > } > > +# Generate a virtual base file for a two

Re: [PATCH v2] git.c: Remove unnecessary new line

2013-03-09 Thread Michael Fallows
On 10/03/13 00:00, Jonathan Nieder wrote: Hi, Michael Fallows wrote: --- a/git.c +++ b/git.c @@ -316,8 +316,7 @@ static void handle_internal_command(int argc, const char **argv) { "check-ignore", cmd_check_ignore, RUN_SETUP | NEED_WORK_TREE }, { "check-ref-for

[PATCH v2 2/3] mergetools/p4merge: create a base if none available

2013-03-09 Thread Kevin Bracey
Originally, with no base, Git gave P4Merge $LOCAL as a dummy base: p4merge "$LOCAL" "$LOCAL" "$REMOTE" "$MERGED" Commit 0a0ec7bd changed this to: p4merge "empty file" "$LOCAL" "$REMOTE" "$MERGED" to avoid the problem of being unable to save in some circumstances with similar inputs. Unfo

Re: [PATCH v2] git.c: Remove unnecessary new line

2013-03-09 Thread Jonathan Nieder
Hi, Michael Fallows wrote: > --- a/git.c > +++ b/git.c > @@ -316,8 +316,7 @@ static void handle_internal_command(int argc, const char > **argv) > { "check-ignore", cmd_check_ignore, RUN_SETUP | NEED_WORK_TREE > }, > { "check-ref-format", cmd_check_ref_format }, >

[PATCH 2/2] setup.c: Check that the pathspec magic ends with ")"

2013-03-09 Thread Andrew Wong
The previous code allowed the ")" to be optional. Signed-off-by: Andrew Wong --- setup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.c b/setup.c index f4c4e73..5ed2b93 100644 --- a/setup.c +++ b/setup.c @@ -225,8 +225,9 @@ static const char *prefix_pathspec(con

[PATCH 1/2] setup.c: Fix prefix_pathspec from looping pass end of string

2013-03-09 Thread Andrew Wong
The previous code was assuming length ends at either ")" or ",", and was not handling the case where strcspn returns length due to end of string. So specifying ":(top" as pathspec will cause the loop to go pass the end of string. Signed-off-by: Andrew Wong --- setup.c | 6 -- 1 file changed,

[PATCH] git.c: Remove unnecessary new line

2013-03-09 Thread Michael Fallows
>From 8750dc231a2b973efa18aff4dbc5b2ace7c79c47 Mon Sep 17 00:00:00 2001 From: Michael Fallows Date: Sat, 9 Mar 2013 21:47:11 + Subject: [PATCH] git.c: Remove unnecessary new line New line on checkout-index is inconsistent with the rest of the commands Signed-off-by: Michael Fallows --- git

[PATCH v2] git.c: Remove unnecessary new line

2013-03-09 Thread Michael Fallows
New line on checkout-index is inconsistent with the rest of the commands Signed-off-by: Michael Fallows --- git.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git.c b/git.c index b10c18b..b4d7bbb 100644 --- a/git.c +++ b/git.c @@ -316,8 +316,7 @@ static void handle_in

[PATCH] git.c: Remove unnecessary new line

2013-03-09 Thread Michael Fallows
New line on checkout-index is inconsistent with the rest of the commands Signed-off-by: Michael Fallows --- git.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/git.c b/git.c index b10c18b..b4d7bbb 100644 --- a/git.c +++ b/git.c @@ -316,8 +316,7 @@ static void handle_i

[PATCH 2/2] shell: new no-interactive-login command to print a custom message

2013-03-09 Thread Jonathan Nieder
If I disable git-shell's interactive mode by removing the ~/git-shell-commands directory, attempts to use 'ssh' in produce a message intended for the administrator: $ ssh git@myserver fatal: Interactive git shell is not enabled. hint: ~/git-shell-commands should exist and h

[PATCH 1/2] shell doc: emphasize purpose and security model

2013-03-09 Thread Jonathan Nieder
The original git-shell(1) manpage emphasized that the shell supports only git transport commands. As the shell gained features, that emphasis and focus in the manual has been lost. Bring it back by splitting the manpage into a few short sections and fleshing out each: - SYNOPSIS, describing how

[PATCH v3 0/2] shell: allow 'no-interactive-login' command to disable interactive shell

2013-03-09 Thread Jonathan Nieder
Hi again, Here's a reroll along the lines described at http://thread.gmane.org/gmane.comp.version-control.git/216229 As before, this series is meant to give users of basic 'git shell' setups a chance to imitate some nice behaviors that GitHub and gitolite offer in more complicated ways. Thanks f

Re: Segfault in git 1.8.1.5

2013-03-09 Thread Strasser Pablo
On Saturday 09 March 2013 13.16:35 Junio C Hamano wrote: > Strasser Pablo writes: > > I segfault with the following command: > > > > git checkout HEAD~1 > > git branch -u origin/master > > A patch to address this in cooking in 'next', and is expected to be > in 1.8.2.1 or later. Ok thanks. -- T

Re: Segfault in git 1.8.1.5

2013-03-09 Thread Junio C Hamano
Strasser Pablo writes: > I segfault with the following command: > > git checkout HEAD~1 > git branch -u origin/master A patch to address this in cooking in 'next', and is expected to be in 1.8.2.1 or later. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a messag

Re: Segfault in git 1.8.1.5

2013-03-09 Thread Dennis Kaarsemaker
On za, 2013-03-09 at 21:16 +0100, Strasser Pablo wrote: > Hello, > > I segfault with the following command: > > git checkout HEAD~1 > git branch -u origin/master > > I think it's because i'm in detached head. > A error message like cannot use this command in would be a better responce > than a

[PATCH v2 0/3] Improve P4Merge mergetool invocation

2013-03-09 Thread Kevin Bracey
Incorporated comments on the previous patches, and one new patch addressing a problem I spotted while testing git-merge-one-file. I couldn't figure out how to use git diff to achieve the effect of the external diff here - we'd need some alternative to achieve what it does with the -L option, and I

Re: [PATCH 01/19] spell checking

2013-03-09 Thread Jonathan Nieder
Paul Campbell wrote: > Four of the eight original authors now have dead email addresses. As I > found out when I started getting the mail bounces when I started > sending these patches out. Would it be acceptable for those patches to > leave the From line, add a Based-on-patch-by and then sign of

Segfault in git 1.8.1.5

2013-03-09 Thread Strasser Pablo
Hello, I segfault with the following command: git checkout HEAD~1 git branch -u origin/master I think it's because i'm in detached head. A error message like cannot use this command in would be a better responce than a segfault. Good day. -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH 01/19] spell checking

2013-03-09 Thread Paul Campbell
On Sat, Mar 9, 2013 at 7:45 PM, Junio C Hamano wrote: > Paul Campbell writes: > >> From 72fc84b6e5085b328cc90e664c9f85a1f5cde36c Mon Sep 17 00:00:00 2001 >> From: Paul Cartwright >> Date: Thu, 27 Jan 2011 22:33:06 +0800 >> Subject: [PATCH 01/19] spell checking >> >> --- >> contrib/subtree/git-s

Re: [PATCH 01/19] spell checking

2013-03-09 Thread Junio C Hamano
Paul Campbell writes: > From 72fc84b6e5085b328cc90e664c9f85a1f5cde36c Mon Sep 17 00:00:00 2001 > From: Paul Cartwright > Date: Thu, 27 Jan 2011 22:33:06 +0800 > Subject: [PATCH 01/19] spell checking > > --- > contrib/subtree/git-subtree.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH 19/19] Fix some trailing whitespace

2013-03-09 Thread Paul Campbell
>From 54d376c3d731ce9e528fe9095ea6c16d382b5ce3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:36:22 + Subject: [PATCH 19/19] Fix some trailing whitespace Conflicts: contrib/subtree/.gitignore contrib/subtree/git-subtree.sh contrib/subtree/test.sh

[PATCH 18/19] Added --force option to push

2013-03-09 Thread Paul Campbell
>From ae7c05bdc6d02fa89deabb59cec6150308f227f7 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:35:42 + Subject: [PATCH 18/19] Added --force option to push Conflicts: contrib/subtree/git-subtree.sh Original-Author: James Roper Conflicts-resolved-by: Paul Campbel

[PATCH 17/19] Document list command

2013-03-09 Thread Paul Campbell
>From fed80cb47dffcb805a7808e8574dda44992363b0 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:35:18 + Subject: [PATCH 17/19] Document list command Conflicts: git-subtree.sh Original-Author: Herman van Rink Conflicts-resolved-by: Paul Campbell --- contrib/sub

[PATCH 16/19] Update SYNOPSIS

2013-03-09 Thread Paul Campbell
>From 6024d877e6c3beebe4c11bd060553d06af422680 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:34:54 + Subject: [PATCH 16/19] Update SYNOPSIS Conflicts: contrib/subtree/git-subtree.txt Original-Author: Herman van Rink Conflicts-resolved-by: Paul Campbell ---

[PATCH 15/19] Document from-submodule and prune commands

2013-03-09 Thread Paul Campbell
>From 6dc8119a7d99f7107e32f2c5d7ec18b9fd93a6b8 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 27 Mar 2012 14:14:54 +0200 Subject: [PATCH 15/19] Document from-submodule and prune commands --- contrib/subtree/git-subtree.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH v2 3/3] git-merge-one-file: revise merge error reporting

2013-03-09 Thread Kevin Bracey
Commit 718135e improved the merge error reporting for the resolve strategy's merge conflict and permission conflict cases, but led to a malformed "ERROR: in myfile.c" message in the case of a file added differently. This commit reverts that change, and uses an alternative approach without this fl

[PATCH 14/19] Document pull-all and push-all

2013-03-09 Thread Paul Campbell
>From 7dcd40ab8687a588b7b0c6ff914a7cfb601b6774 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 27 Mar 2012 13:59:16 +0200 Subject: [PATCH 14/19] Document pull-all and push-all --- contrib/subtree/git-subtree.txt | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a

[PATCH 13/19] from-submodule: add url to .gittrees

2013-03-09 Thread Paul Campbell
>From e1b71e3bf8abaea424972d13ba028b911b07d85a Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:34:31 + Subject: [PATCH 13/19] from-submodule: add url to .gittrees Conflicts: git-subtree.sh Original-Author: Herman van Rink Conflicts-resolved-by: Paul Campbell -

[PATCH 12/19] Remove trailing slash from prefix parameter

2013-03-09 Thread Paul Campbell
>From d4aa87f53b61481d2f916415f0baec527a8b6417 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:34:10 + Subject: [PATCH 12/19] Remove trailing slash from prefix parameter Conflicts: git-subtree.sh Original-Author: Herman van Rink Conflicts-resolved-by: Paul Camp

[PATCH 11/19] Add prune command to OPTS_SPEC

2013-03-09 Thread Paul Campbell
>From 48e77d62e05582e2aec4c634a913f28f3f804a37 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:33:50 + Subject: [PATCH 11/19] Add prune command to OPTS_SPEC Conflicts: git-subtree.sh Original-Author: Herman van Rink Conflicts-resolved-by: Paul Campbell --- co

[PATCH 10/19] 'prune' command to clear out stale .gittrees info

2013-03-09 Thread Paul Campbell
>From 1aaa55ff64b3b4d9325568b3bb863748f20c80f3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:33:33 + Subject: [PATCH 10/19] 'prune' command to clear out stale .gittrees info Conflicts: git-subtree.sh Original-Author: Nate Jones Conflicts-resolved-by: Paul Cam

[PATCH 09/19] Adding a "list" command

2013-03-09 Thread Paul Campbell
>From ca1c855c032d88159ed878f68ef2e18640bbd49c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:33:12 + Subject: [PATCH 09/19] Adding a "list" command Conflicts: git-subtree.sh Original-Author: mhoffman Conflicts-resolved-by: Paul Campbell --- contrib/subtree/

[PATCH 08/19] fixing typo

2013-03-09 Thread Paul Campbell
>From 8f6eb2ddfcaef888dc3d3ea4d089aa2e9cad5d0f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:32:53 + Subject: [PATCH 08/19] fixing typo Conflicts: git-subtree.sh Add diff command Original-Author: mhoffman Conflicts-resolved-by: Paul Campbell --- contrib/su

[PATCH 07/19] Added check to ensure that split succeeds before trying to push

2013-03-09 Thread Paul Campbell
>From ef4d4081474bd9925b60c2ab856260d9174220b9 Mon Sep 17 00:00:00 2001 From: mhart Date: Sun, 16 Oct 2011 00:16:53 +1100 Subject: [PATCH 07/19] Added check to ensure that split succeeds before trying to push --- contrib/subtree/git-subtree.sh | 7 ++- 1 file changed, 6 insertions(+), 1 del

[PATCH 06/19] merging change from nresni

2013-03-09 Thread Paul Campbell
>From b6c810480547966c73bcaaea4c069fe73dacbc05 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:32:24 + Subject: [PATCH 06/19] merging change from nresni manual merge at the moment...i'll try a proper merge next now that formatting is cleaner Conflicts: git-subtr

[PATCH 05/19] A number of changes to push_all and pull_all:

2013-03-09 Thread Paul Campbell
>From 10f2260165d6be3a6ab477ed38fd8ab0308c11e6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:31:59 + Subject: [PATCH 05/19] A number of changes to push_all and pull_all: * adding commands in "add" to populate the .gittrees file * changing underscores to dashes (push_al

[PATCH 04/19] new commands: pull_all and push_all

2013-03-09 Thread Paul Campbell
>From 7e20edee694cbcbac79be4fbe37d9cedebe3e4ee Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:31:37 + Subject: [PATCH 04/19] new commands: pull_all and push_all Conflicts: contrib/subtree/git-subtree.sh Original-Author: bibendi Conflicts-resolved-by: Paul Camp

[PATCH 03/19] Use .gittrees config file like a .gitmodules when pull or push

2013-03-09 Thread Paul Campbell
>From 92787322c6e0e8c9166f02f98a71b6e0af9dc405 Mon Sep 17 00:00:00 2001 From: bibendi Date: Fri, 20 May 2011 00:15:53 +0600 Subject: [PATCH 03/19] Use .gittrees config file like a .gitmodules when pull or push --- contrib/subtree/git-subtree.sh | 31 +-- 1 file chang

[PATCH v2 1/3] mergetools/p4merge: swap LOCAL and REMOTE

2013-03-09 Thread Kevin Bracey
Reverse LOCAL and REMOTE when invoking P4Merge as a mergetool, so that the incoming branch is now in the left-hand, blue triangle pane, and the current branch is in the right-hand, green circle pane. This change makes use of P4Merge consistent with its built-in help, its reference documentation, a

[PATCH 02/19] Add from-submodule. Conflicts: .gitignore contrib/subtree/git-subtree.sh test.sh

2013-03-09 Thread Paul Campbell
>From 718c99d167255b28830b6f684d6e6e184fba0f7c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 9 Mar 2013 18:30:20 + Subject: [PATCH 02/19] Add from-submodule. Conflicts: .gitignore contrib/subtree/git-subtree.sh test.sh Original-Author: Peter Jaros Conflicts-resolved-by:

[PATCH 01/19] spell checking

2013-03-09 Thread Paul Campbell
>From 72fc84b6e5085b328cc90e664c9f85a1f5cde36c Mon Sep 17 00:00:00 2001 From: Paul Cartwright Date: Thu, 27 Jan 2011 22:33:06 +0800 Subject: [PATCH 01/19] spell checking --- contrib/subtree/git-subtree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/subtree/git-su

[PATCH 0/19] git-subtree updates

2013-03-09 Thread Paul Campbell
The following set of commits are taken from the collection collated by Herman van Rink and offered to the list in May of last year ($gmane/196667). Where updating a commit to resolve a conflict has cleared the original author of the commit I've noted the original author in the commit message. Thus

Re: rebase: strange failures to apply patc 3-way

2013-03-09 Thread Andrew Wong
On 03/09/13 13:32, Andrew Wong wrote: > Yea, that's really suspicious. This could mean there's an issue with > when git is checking the index. Try running these a couple times in a > clean work tree: > $ git update-index --refresh > $ git diff-files > > In a clean work tree, these commands

Re: rebase: strange failures to apply patc 3-way

2013-03-09 Thread Andrew Wong
On 03/09/13 06:26, Max Horn wrote: > It tends to fail in separate places, but eventually "stabilizes". E.g. I just > did a couple test rebases, and it failed twice in commit 14, then the third > time in commit 15 (which underlines once more that the failures are > inappropriate). > > The fourth

Re: [PATCH/RFC] Changing submodule foreach --recursive to be depth-first, --parent option to execute command in supermodule as well

2013-03-09 Thread Jens Lehmann
Am 05.03.2013 22:17, schrieb Phil Hord: > On Tue, Mar 5, 2013 at 3:51 PM, Jens Lehmann wrote: >> Am 05.03.2013 19:34, schrieb Junio C Hamano: >>> Eric Cousineau writes: ... >>> I am not entirely convinced we would want --include-super in the >>> first place, though. It does not belong to "s

Re: Merging submodules - best merge-base

2013-03-09 Thread Jens Lehmann
Am 07.03.2013 19:59, schrieb Heiko Voigt: > On Thu, Mar 07, 2013 at 10:49:09AM +0100, Daniel Bratell wrote: >> Den 2013-03-06 19:12:05 skrev Heiko Voigt : >> >>> On Mon, Feb 25, 2013 at 05:44:05PM +0100, Daniel Bratell wrote: A submodule change can be merged, but only if the merge is a "f

Re: [PATCH] format-patch: RFC 2047 says multi-octet character may not be split

2013-03-09 Thread Kirill Smelkov
On Sat, Mar 09, 2013 at 07:27:23PM +0400, Kirill Smelkov wrote: > 8< > From: Kirill Smelkov > split Sorry for the confusion... 8< From: Kirill Smelkov Even though an earlier attempt (bafc478..41dd00bad) cleaned up RFC 2047 encoding, pretty.c::add_rfc2047() still decides wh

[PATCH] perf: update documentation of GIT_PERF_REPEAT_COUNT

2013-03-09 Thread Antoine Pelisse
Currently the documentation of GIT_PERF_REPEAT_COUNT says the default is five while "perf-lib.sh" uses a value of three as a default. Update the documentation so that it is consistent with the code. Signed-off-by: Antoine Pelisse --- t/perf/README |2 +- 1 file changed, 1 insertion(+), 1 de

Re: [PATCH] format-patch: RFC 2047 says multi-octet character may not be split

2013-03-09 Thread Kirill Smelkov
On Thu, Mar 07, 2013 at 10:05:30AM -0800, Junio C Hamano wrote: > Kirill Smelkov writes: > > >> > @@ -367,16 +376,18 @@ static void add_rfc2047(struct strbuf *sb, const > >> > char *line, int len, > >> > * causes ' ' to be encoded as '=20', avoiding this > >> > problem. > >> >

rebase --merge question

2013-03-09 Thread Stijn Souffriau
Hi all, From help rebase: --merge Use merging strategies to rebase. When the recursive (default) merge strategy is used, this allows rebase to be aware of renames on the upstream side. Renames of what? Files I assume. Are there any disadvantages compared to the normal rebase? If not, why i

[ANNOUNCE] TopGit 0.9

2013-03-09 Thread Robin Green
Hello, I'm pleased to announce that TopGit 0.9 was released today. TopGit aims to make handling of large amounts of interdependent topic branches easier. In fact, it is designed especially for the case where you maintain a queue of third-party patches on top of another (perhaps Git-controlled) p

Re: [PATCH] connect.c: Tell *PLink to always use ssh protocol

2013-03-09 Thread Sven Strickroth
Am 07.02.2013 00:22 schrieb Jeff King: > On Wed, Feb 06, 2013 at 10:58:49PM +0100, Sven Strickroth wrote: > >> Default values for *plink can be set using PuTTY. If a user makes >> telnet the default in PuTTY this breaks ssh clones in git. >> >> Since git clones of the type user@host:path use ssh,

Re: [PATCH] Replace strcmp_icase with strequal_icase

2013-03-09 Thread Duy Nguyen
On Sat, Mar 9, 2013 at 7:22 PM, Fredrik Gustafsson wrote: > On Sat, Mar 09, 2013 at 07:05:37PM +0700, Duy Nguyen wrote: >> On Sat, Mar 9, 2013 at 6:08 PM, Fredrik Gustafsson wrote: >> > Actually when implemented a str[n]equal_icase that actually should work. >> > I break the test suite when tryin

Re: [PATCH] Replace strcmp_icase with strequal_icase

2013-03-09 Thread Fredrik Gustafsson
On Sat, Mar 09, 2013 at 07:05:37PM +0700, Duy Nguyen wrote: > On Sat, Mar 9, 2013 at 6:08 PM, Fredrik Gustafsson wrote: > > Actually when implemented a str[n]equal_icase that actually should work. > > I break the test suite when trying to replace > > strncmp_icase(pathname, base, baselen)) on line

Re: [PATCH] Replace strcmp_icase with strequal_icase

2013-03-09 Thread Duy Nguyen
On Sat, Mar 9, 2013 at 6:08 PM, Fredrik Gustafsson wrote: > Actually when implemented a str[n]equal_icase that actually should work. > I break the test suite when trying to replace > strncmp_icase(pathname, base, baselen)) on line 711 in dir.c and I don't > get any significant improvements. Hmm..

Re: rebase: strange failures to apply patc 3-way

2013-03-09 Thread Max Horn
On 08.03.2013, at 20:20, Andrew Wong wrote: > On 3/8/13, Max Horn wrote: >> Same result, it works fine. > > Just shooting in the dark here... I wonder if there's some background > process running in OS X that's messing with the files/directories > while rebase is working... backup, virus scan,

Re: [PATCH] Replace strcmp_icase with strequal_icase

2013-03-09 Thread Fredrik Gustafsson
On Sat, Mar 09, 2013 at 05:54:45PM +0700, Duy Nguyen wrote: > On Sat, Mar 9, 2013 at 5:40 PM, Duy Nguyen wrote: > > On Sat, Mar 9, 2013 at 3:42 PM, Fredrik Gustafsson wrote: > >> To improve performance. > > > > BTW, by rolling our own string comparison, we may lose certain > > optimizations done

Re: [PATCH] Replace strcmp_icase with strequal_icase

2013-03-09 Thread Duy Nguyen
On Sat, Mar 9, 2013 at 5:40 PM, Duy Nguyen wrote: > On Sat, Mar 9, 2013 at 3:42 PM, Fredrik Gustafsson wrote: >> To improve performance. > > BTW, by rolling our own string comparison, we may lose certain > optimizations done by C library. In case of glibc, it may choose to > run an sse4.2 version

Re: Memory corruption when rebasing with git version 1.8.1.5 on arch

2013-03-09 Thread Bernhard Posselt
On 03/09/2013 05:48 AM, Jeff King wrote: On Sat, Mar 09, 2013 at 01:08:32AM +0100, Bernhard Posselt wrote: The problem is likely happening in a sub-command of git-pull, so valgrind isn't reporting it. Can you try re-running with "valgrind --trace-children=yes", or alternatively narrow down the

Re: [PATCH] Replace strcmp_icase with strequal_icase

2013-03-09 Thread Duy Nguyen
On Sat, Mar 9, 2013 at 3:42 PM, Fredrik Gustafsson wrote: > To improve performance. BTW, by rolling our own string comparison, we may lose certain optimizations done by C library. In case of glibc, it may choose to run an sse4.2 version where 16 bytes are compared at a time. Maybe we encounter "s

Re: [PATCH] Replace strcmp_icase with strequal_icase

2013-03-09 Thread Duy Nguyen
On Sat, Mar 09, 2013 at 09:42:54AM +0100, Fredrik Gustafsson wrote: > To improve performance. > git status before: > user0m0.020s > user0m0.024s > user0m0.024s > user0m0.020s > user0m0.024s > user0m0.028s > user0m0.024s > user0m0.024s > user0m0.016s > user0m0

Re: [PATCH 3/3] match_basename: use strncmp instead of strcmp

2013-03-09 Thread Duy Nguyen
On Sat, Mar 9, 2013 at 2:50 PM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> strncmp provides length information, compared to strcmp, which could >> be taken advantage by the implementation. Even better, we could check >> if the lengths are equal before calling strncmp, eliminating

Re: [PATCH 1/3] match_pathname: avoid calling strncmp if baselen is 0

2013-03-09 Thread Antoine Pelisse
> diff --git a/dir.c b/dir.c > index 57394e4..669cf80 100644 > --- a/dir.c > +++ b/dir.c > @@ -663,7 +663,7 @@ int match_pathname(const char *pathname, int pathlen, > */ > if (pathlen < baselen + 1 || > (baselen && pathname[baselen] != '/') || > - strncmp_icas

Re: [PATCH] Replace strcmp_icase with strequal_icase

2013-03-09 Thread Fredrik Gustafsson
Please ignore last e-mail. Sorry for the disturbance. -- Med vänliga hälsningar Fredrik Gustafsson tel: 0733-608274 e-post: iv...@iveqy.com -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.

Re: [PATCH 3/3] match_basename: use strncmp instead of strcmp

2013-03-09 Thread Fredrik Gustafsson
On Fri, Mar 08, 2013 at 11:50:04PM -0800, Junio C Hamano wrote: > At the same time, I wonder if we can take advantage of the fact that > these call sites only care about equality and not ordering. I did an RFC-patch for that (that I mistakenly didn't sent as a reply to this e-mail). And I believe

[PATCH] Replace strcmp_icase with strequal_icase

2013-03-09 Thread Fredrik Gustafsson
To improve performance. git status before: user0m0.020s user0m0.024s user0m0.024s user0m0.020s user0m0.024s user0m0.028s user0m0.024s user0m0.024s user0m0.016s user0m0.028s git status after: user0m0.012s user0m0.008s user0m0.008s user0m0.008s

[PATCH v2 1/2] require pathspec for "git add -u/-A"

2013-03-09 Thread Junio C Hamano
As promised in 0fa2eb530fb7 (add: warn when -u or -A is used without pathspec, 2013-01-28), "git add -u/-A" that is run without pathspec in a subdirectory will stop working sometime before Git 2.0, to wean users off of the old default, in preparation for adopting the new default in Git 2.0. Signed

[PATCH v2 2/2] git add: -u/-A now affects the entire working tree

2013-03-09 Thread Junio C Hamano
As promised in 0fa2eb530fb7 (add: warn when -u or -A is used without pathspec, 2013-01-28), in Git 2.0, "git add -u/-A" that is run without pathspec in a subdirectory updates all updated paths in the entire working tree, not just the current directory and its subdirectories. Signed-off-by: Junio C

[PATCH v2 0/2] "git add -u/-A" from future

2013-03-09 Thread Junio C Hamano
Here are two future steps to update the behaviour of "add -u/-A" run without pathspec towards Git 2.0; the first step may probably be optional, but it is included for completeness. Rebased on top of the recent "git add -u/-A" documentation updates 5cae93566027 (add: Clarify documentation of -A and

[PATCH 3/3] git add ... defaults to "-A"

2013-03-09 Thread Junio C Hamano
Make "git add ..." notice paths that have been removed from the working tree, i.e. a synonym to "git add -A ...". Given that "git add " is to update the index with the state of the named part of the working tree as a whole, it makes it more intuitive, and also makes it possible to simplify the adv

[PATCH 2/3] git add: start preparing for "git add ..." to default to "-A"

2013-03-09 Thread Junio C Hamano
When "git add subdir/" is run without "-u" or "-A" option, e.g. $ edit subdir/x $ create subdir/y $ rm subdir/z $ git add subdir/ the command does not notice removal of paths (e.g. subdir/z) from the working tree. This sometimes confuses new people, as arguably "git add" is told

[PATCH 1/3] builtin/add.c: simplify boolean variables

2013-03-09 Thread Junio C Hamano
Do not to explicitly initialize static variables to 0 and instead let BSS take care of it. Also use OPT_BOOL() to let the command line arguments set these variables to 0 or 1, instead of the deprecated OPT_BOOLEAN() aka OPT_COUNTUP(). Signed-off-by: Junio C Hamano --- builtin/add.c | 22 +++

[PATCH 0/3] Make "git add dir/" notice removed "dir/file"

2013-03-09 Thread Junio C Hamano
This resurrects an ancient stalled topic from last year, rebased on top of the recent "git add -u/-A" documentation updates 5cae93566027 (add: Clarify documentation of -A and -u, 2013-03-07) by Greg Price. The first one is a pure clean-up. The second one is a preparatory step that can happen befo