Re: [PATCH v2 2/2] git-cvsimport: allow local timezone for commits

2012-10-14 Thread Junio C Hamano
Chris Rorvick ch...@rorvick.com writes: CVS patches are imported with the timezone offset of + (UTC). Allow timezone offsets to be calculated from the the local timezone by adding -l to the command line or specifying cvsimport.l in the config. A single I do not like everybody's timestamp

[PATCH 09/20] cvsserver: cvs add: do not expand directory arguments

2012-10-14 Thread Matthew Ogilvie
Standard cvs add never does any recursion. With standard cvs, cvs add dir will either add just the dir to the repository, or error out. Prior to this change, git-cvsserver would try to recurse (perhaps re-adding sandbox-removed files?) into the existing directory instead. Signed-off-by: Matthew

[PATCH 18/20] cvsserver: support -r and sticky tags for most operations

2012-10-14 Thread Matthew Ogilvie
- Split off prepDirForOutput for update and commit. Some low level protocol details were changed to more closely resemble CVS even in non-tagged cases. Hopefully it still works with finicky clients like Eclipse. - Substantial changes to diff. The output is now closer to

Re: [RFC/PATCH 0/2] Re: [PATCH] config: warn on inaccessible files

2012-10-14 Thread Jeff King
On Sat, Oct 13, 2012 at 05:02:10PM -0700, Jonathan Nieder wrote: Before reading a config file, we check !access(path, R_OK) to make sure that the file exists and is readable. If it's not, then we silently ignore it. git became noisy: $ git fetch --all warning: unable to access

Re: [PATCH 2/2] config: treat user and xdg config permission problems as errors

2012-10-14 Thread Jeff King
On Sat, Oct 13, 2012 at 05:04:02PM -0700, Jonathan Nieder wrote: Better to error out and ask the user to correct the problem. This only affects the user and xdg config files, since the user presumably has enough access to fix their permissions. If the system config file is unreadable, the

Re: [RFC/PATCH 0/2] Re: [PATCH] config: warn on inaccessible files

2012-10-14 Thread Jeff King
On Sat, Oct 13, 2012 at 09:55:22PM -0700, Junio C Hamano wrote: When ~/.gitconfig is unreadable (EPERM), the messages are a symptom of an older issue: the config file is being ignored. Shouldn't git error out instead so the permissions can be fixed? E.g., if the sysadmin has set

Re: [PATCH v5 04/12] wildmatch: remove unnecessary functions

2012-10-14 Thread Nguyen Thai Ngoc Duy
On Sun, Oct 14, 2012 at 12:04 PM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- The comment-fix seems to be new but otherwise this is unchanged, right? Right.-- Duy -- To unsubscribe from

Re: git smart-http do not authent to allow git ls-remote to be called anonymously

2012-10-14 Thread Jeff King
[re-adding git@vger; please keep discussion on-list] On Sun, Oct 14, 2012 at 01:29:13PM +0800, 乙酸鋰 wrote: Sorry, it does not serve the request. It returns http 401. But if I add the username and password as a part of the URL, it succeeds. In that case, then you probably need to upgrade your

Re: git reflog delete HEAD@{1} HEAD@{2} caught me by surprise...

2012-10-14 Thread George Spelvin
I would actually call that behaviour a bug. Well, yes, that was my inclination, too. But writing documentation was easier than writing a code patch. :-) Even when it is fixed, a comment about when it was fixed and what the buggy version did should live in the BUGS section for a while, to warn

Re: [PATCH 2/2] config: treat user and xdg config permission problems as errors

2012-10-14 Thread Jonathan Nieder
Jeff King wrote: For example, servers may depend on /etc/gitconfig to enforce security policy (e.g., setting transfer.fsckObjects or receive.deny*). Perhaps our default should be safe, and people can use GIT_CONFIG_NOSYSTEM to work around a broken machine. Very good point. How about these

[PATCH 3/2] config doc: advertise GIT_CONFIG_NOSYSTEM

2012-10-14 Thread Jonathan Nieder
When a syntax error or other problem renders /etc/gitconfig buggy on a multiuser system where mortals do not have write access to /etc, the GIT_CONFIG_NOSYSTEM variable is the best tool we have to keep getting work done until the sysadmin sorts the problem out. Noticed while experimenting with

[PATCH 4/2] config: exit on error accessing any config file

2012-10-14 Thread Jonathan Nieder
There is convenience in warning and moving on when somebody has a bogus permissions on /etc/gitconfig and cannot do anything about it. But the cost in predictability and security is too high --- when unreadable config files are skipped, it means an I/O error or permissions problem causes important

[PATCH v2 3/2] doc: advertise GIT_CONFIG_NOSYSTEM

