[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

[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 gits...@pobox.com ---

[PATCH 2/3] git add: start preparing for git add pathspec... 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 to

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

2013-03-09 Thread Junio C Hamano
Make git add pathspec... notice paths that have been removed from the working tree, i.e. a synonym to git add -A pathspec Given that git add pathspec 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

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

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

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

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

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_icase(pathname,

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 gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com 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

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

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 iv...@iveqy.com 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

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 5:40 PM, Duy Nguyen pclo...@gmail.com wrote: On Sat, Mar 9, 2013 at 3:42 PM, Fredrik Gustafsson iv...@iveqy.com 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

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 pclo...@gmail.com wrote: On Sat, Mar 9, 2013 at 3:42 PM, Fredrik Gustafsson iv...@iveqy.com wrote: To improve performance. BTW, by rolling our own string comparison, we may lose certain

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 m...@quendi.de 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,

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 iv...@iveqy.com 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

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 iv...@iveqy.com 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,

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 iv...@iveqy.com 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 iv...@iveqy.com wrote: Actually when implemented a str[n]equal_icase that actually should work. I break the

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

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

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

[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 apeli...@gmail.com --- t/perf/README |2 +- 1 file changed, 1

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 k...@mns.spb.ru split Sorry for the confusion... 8 From: Kirill Smelkov k...@mns.spb.ru Even though an earlier attempt (bafc478..41dd00bad) cleaned up RFC 2047 encoding,

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 hvo...@hvoigt.net: 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

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 jens.lehm...@web.de wrote: Am 05.03.2013 19:34, schrieb Junio C Hamano: Eric Cousineau eacousin...@gmail.com writes: ... I am not entirely convinced we would want --include-super in the first place, though.

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 should

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

[PATCH 01/19] spell checking

2013-03-09 Thread Paul Campbell
From 72fc84b6e5085b328cc90e664c9f85a1f5cde36c Mon Sep 17 00:00:00 2001 From: Paul Cartwright paul.cartwri...@ziilabs.com 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

[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 pcampb...@kemitix.net 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

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

[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 bibe...@bk.ru 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 +--

[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 pcampb...@kemitix.net 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

[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 pcampb...@kemitix.net 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

[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 pcampb...@kemitix.net 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

[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 mich...@adslot.com 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

[PATCH 08/19] fixing typo

2013-03-09 Thread Paul Campbell
From 8f6eb2ddfcaef888dc3d3ea4d089aa2e9cad5d0f Mon Sep 17 00:00:00 2001 From: Paul Campbell pcampb...@kemitix.net Date: Sat, 9 Mar 2013 18:32:53 + Subject: [PATCH 08/19] fixing typo Conflicts: git-subtree.sh Add diff command Original-Author: mhoffman matt.hoff...@quantumretail.com

[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 pcampb...@kemitix.net Date: Sat, 9 Mar 2013 18:33:12 + Subject: [PATCH 09/19] Adding a list command Conflicts: git-subtree.sh Original-Author: mhoffman matt.hoff...@quantumretail.com

[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 pcampb...@kemitix.net 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

[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 pcampb...@kemitix.net 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 r...@initfour.nl

[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 pcampb...@kemitix.net 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

[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 r...@initfour.nl 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

[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

[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 r...@initfour.nl 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

[PATCH 16/19] Update SYNOPSIS

2013-03-09 Thread Paul Campbell
From 6024d877e6c3beebe4c11bd060553d06af422680 Mon Sep 17 00:00:00 2001 From: Paul Campbell pcampb...@kemitix.net 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 r...@initfour.nl

[PATCH 17/19] Document list command

2013-03-09 Thread Paul Campbell
From fed80cb47dffcb805a7808e8574dda44992363b0 Mon Sep 17 00:00:00 2001 From: Paul Campbell pcampb...@kemitix.net Date: Sat, 9 Mar 2013 18:35:18 + Subject: [PATCH 17/19] Document list command Conflicts: git-subtree.sh Original-Author: Herman van Rink r...@initfour.nl

[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 pcampb...@kemitix.net 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 jro...@vz.net

[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 pcampb...@kemitix.net 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

Re: [PATCH 01/19] spell checking

2013-03-09 Thread Junio C Hamano
Paul Campbell pcampb...@kemitix.net writes: From 72fc84b6e5085b328cc90e664c9f85a1f5cde36c Mon Sep 17 00:00:00 2001 From: Paul Cartwright paul.cartwri...@ziilabs.com Date: Thu, 27 Jan 2011 22:33:06 +0800 Subject: [PATCH 01/19] spell checking --- contrib/subtree/git-subtree.txt | 2 +- 1

Re: [PATCH 01/19] spell checking

2013-03-09 Thread Paul Campbell
On Sat, Mar 9, 2013 at 7:45 PM, Junio C Hamano gits...@pobox.com wrote: Paul Campbell pcampb...@kemitix.net writes: From 72fc84b6e5085b328cc90e664c9f85a1f5cde36c Mon Sep 17 00:00:00 2001 From: Paul Cartwright paul.cartwri...@ziilabs.com Date: Thu, 27 Jan 2011 22:33:06 +0800 Subject: [PATCH

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

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

[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

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

Re: Segfault in git 1.8.1.5

2013-03-09 Thread Junio C Hamano
Strasser Pablo strasserpa...@bluewin.ch 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

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 strasserpa...@bluewin.ch 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

[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

[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

[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

[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 mich...@fallo.ws --- 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 @@

[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 mich...@fallo.ws --- 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 @@

[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 mich...@fallo.ws 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

[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 andrew.k...@gmail.com --- setup.c | 6 --

[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 andrew.k...@gmail.com --- 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

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

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

2013-03-09 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com 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

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 jrnie...@gmail.com 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

[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

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

[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.549s

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

[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 pclo...@gmail.com --- 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

[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

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 k...@navytux.spb.ru 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

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

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 pclo...@gmail.com 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