Re: [BUG] Possible bug in `remote set-url --add --push`

2013-01-11 Thread Junio C Hamano
Jardel Weyrich writes: > I believe `remote set-url --add --push` has a bug. Performed tests > with v1.8.0.1 and v1.8.1 (Mac OS X). > > Quoting the relevant part of the documentation: > >> set-url >> Changes URL remote points to. Sets first URL remote points to matching >> regex (first URL i

Re: [PATCH v2 0/3] fixup remaining cvsimport tests

2013-01-11 Thread Chris Rorvick
On Sat, Jan 12, 2013 at 12:36 AM, Junio C Hamano wrote: > I too noticed the droppage of "-a" support, which may not be a big > deal (people can drop it from their script, run cvsimport and they > can drop newer commits from the resulting Git history to emulate the > old behaviour without "-a" that

Re: [PATCH v2 0/3] fixup remaining cvsimport tests

2013-01-11 Thread Junio C Hamano
Chris Rorvick writes: > Reroll w/ sign-off. > > Chris Rorvick (3): > t/lib-cvs.sh: allow cvsps version 3.x. > t9600: fixup for new cvsimport > t9604: fixup for new cvsimport > > t/lib-cvs.sh| 2 +- > t/t9600-cvsimport.sh| 10 -- > t/t9604-cvsimport-

[PATCH v2 2/3] t9600: fixup for new cvsimport

2013-01-11 Thread Chris Rorvick
cvsimport no longer supports -a (import all commits including recent ones) and no longer uses the 'origin' branch by default for imports. Signed-off-by: Chris Rorvick --- t/t9600-cvsimport.sh | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/t/t9600-cvsimport.sh b/t/

[PATCH v2 3/3] t9604: fixup for new cvsimport

2013-01-11 Thread Chris Rorvick
cvsps no longer writes a cache file and therefore no longer can be told to ignore it with -x. Signed-off-by: Chris Rorvick --- t/t9604-cvsimport-timestamps.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/t/t9604-cvsimport-timestamps.sh b/t/t9604-cvsimport-timestamps.s

[PATCH v2 1/3] t/lib-cvs.sh: allow cvsps version 3.x.

2013-01-11 Thread Chris Rorvick
Signed-off-by: Chris Rorvick --- t/lib-cvs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/lib-cvs.sh b/t/lib-cvs.sh index 44263ad..b55e861 100644 --- a/t/lib-cvs.sh +++ b/t/lib-cvs.sh @@ -15,7 +15,7 @@ export CVS cvsps_version=`cvsps -h 2>&1 | sed -ne 's/cvsps version

[PATCH v2 0/3] fixup remaining cvsimport tests

2013-01-11 Thread Chris Rorvick
Reroll w/ sign-off. Chris Rorvick (3): t/lib-cvs.sh: allow cvsps version 3.x. t9600: fixup for new cvsimport t9604: fixup for new cvsimport t/lib-cvs.sh| 2 +- t/t9600-cvsimport.sh| 10 -- t/t9604-cvsimport-timestamps.sh | 5 ++--- 3 files changed,

Re: [PATCH] t/t960[123]: remove leftover scripts

2013-01-11 Thread Chris Rorvick
On Fri, Jan 11, 2013 at 11:38 PM, Junio C Hamano wrote: >By the way, Chris, we'll need your Sign-off on the three paches >(t/lib-cvs.sh fix to allow cvsps v3, t9600 fix and t9604 fix). Sure. I was just maintaining them for myself but thought I'd share when I saw the follow-up patch. Did

Re: [PATCH v2 03/21] Export parse_pathspec() and convert some get_pathspec() calls

2013-01-11 Thread Duy Nguyen
On Sat, Jan 12, 2013 at 12:56 AM, Matt Kraai wrote: > On Fri, Jan 11, 2013 at 06:20:57PM +0700, Nguyễn Thái Ngọc Duy wrote: >> +#define PATHSPEC_FROMTOP(1<<0) > > The previous commit introduces a use of this macro in get_pathspec. > Should this be defined by that commit instead? This macro is

Re: [PATCH] tests: turn on test-lint-shell-syntax by default

2013-01-11 Thread Junio C Hamano
Torsten Bögershausen writes: > The test Makefile has a default set of lint tests which are run > as part of "make test". > > The macro TEST_LINT defaults to "test-lint-duplicates test-lint-executable". > > Add test-lint-shell-syntax here, to detect non-portable shell syntax early. > > Signed-off-

[PATCH] tests: turn on test-lint-shell-syntax by default

2013-01-11 Thread Torsten Bögershausen
The test Makefile has a default set of lint tests which are run as part of "make test". The macro TEST_LINT defaults to "test-lint-duplicates test-lint-executable". Add test-lint-shell-syntax here, to detect non-portable shell syntax early. Signed-off-by: Torsten Bögershausen --- t/Makefile |

[BUG] Possible bug in `remote set-url --add --push`

2013-01-11 Thread Jardel Weyrich
Hi, I believe `remote set-url --add --push` has a bug. Performed tests with v1.8.0.1 and v1.8.1 (Mac OS X). Quoting the relevant part of the documentation: > set-url > Changes URL remote points to. Sets first URL remote points to matching > regex (first URL if no is given) to . If > doe

[PATCH] t/t960[123]: remove leftover scripts

2013-01-11 Thread Junio C Hamano
The rewrite patch was supposed to remove these scripts, but somehow we ended up removing only the supporting files for them but not the test script themselves. Remove them for real. Signed-off-by: Junio C Hamano --- * I'll queue this on top of your patch together with a few fix-up patches fr

Re: [PATCH] cvsimport: rewrite to use cvsps 3.x to fix major bugs

2013-01-11 Thread Junio C Hamano
I cloned git://gitorious.org/cvsps/cvsps.git and installed cvsps-3.7 at c2ce6cc (More fun with test loads, sigh. Timezones suck., 2013-01-09) earlier on my $PATH, and tried to run t96xx series with this patch applied on top of Git 1.8.1. The first thing I noticed was that all the tests were skipp

Re: [PATCH] cvsimport: rewrite to use cvsps 3.x to fix major bugs

2013-01-11 Thread Eric S. Raymond
Junio C Hamano : > Yeah, it is OK to _discourage_ its use, but to me it looks like that > the above is a fairly subjective policy decision, not something I > should let you impose on the users of the old cvsimport, which you > do not seem to even treat as your users. Er. You still don't seem to g

[PATCH v2] t9605: test for cvsps commit ordering bug

2013-01-11 Thread Chris Rorvick
Import of a trivial CVS repository fails due to a cvsps bug. Given the following series of commits: timestamp abc message --- --- --- --- --- 2012/12/12 21:09:39 1.1changes are done 2012/12/12 21:09:441.1 chan

[PATCH] t9605: test for cvsps commit ordering bug

2013-01-11 Thread Chris Rorvick
Import of a trivial CVS repository fails due to a cvsps bug. Given the following series of commits: timestamp abc message --- --- --- --- --- 2012/12/12 21:09:39 1.1changes are done 2012/12/12 21:09:441.1 chan

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Junio C Hamano
Ben Aveling writes: > On 12/01/2013 10:54 AM, Junio C Hamano wrote: >> Antoine Pelisse writes: >> >>> I would simply go for: >>> >>>What Message-ID are you replying to (if any)? >>> >>> If I don't know what to answer, I would definitely not say y/yes/n/no, >>> but press enter directly. >> So

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Ben Aveling
On 12/01/2013 10:54 AM, Junio C Hamano wrote: Antoine Pelisse writes: I would simply go for: What Message-ID are you replying to (if any)? If I don't know what to answer, I would definitely not say y/yes/n/no, but press enter directly. Sounds sensible (even though technically you reply t

Re: missing objects -- prevention

2013-01-11 Thread Sitaram Chamarty
Thanks for the very detailed answer. On Fri, Jan 11, 2013 at 10:12 PM, Jeff King wrote: > On Fri, Jan 11, 2013 at 04:40:38PM +0530, Sitaram Chamarty wrote: > >> I find a lot of info on how to recover from and/or repair a repo that >> has missing (or corrupted) objects. >> >> What I need is info o

What's cooking in git.git (Jan 2013, #05; Fri, 11)

2013-01-11 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. As usual, this cycle is expected to last for 8 to 10 weeks, with a preview -rc0 sometime in the middle of next month. You can find the changes

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Junio C Hamano
Antoine Pelisse writes: > I would simply go for: > > What Message-ID are you replying to (if any)? > > If I don't know what to answer, I would definitely not say y/yes/n/no, > but press enter directly. Sounds sensible (even though technically you reply to a message that has that message ID, an

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Antoine Pelisse
On Fri, Jan 11, 2013 at 11:18 PM, Junio C Hamano wrote: > The exchange, when you do not have a configuration, goes like this: > > $ git send-email 0001-filename-of-the-patch.patch > 0001-filename-of-the-patch.patch > Who should the emails be sent to (if any)? junio > Are you sure y

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Junio C Hamano
Antoine Pelisse writes: > On Fri, Jan 11, 2013 at 10:23 PM, Jeff King wrote: >> On Fri, Jan 11, 2013 at 08:13:57PM +, Matt Seitz (matseitz) wrote: >> >>> > > How about "What Message-ID to use as In-Reply-To for the first email?" >>> > > or "Provide the Message-ID to use as In-Reply-To for th

Re: [PATCH] format_commit_message(): simplify calls to logmsg_reencode()

2013-01-11 Thread Junio C Hamano
Please disregard this... -- 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.kernel.org/majordomo-info.html

[PATCH] format_commit_message(): simplify calls to logmsg_reencode()

2013-01-11 Thread Junio C Hamano
All the other callers of logmsg_reencode() pass return value of get_commit_output_encoding() or get_log_output_encoding(). Teach the function to optionally take NULL as a synonym to "" aka "no conversion requested" so that we can simplify the only remaining calling site. Signed-off-by: Junio C Ha

Re: [PATCH v5] git-completion.bash: add support for path completion

2013-01-11 Thread Junio C Hamano
Manlio Perillo writes: > +# Process path list returned by "ls-files" and "diff-index --name-only" > +# commands, in order to list only file names relative to a specified > +# directory, and append a slash to directory names. > +__git_index_file_list_filter () > +{ > + # Default to Bash >= 4.x

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Antoine Pelisse
On Fri, Jan 11, 2013 at 10:23 PM, Jeff King wrote: > On Fri, Jan 11, 2013 at 08:13:57PM +, Matt Seitz (matseitz) wrote: > >> > > How about "What Message-ID to use as In-Reply-To for the first email?" >> > > or "Provide the Message-ID to use as In-Reply-To for the first >> > > email:". >> > >>

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Jeff King
On Fri, Jan 11, 2013 at 08:13:57PM +, Matt Seitz (matseitz) wrote: > > > How about "What Message-ID to use as In-Reply-To for the first email?" > > > or "Provide the Message-ID to use as In-Reply-To for the first > > > email:". > > > > seem fine to me. Maybe somebody who has been confused by

Re: [PATCH] git-completion.bash: Silence not a valid object errors

2013-01-11 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 11/01/2013 09:06, Dylan Smith ha scritto: > Trying to complete the command > > git show master:./file > > would cause a "Not a valid object name" error to be output on standard > error. Silence the error so it won't appear on the command line. >

Re: git-archive fails against smart-http repos

2013-01-11 Thread Jeff King
On Wed, Jan 09, 2013 at 10:52:48AM -0800, Bruce Lysik wrote: > Trying to run git-archive fails against smart-http based repos. Example: > > $ git archive --verbose --format=zip > --remote=http://code.toofishes.net/git/dan/initscripts.git > fatal: Operation not supported by protocol. > Unexpecte

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Matt Seitz (matseitz)
"Jeff King" wrote in message news:<2013085417.ga12...@sigill.intra.peff.net>... > On Fri, Jan 11, 2013 at 10:43:39AM -0800, Hilco Wijbenga wrote: > > > > How about "What Message-ID to use as In-Reply-To for the first email?" > > or "Provide the Message-ID to use as In-Reply-To for the first

[BUG]:Git doesn't work with Sock5 proxy on MAC

2013-01-11 Thread Herry Wang
On Thu, Jan 10, 2013 at 9:51 PM, Herry Wang wrote: > > OS: > > Darwin ... 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT > 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 > > Git: version: (via homebrew) > > git --version > git version 1.8.0 > > curl version: > > curl --version > c

Re: Version 1.8.1 does not compile on Cygwin 1.7.14

2013-01-11 Thread Alex Riesen
On Fri, Jan 11, 2013 at 9:08 PM, Alex Riesen wrote: > This short discussion on GitHub (file git-compat-util.h) might be relevant: > > https://github.com/msysgit/git/commit/435bdf8c7ffa493f8f6f2e8f329f8cc22db16ce6#commitcomment-2407194 > > The change suggested there (to remove an inclusion of windo

Re: Version 1.8.1 does not compile on Cygwin 1.7.14

2013-01-11 Thread Alex Riesen
This short discussion on GitHub (file git-compat-util.h) might be relevant: https://github.com/msysgit/git/commit/435bdf8c7ffa493f8f6f2e8f329f8cc22db16ce6#commitcomment-2407194 The change suggested there (to remove an inclusion of windows.h in git-compat-util.h) might simplify the solution a litt

Re: [PATCH] cvsimport: rewrite to use cvsps 3.x to fix major bugs

2013-01-11 Thread Junio C Hamano
"Eric S. Raymond" writes: > Junio C Hamano : > ... > The other is a design-level problem - these options were a bad idea to > begin with. In earlier list mail I said > > An example of the batchiness mistake close to home is the -m and -M > options in the old version of cvsimport. It tak

Re: [PATCH] cvsimport: rewrite to use cvsps 3.x to fix major bugs

2013-01-11 Thread Junio C Hamano
"Eric S. Raymond" writes: > Junio C Hamano : >> I think the prevalent style in this script is to write "print" >> without parentheses: >> >> print STDERR "msg\n"; > > That can be easily fixed. > >> This looks lazy and unsafe quoting. Is there anything that makes >> sure repository path doe

Re: parsecvs has been salvaged

2013-01-11 Thread Eric S. Raymond
Bart Massey : > Very cool! I'm glad you got it doing what you wanted; I'll be > interested to see how parsecvs compares in quality and performance to > cvs2git and cvsps. --Bart And now it has that -R option and correctly interprets the timezone field. (I've been busy this morning.) I'm working o

Re: [PATCH] cvsimport: rewrite to use cvsps 3.x to fix major bugs

2013-01-11 Thread Eric S. Raymond
Junio C Hamano : > I think the prevalent style in this script is to write "print" > without parentheses: > > print STDERR "msg\n"; That can be easily fixed. > This looks lazy and unsafe quoting. Is there anything that makes > sure repository path does not contain a single quote? No. But.

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Jeff King
On Fri, Jan 11, 2013 at 10:43:39AM -0800, Hilco Wijbenga wrote: > > People answer 'y' to "Who should the emails appear to be from?" and > > 'n' to "Message-ID to be used as In-Reply-To for the first email?" > > for some unknown reason. While it is possible that your local > > username re

[PATCH v5] git-completion.bash: add support for path completion

2013-01-11 Thread Manlio Perillo
The git-completion.bash script did not implemented full, git aware, support to complete paths, for git commands that operate on files within the current working directory or the index. As an example: git add will suggest all files in the current working directory, including ignored file

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Hilco Wijbenga
On 11 January 2013 08:47, Jeff King wrote: > On Fri, Jan 11, 2013 at 09:39:06AM -0700, Eric Blake wrote: > >> > Please don't answer "y" when git send email shows the following prompt: >> > >> > "Message-ID to be used as In-Reply-To for the first email?" >> > >> > you should respond with a message

Re: parsecvs has been salvaged

2013-01-11 Thread Bart Massey
Very cool! I'm glad you got it doing what you wanted; I'll be interested to see how parsecvs compares in quality and performance to cvs2git and cvsps. --Bart On Fri, Jan 11, 2013 at 3:21 AM, Eric S. Raymond wrote: > Since Heiko Voigt and others were concerned about this, I report that > I have su

Re: [PATCH v2 03/21] Export parse_pathspec() and convert some get_pathspec() calls

2013-01-11 Thread Matt Kraai
On Fri, Jan 11, 2013 at 06:20:57PM +0700, Nguyễn Thái Ngọc Duy wrote: > +#define PATHSPEC_FROMTOP(1<<0) The previous commit introduces a use of this macro in get_pathspec. Should this be defined by that commit instead? > @@ -266,9 +266,9 @@ static int pathspec_item_cmp(const void *a_, const v

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Eric Blake
On 01/11/2013 09:47 AM, Jeff King wrote: > On Fri, Jan 11, 2013 at 09:39:06AM -0700, Eric Blake wrote: > >>> Please don't answer "y" when git send email shows the following prompt: >>> >> >> Anyone willing to patch upstream 'git send-email' to reject a simple 'y' > What version of git? Commit 51

Re: [PATCH 09/19] reset.c: replace switch by if-else

2013-01-11 Thread Junio C Hamano
Martin von Zweigbergk writes: >> Justification? > > Clairvoyance ... ;-) -- 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.kernel.org/majordomo-info.html

Re: git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Jeff King
On Fri, Jan 11, 2013 at 09:39:06AM -0700, Eric Blake wrote: > > Please don't answer "y" when git send email shows the following prompt: > > > > "Message-ID to be used as In-Reply-To for the first email?" > > > > you should respond with a message ID there. Unfortunately we have a > > growing thre

Re: [PATCH] git-completion.bash: Silence not a valid object errors

2013-01-11 Thread Junio C Hamano
Dylan Smith writes: > Trying to complete the command > > git show master:./file > > would cause a "Not a valid object name" error to be output on standard > error. Silence the error so it won't appear on the command line. > > Signed-off-by: Dylan Smith > --- Looks obviously correct. Thanks.

Re: missing objects -- prevention

2013-01-11 Thread Jeff King
On Fri, Jan 11, 2013 at 04:40:38PM +0530, Sitaram Chamarty wrote: > I find a lot of info on how to recover from and/or repair a repo that > has missing (or corrupted) objects. > > What I need is info on common reasons (other than disk errors -- we've > checked for those) for such errors to occur,

git send-email should not allow 'y' for in-reply-to

2013-01-11 Thread Eric Blake
[raising this UI wart to the git list] On 01/11/2013 01:42 AM, Peter Krempa wrote: > On 01/11/13 07:31, Chunyan Liu wrote: >> This patch series is to... [snip] > > Please don't answer "y" when git send email shows the following prompt: > > "Message-ID to be used as In-Reply-To for the first ema

Re: [PATCH] cvsimport: rewrite to use cvsps 3.x to fix major bugs

2013-01-11 Thread Junio C Hamano
> From: "Eric S. Raymond" > ... > diff --git a/git-cvsimport.perl b/git-cvsimport-fallback.perl > similarity index 98% > rename from git-cvsimport.perl > rename to git-cvsimport-fallback.perl > index 0a31ebd..4bc0717 100755 > --- a/git-cvsimport.perl > +++ b/git-cvsimport-fallback.perl > @@ -1,4 +

Re: [PATCH v2 0/2] improve-wincred-compatibility

2013-01-11 Thread Erik Faye-Lund
On Thu, Jan 10, 2013 at 1:10 PM, Karsten Blees wrote: > Changes since initial version (see attached diff for details): > - split in two patches > - removed unused variables > - improved the dll error message > - changed ?: to if else > - added comments > > Also available here: > https://github.com

Re: What's cooking in git.git (Jan 2013, #04; Wed, 9)

2013-01-11 Thread Junio C Hamano
Duy Nguyen writes: > On Thu, Jan 10, 2013 at 4:04 AM, Junio C Hamano wrote: >> Here are the topics that have been cooking. Commits prefixed with >> '-' are only in 'pu' (proposed updates) while commits prefixed with >> '+' are in 'next'. > > I see you start to use no-change commits as a way to

Re: [PATCH] git-completion.bash: Silence not a valid object errors

2013-01-11 Thread Jeff King
On Fri, Jan 11, 2013 at 03:06:22AM -0500, Dylan Smith wrote: > Trying to complete the command > > git show master:./file > > would cause a "Not a valid object name" error to be output on standard > error. Silence the error so it won't appear on the command line. > > Signed-off-by: Dylan Smith

[PATCH v2 22/21] Convert the last use of match_pathspec() and remove it

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- I was digging the t7400.38 failure and found that add.c is the last place that uses match_pathspec(). This is the first yay moment for me since 'struct pathspec' was introduced. I wanted to remove this function for so long! Good luck resolving conflic

Re: [PATCH v2 17/21] Convert refresh_index to take struct pathspec

2013-01-11 Thread Nguyen Thai Ngoc Duy
On Fri, Jan 11, 2013 at 06:21:11PM +0700, Nguyễn Thái Ngọc Duy wrote: > - for (i = 0; i < specs; i++) { > + for (i = 0; i < pathspec->nr; i++) { > if (!seen[i]) > - die(_("pathspec '%s' did not match any files"), > pathspec[i]); > + die

Re: What's cooking in git.git (Jan 2013, #04; Wed, 9)

2013-01-11 Thread Duy Nguyen
On Thu, Jan 10, 2013 at 4:04 AM, Junio C Hamano wrote: > Here are the topics that have been cooking. Commits prefixed with > '-' are only in 'pu' (proposed updates) while commits prefixed with > '+' are in 'next'. I see you start to use no-change commits as a way to keep notes in 'pu'. Isn't git

Re: git checkout doesn't work?

2013-01-11 Thread Duy Nguyen
On Fri, Jan 11, 2013 at 1:46 PM, Ishayahu Lastov wrote: > This is my session on Win7 x64: > Microsoft Windows [Version 6.1.7601] > (c) Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены. > > C:\Dropbox\Dropbox\Wesnoth\Apocryphs>cd Apokryphs.Orks > > C:\Dropbox\Dropbox\Wesnoth\Apocry

[PATCH v2 21/21] Rename field "raw" to "_raw" in struct pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
This patch is essentially no-op. It helps catching new use of this field though. This field is introduced as an intermediate step for the pathspec conversion and will be removed eventually. At this stage no more access sites should be introduced. Signed-off-by: Nguyễn Thái Ngọc Duy --- archive.c

[PATCH v2 20/21] Convert more init_pathspec() to parse_pathspec()

2013-01-11 Thread Nguyễn Thái Ngọc Duy
init_pathspec() was introduced to work with the result from get_pathspec(). init_pathspec() will be removed eventually after parse_pathspec() takes over, so that there is only place that initializes struct pathspec. Signed-off-by: Nguyễn Thái Ngọc Duy --- archive.c | 2 +- builtin/log.

[PATCH v2 18/21] Convert {read,fill}_directory to take struct pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/add.c | 2 +- builtin/clean.c| 2 +- builtin/grep.c | 2 +- builtin/ls-files.c | 2 +- dir.c | 10 +- dir.h | 4 ++-- wt-status.c| 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(

[PATCH v2 19/21] Convert add_files_to_cache to take struct pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/add.c| 8 +--- builtin/commit.c | 2 +- cache.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index 0295cef..5d262eb 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -80,13 +8

[PATCH v2 17/21] Convert refresh_index to take struct pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/add.c| 14 ++ builtin/commit.c | 2 +- builtin/rm.c | 2 +- cache.h | 2 +- read-cache.c | 5 +++-- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index c8592fe..4

[PATCH v2 16/21] Convert report_path_error to take struct pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c | 2 +- builtin/commit.c | 14 ++ builtin/ls-files.c | 14 -- cache.h| 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index a7ddb35..

[PATCH v2 14/21] Convert unmerge_cache to take struct pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c | 2 +- rerere.c | 2 +- resolve-undo.c | 4 ++-- resolve-undo.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 00910dc..aa399d6 100644 --- a/builtin

[PATCH v2 15/21] checkout: convert read_tree_some to take struct pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c | 9 +++-- tree.c | 4 ++-- tree.h | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index aa399d6..a7ddb35 100644 --- a/builtin/checkout.c +++ b/bu

[PATCH v2 13/21] Convert read_cache_preload() to take struct pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c | 2 +- builtin/commit.c | 4 ++-- builtin/diff-files.c | 2 +- builtin/diff-index.c | 2 +- builtin/diff.c | 4 ++-- cache.h | 4 +++- preload-index.c | 20 +++- 7 files changed, 21 in

[PATCH v2 11/21] archive: convert to use parse_pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- archive.c | 10 -- archive.h | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/archive.c b/archive.c index 4666404..530badb 100644 --- a/archive.c +++ b/archive.c @@ -150,7 +150,6 @@ int write_archive_entries(struct archiver_a

[PATCH v2 12/21] add: convert to use parse_pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
treat_gitlinks() modifies pathspec and is moved to dir.c, close to other pathspec code. It'll be removed later when parse_pathspec() learns to take over its job. Note that treat_gitlinks() and strip_trailing_slash_from_submodules() do not perform exactly the same thing. But that does not matter for

parsecvs has been salvaged

2013-01-11 Thread Eric S. Raymond
Since Heiko Voigt and others were concerned about this, I report that I have successfully salvaged the parsecvs code. I now have it emitting a correct-looking fast-import stream for my main test repository. I'm not ready to ship it yet because there are several features I think it ought to have b

[PATCH v2 10/21] ls-files: convert to use parse_pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
strip_trailing_slash_from_submodules() modifies pathspec and is moved to dir.c, close to other pathspec code. It'll be removed later when parse_pathspec() learns to take over its job. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/ls-files.c | 42 +++--- cach

[PATCH v2 09/21] rm: convert to use parse_pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/rm.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/builtin/rm.c b/builtin/rm.c index dabfcf6..d719d95 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -216,7 +216,7 @@ static struct option builtin_rm_options[]

[PATCH v2 08/21] checkout: convert to use parse_pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index a9c1b5a..da25298 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -45,7 +45,7 @

[PATCH v2 07/21] rerere: convert to use parse_pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/rerere.c | 6 +++--- rerere.c | 8 rerere.h | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/builtin/rerere.c b/builtin/rerere.c index dc1708e..a573c4a 100644 --- a/builtin/rerere.c +++ b/builtin/re

[PATCH v2 06/21] status: convert to use parse_pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/commit.c | 9 + wt-status.c | 17 +++-- wt-status.h | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index 444ae1d..196dfab 100644 --- a/builtin/commit.c ++

[PATCH v2 05/21] commit: convert to use parse_pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/commit.c | 18 +- cache.h | 3 +++ setup.c | 3 +++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index d6dd3df..444ae1d 100644 --- a/builtin/commit.c +++ b/b

[PATCH v2 04/21] clean: convert to use parse_pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/clean.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/builtin/clean.c b/builtin/clean.c index 69c1cda..788ad8c 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -42,7 +42,7 @@ int cmd_clean(int argc,

[PATCH v2 02/21] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Currently to fill a struct pathspec, we do: const char **paths; paths = get_pathspec(prefix, argv); ... init_pathspec(&pathspec, paths); "paths" can only carry bare strings, which loses information from command line arguments such as pathspec magic or the prefix part's length for each

[PATCH v2 03/21] Export parse_pathspec() and convert some get_pathspec() calls

2013-01-11 Thread Nguyễn Thái Ngọc Duy
These call sites follow the pattern: paths = get_pathspec(prefix, argv); init_pathspec(&pathspec, paths); which can be converted into a single parse_pathspec() call. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/grep.c | 4 +--- builtin/ls-tree.c | 2 +- builtin/update-ind

[PATCH v2 01/21] pathspec: save the non-wildcard length part

2013-01-11 Thread Nguyễn Thái Ngọc Duy
We mark pathspec with wildcards with the field use_wildcard. We could do better by saving the length of the non-wildcard part, which can be used for optimizations such as f9f6e2c (exclude: do strcmp as much as possible before fnmatch - 2012-06-07). Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-b

[PATCH v2 00/21] nd/parse-pathspec reroll

2013-01-11 Thread Nguyễn Thái Ngọc Duy
Changes: - The incorrect patch 'pathspec: make sure the prefix part is wildcard-clean' is removed. I want to keep this series simple. Complex pathspec manipulation will have its own series later. - Fix t7400.38 failure when core.ignorecase is on. We should exercise core.ignorecase codepath

Re: [PATCH 03/19] reset.c: pass pathspec around instead of (prefix, argv) pair

2013-01-11 Thread Duy Nguyen
On Fri, Jan 11, 2013 at 6:09 AM, Junio C Hamano wrote: >> Or I could hold off nd/parse-pathspec if this series has a better >> chance of graduation first. Decision? > > I am greedy and want to have both ;-) Apparently I have no problems with your being greedy. > There is no textual conflict betw

Re: t7400 broken on pu (Mac OS X)

2013-01-11 Thread Duy Nguyen
On Fri, Jan 11, 2013 at 12:58 AM, Junio C Hamano wrote: > I can see why it is wrong to let pathspec.raw be rewritten without > making matching change to the containing pathspec, but I find it > strange why it matters only on case-insensitive codepath. Yeah, I don't get it either. I can see that c

Re: git checkout bug on Win7 x64

2013-01-11 Thread Konstantin Khomoutov
On Fri, 11 Jan 2013 11:30:01 +0400 Ishayahu Lastov wrote: [...] > As I understand after last "git checkout" in "git status" I should see > that I gave no changes. It looks like an bug, isn't it? Looks like an EOL-conversion problem rather typical to Windows, see http://stackoverflow.com/a/201642

[PATCH v2 3/3] fetch: elaborate --depth action

2013-01-11 Thread Nguyễn Thái Ngọc Duy
--depth is explained as deepen, but the way it's applied, it can shorten the history as well. Keen users may have noticed the implication by the phrase "the specified number of commits from the tip of each remote branch". Put "shorten" in the description to make it clearer. Signed-off-by: Nguyễn T

[PATCH v2 1/3] fetch: add --unshallow for turning shallow repo into complete one

2013-01-11 Thread Nguyễn Thái Ngọc Duy
The user can do --depth=2147483647 (*) for restoring complete repo now. But it's hard to remember. Any other numbers larger than the longest commit chain in the repository would also do, but some guessing may be involved. Make easy-to-remember --unshallow an alias for --depth=2147483647. Make uplo

[PATCH v2 2/3] upload-pack: fix off-by-one depth calculation in shallow clone

2013-01-11 Thread Nguyễn Thái Ngọc Duy
get_shallow_commits() is used to determine the cut points at a given depth (i.e. the number of commits in a chain that the user likes to get). However we count current depth up to the commit "commit" but we do the cutting at its parents (i.e. current depth + 1). This makes upload-pack always return

[PATCH] git-completion.bash: Silence not a valid object errors

2013-01-11 Thread Dylan Smith
Trying to complete the command git show master:./file would cause a "Not a valid object name" error to be output on standard error. Silence the error so it won't appear on the command line. Signed-off-by: Dylan Smith --- contrib/completion/git-completion.bash |2 +- 1 file changed, 1 ins