2012-10-14 Thread Jonathan Nieder
On a multiuser system where mortals do not have write access to /etc, the GIT_CONFIG_NOSYSTEM variable is the best tool we have to keep getting work done when a syntax error or other problem renders /etc/gitconfig buggy, until the sysadmin sorts the problem out. Noticed while experimenting with

Re: [RFC/PATCH 0/2] Re: [PATCH] config: warn on inaccessible files

2012-10-14 Thread Jonathan Nieder
Junio C Hamano wrote: If the config side can be switched to unconditionally attempt to fopen and then deal with an error when it happens, we can get rid of access_or_{warn,die} and replace them with fopen_or_{warn,die} and use them from the two

Re: A design for subrepositories

2012-10-14 Thread Lauri Alanko
Quoting Junio C Hamano gits...@pobox.com: If the submodules ever get reorganized and foo is moved to ./bar, then it is impossible to check out older versions or alternate branches, since the submodule is no longer where it is expected to be at the origin. Isn't that exactly what the module

Re: [PATCH v5 05/12] Integrate wildmatch to git

2012-10-14 Thread Torsten Bögershausen
diff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh new file mode 100755 index 000..dbd3c8b --- /dev/null +++ b/t/t3070-wildmatch.sh @@ -0,0 +1,188 @@ +#!/bin/sh +#else +#test_expect_success BROKEN_FNMATCH fnmatch: '$3' '$4' +#! test-wildmatch fnmatch '$3' '$4' +#

[PATCH] exclude: fix a bug in prefix comparison optimization

2012-10-14 Thread Nguyễn Thái Ngọc Duy
When namelen becomes zero at this stage, we have matched the fixed part, but whether it actually matches the pattern still depends on the pattern in exclude. As demonstrated in t3001, path three/a.3 exists and it matches the three/a.3 part in pattern three/a.3[abc], but that does not mean a true

[PATCH/RFC 0/2] Re: [PATCH 2/7] Change canonicalize_url() to use the SVN 1.7 API when available.

2012-10-14 Thread Jonathan Nieder
Hi Eric, Michael G Schwern wrote: On 2012.7.28 6:50 AM, Jonathan Nieder wrote: Michael G Schwern wrote: --- a/perl/Git/SVN/Utils.pm +++ b/perl/Git/SVN/Utils.pm [...] @@ -100,6 +102,20 @@ API as a URL. =cut sub canonicalize_url { + my $url = shift; + + # The 1.7 way to do it

[PATCH 1/2] git svn: do not overescape URLs (fallback case)

2012-10-14 Thread Jonathan Nieder
Subversion's canonical URLs are intended to make URL comparison easy and therefore have strict rules about what characters are special enough to urlencode and what characters should be left alone. When in the fallback codepath because unable to use libsvn's own canonicalization function for some

[PATCH 2/2] git svn: canonicalize_url(): use svn_path_canonicalize when available

2012-10-14 Thread Jonathan Nieder
Until Subversion 1.7 (more precisely r873487), the standard way to canonicalize a URI was to call svn_path_canonicalize(). Use it. This saves git svn from having to rely on our imperfect reimplementation of the same. If the function doesn't exist or returns undef, though, it can use the

[PATCH 0/4] nd/attr-match-optim-more updates

2012-10-14 Thread Nguyễn Thái Ngọc Duy
This is on top of nd/attr-match-optim-more to fix the bug I sent recently [1] sharing the code, thus sharing any fixes. [1] http://thread.gmane.org/gmane.comp.version-control.git/207652 Nguyễn Thái Ngọc Duy (4): exclude: stricten a length check in EXC_FLAG_ENDSWITH case exclude: fix a bug in

[PATCH 1/4] exclude: stricten a length check in EXC_FLAG_ENDSWITH case

2012-10-14 Thread Nguyễn Thái Ngọc Duy
This block of code deals with the basename part only, which has the length of pathlen - (basename - pathname). Stricten the length check and remove pathname from the main expression to avoid confusion. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- dir.c | 5 +++-- 1 file changed, 3

[PATCH 2/4] exclude: fix a bug in prefix compare optimization

2012-10-14 Thread Nguyễn Thái Ngọc Duy
When namelen becomes zero at this stage, we have matched the fixed part, but whether it actually matches the pattern still depends on the pattern in exclude. As demonstrated in t3001, path three/a.3 exists and it matches the three/a.3 part in pattern three/a.3[abc], but that does not mean a true

[PATCH 3/4] exclude/attr: share basename matching code

2012-10-14 Thread Nguyễn Thái Ngọc Duy
match_basename's declaration in dir.h does not have any description to discourage the use of this function elsewhere as this function is highly tied to how excluded_from_list and path_matches work. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- attr.c | 15 --- dir.c | 37

[PATCH 4/4] exclude/attr: share full pathname matching code

2012-10-14 Thread Nguyễn Thái Ngọc Duy
match_pathname's declaration in dir.h does not have any description to discourage the use of this function elsewhere as this function is highly tied to how excluded_from_list and path_matches work. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- attr.c | 35 +++

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-14 Thread René Scharfe
Am 14.10.2012 04:35, schrieb Nguyễn Thái Ngọc Duy: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- ctype.c | 18 ++ git-compat-util.h | 13 + 2 files changed, 31 insertions(+) diff --git a/ctype.c b/ctype.c index faeaf34..b4bf48a 100644 ---

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-14 Thread Nguyen Thai Ngoc Duy
On Sun, Oct 14, 2012 at 7:59 PM, René Scharfe rene.scha...@lsrfire.ath.cx wrote: +const unsigned char sane_ctype2[256] = { + CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, /* 0..15 */ + CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, CN, /* 16..31 */

Re: A design for subrepositories

2012-10-14 Thread Jens Lehmann
Am 14.10.2012 12:19, schrieb Lauri Alanko: Quoting Junio C Hamano gits...@pobox.com: If the submodules ever get reorganized and foo is moved to ./bar, then it is impossible to check out older versions or alternate branches, since the submodule is no longer where it is expected to be at the

fixes of previous commit

2012-10-14 Thread Ralf Thielow
--- Hi Ralf Hi Thomas, thanks for your work! All your suggestions are very good. I just realized that, unfortunately, your original message is far beyond the message size limit on vger (10 bytes according to [1]). So nobody outside of the Cc list has seen it... Oops, I didn't

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-14 Thread René Scharfe
Am 14.10.2012 15:25, schrieb Nguyen Thai Ngoc Duy: On Sun, Oct 14, 2012 at 7:59 PM, René Scharfe rene.scha...@lsrfire.ath.cx wrote: With that, couldn't you squeeze the other two classes into the existing sane_type? No there are still conflicts: 9, 10 and 13 as spaces (vs controls) and 123,

Re: [PATCH v5 02/12] ctype: support iscntrl, ispunct, isxdigit and isprint

2012-10-14 Thread Nguyen Thai Ngoc Duy
On Sun, Oct 14, 2012 at 03:59:31PM +0200, René Scharfe wrote: Am 14.10.2012 15:25, schrieb Nguyen Thai Ngoc Duy: On Sun, Oct 14, 2012 at 7:59 PM, René Scharfe rene.scha...@lsrfire.ath.cx wrote: With that, couldn't you squeeze the other two classes into the existing sane_type? No there

Re: A design for subrepositories

2012-10-14 Thread Lauri Alanko
Quoting Jens Lehmann jens.lehm...@web.de: If the submodules ever get reorganized and foo is moved to ./bar, then it is impossible to check out older versions or alternate branches, since the submodule is no longer where it is expected to be at the origin. Your initial statement is not

[PATCH v5 0/3] completion: refactor and zsh wrapper

2012-10-14 Thread Felipe Contreras
Hi, Here's a bit of reorganition. I'm introducing a new __gitcompadd helper that is useful to wrapp all changes to COMPREPLY. 2nd and 3rd patches show how it's useful. The zsh wrapper is now very very simple, but I haven't received much feedback yet. I hope it will get in at some point in time.

[PATCH v5 1/3] completion: add new __gitcompadd helper

2012-10-14 Thread Felipe Contreras
The idea is to never touch the COMPREPLY variable directly. This allows other completion systems override __gitcompadd, and do something different instead. Also, this allows the simplifcation of the completino tests (separate patch). There should be no functional changes. Signed-off-by: Felipe

[PATCH v5 2/3] tests: use __gitcompadd to simplify completion tests

2012-10-14 Thread Felipe Contreras
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- t/t9902-completion.sh | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 92d7eb4..49c6eb4 100755 --- a/t/t9902-completion.sh +++

[PATCH v5 3/3] completion: add new zsh completion

2012-10-14 Thread Felipe Contreras
It seems there's always issues with zsh's bash completion emulation. I've tried to fix as many as I could and most of the fixes are already in the latest version of zsh, but still, there are issues. There is no point in going through all that pain; the emulation is easy to achieve, and this patch

Re: A design for subrepositories

2012-10-14 Thread Jens Lehmann
Am 14.10.2012 17:27, schrieb Lauri Alanko: Quoting Jens Lehmann jens.lehm...@web.de: If the submodules ever get reorganized and foo is moved to ./bar, then it is impossible to check out older versions or alternate branches, since the submodule is no longer where it is expected to be at the

[PATCH] completion: add format-patch options to send-email

2012-10-14 Thread Felipe Contreras
Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/completion/git-completion.bash | 35 +- t/t9902-completion.sh | 21 2 files changed, 39 insertions(+), 17 deletions(-) diff --git

Re: A design for subrepositories

2012-10-14 Thread Jens Lehmann
Am 14.10.2012 17:27, schrieb Lauri Alanko: Quoting Jens Lehmann jens.lehm...@web.de: What's wrong with making git clone all submodules together with the superproject (when the user said he wants to update all submodules on clone too by setting a - still to be added - config option)? Depends

Re: A design for subrepositories

2012-10-14 Thread Jens Lehmann
Am 14.10.2012 17:27, schrieb Lauri Alanko: Quoting Jens Lehmann jens.lehm...@web.de: Did you notice that git fetch fetches all those submodules too which have been updated in the commits fetched for the superproject, no matter on what branch they are on? No. This would be great, but this is

Re: [PATCH 2/2] config: treat user and xdg config permission problems as errors

2012-10-14 Thread Jeff King
On Sun, Oct 14, 2012 at 01:42:44AM -0700, Jonathan Nieder wrote: Jeff King wrote: For example, servers may depend on /etc/gitconfig to enforce security policy (e.g., setting transfer.fsckObjects or receive.deny*). Perhaps our default should be safe, and people can use GIT_CONFIG_NOSYSTEM

Re: Why git shows staging area to users?

2012-10-14 Thread Matthieu Moy
David Aguilar dav...@gmail.com writes: On Sat, Oct 13, 2012 at 2:08 PM, Yi, EungJun semtlen...@gmail.com wrote: Hi, all. Why git shows staging area to users, compared with the other scms hide it? What benefits users get? http://thkoch2001.github.com/whygitisbetter/#the-staging-area

Re: [PATCH] exclude: fix a bug in prefix comparison optimization

2012-10-14 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: When namelen becomes zero at this stage, we have matched the fixed part, but whether it actually matches the pattern still depends on the pattern in exclude. As demonstrated in t3001, path three/a.3 exists and it matches the three/a.3 part in

Re: A design for subrepositories

2012-10-14 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: Again, the user experience is currently suboptimal. You mentioned multiple things in your responses that you are planning to address, but I am wondering if the first step before doing anything else is to have a list of known-to-be-suboptimal things and

Re: [PATCH 3/4] exclude/attr: share basename matching code

2012-10-14 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: match_basename's declaration in dir.h does not have any description to discourage the use of this function elsewhere as this function is highly tied to how excluded_from_list and path_matches work. If you do want to discourage, please explicitly

Planning to pass the baton to an interim maintainer

2012-10-14 Thread Junio C Hamano
I am planning to * tag 1.8.0 final on Oct 21st (Sun); * go offline on Oct 22nd (Mon); and * come back online on Nov 12th (Mon). Peff, could you be the interim maintainer as you've done in earlier years while I was away? Thanks. -- To unsubscribe from this list: send the line unsubscribe git

Re: [PATCH] exclude: fix a bug in prefix comparison optimization

2012-10-14 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Comparing the corresponding code in dir.c, there is no compare the literal prefix part with strcmp() before doing the fnmatch() optimization. Intended? (warning: I haven't had my caffeine yet) And it turns out that at the point I wrote the response,

Re: A design for subrepositories

2012-10-14 Thread Jens Lehmann
Am 14.10.2012 20:04, schrieb Junio C Hamano: Jens Lehmann jens.lehm...@web.de writes: Again, the user experience is currently suboptimal. You mentioned multiple things in your responses that you are planning to address, but I am wondering if the first step before doing anything else is to

Re: [PATCH] exclude: fix a bug in prefix comparison optimization

2012-10-14 Thread Nguyen Thai Ngoc Duy
On Mon, Oct 15, 2012 at 12:36 AM, Junio C Hamano gits...@pobox.com wrote: With your teach attr.c match the same optimization as dir.c series, you would need something like this diff --git i/attr.c w/attr.c index 6d39406..528e935 100644 --- i/attr.c +++ w/attr.c @@ -710,7 +710,7 @@ static

Re: Planning to pass the baton to an interim maintainer

2012-10-14 Thread Jeff King
On Sun, Oct 14, 2012 at 11:23:07AM -0700, Junio C Hamano wrote: I am planning to * tag 1.8.0 final on Oct 21st (Sun); * go offline on Oct 22nd (Mon); and * come back online on Nov 12th (Mon). Peff, could you be the interim maintainer as you've done in earlier years while I was away?