[PATCH v2 3/9] t4203: demonstrate loss of uppercase characters in canonical email

2013-07-14 Thread Eric Sunshine
The email addresses read from .mailmap are downcased before being inserted into the mailmap data structure, which undesirably loses information. It is impossible, for instance, to map to . Demonstrate this problem. Signed-off-by: Eric Sunshine --- t/t4203-mailmap.sh | 9 + 1 file chang

[PATCH v2 5/9] mailmap: debug: fix out-of-order fprintf() arguments

2013-07-14 Thread Eric Sunshine
Resolve segmentation fault due to arguments passed in wrong order. Signed-off-by: Eric Sunshine --- mailmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailmap.c b/mailmap.c index a7e92db..0516354 100644 --- a/mailmap.c +++ b/mailmap.c @@ -309,7 +309,7 @@ int map_user(s

[PATCH v2 2/9] mailmap: do not lose single-letter names

2013-07-14 Thread Eric Sunshine
From: Junio C Hamano In parse_name_and_email() function, there is this line: *name = (nstart < nend ? nstart : NULL); When the function is given a buffer "A ", nstart scans from the beginning of the buffer, skipping whitespaces (there isn't any, so nstart points at the buffer), while n

[PATCH v2 4/9] mailmap: do not downcase mailmap entries

2013-07-14 Thread Eric Sunshine
From: Junio C Hamano The email addresses in the records read from the .mailmap file are downcased very early, and then used to match against e-mail addresses in the input. Because we do use case insensitive version of string list to manage these entries, there is no need to do this, and worse ye

[PATCH v2 6/9] mailmap: debug: fix malformed fprintf() format directive

2013-07-14 Thread Eric Sunshine
Resolve segmentation fault due to size_t variable being consumed by '%s'. Signed-off-by: Eric Sunshine --- mailmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailmap.c b/mailmap.c index 0516354..62d998a 100644 --- a/mailmap.c +++ b/mailmap.c @@ -337,7 +337,7 @@ int map

[PATCH v2 8/9] mailmap: debug: avoid passing NULL to fprintf() '%s' directive

2013-07-14 Thread Eric Sunshine
POSIX does not state the behavior of format directive '%s' when passed a NULL pointer. Some implementations interpolate literal "(null)"; others may crash. Callers of debug_mm() often pass NULL as indication of either a missing name or email address. Instead, let's always supply a proper string po

[PATCH v2 7/9] mailmap: debug: eliminate -Wformat field precision type warning

2013-07-14 Thread Eric Sunshine
The compiler complains that '*' in fprintf() format directive "%.*s" should have type int, but we pass size_t. Fix this. Signed-off-by: Eric Sunshine --- mailmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mailmap.c b/mailmap.c index 62d998a..4cc6e81 100644 --- a/

[PATCH v2 9/9] mailmap: style fixes

2013-07-14 Thread Eric Sunshine
From: Junio C Hamano Wrap overlong lines and format the multi-line comments to match our coding style. Signed-off-by: Junio C Hamano Signed-off-by: Eric Sunshine --- mailmap.c | 42 +++--- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/mail

[PATCH v2 0/9] mailmap fixes

2013-07-14 Thread Eric Sunshine
This is a re-roll of jc/mailmap-case-insensitivity [1] in 'pu', which fixes an off-by-one parsing bug and a case-losing bug in mailmap. Changes since v1: * Replace v1 [4/4] with new [1/9] and [3/9] which explicitly demonstrate each bug being fixed. * Fix several crashes and issues in mailmap d

[PATCH v2 1/9] t4203: demonstrate loss of single-character name in mailmap entry

2013-07-14 Thread Eric Sunshine
A bug in mailmap.c:parse_name_and_email() causes it to overlook the single-character name in "A " and parse it only as "". Demonstrate this problem. Signed-off-by: Eric Sunshine --- t/t4203-mailmap.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/t/t4203-mailmap.sh b/t/t4203-mailm

Re: [PATCH] http.c: fix parsing of http.sslCertPasswordProtected variable

2013-07-14 Thread Kyle J. McKay
On Jul 14, 2013, at 21:13, Junio C Hamano wrote: Mark Lodato writes: On Fri, Jul 12, 2013 at 3:52 PM, Junio C Hamano wrote: Jonathan Nieder writes: FWIW the GIT_SSL_CERT_PASSWORD_PROTECTED envvar has a similar "can only enable" behavior, but since it's documented, that's not as big of a

Re: [PATCH] git-clone.txt: remove the restriction on pushing from a shallow clone

2013-07-14 Thread Duy Nguyen
On Mon, Jul 15, 2013 at 8:01 AM, Duy Nguyen wrote: >> Also, the sender may have cloned from the receiver (fully) and then >> fetched a different history shallowly from elsewhere. The receiver >> may have no commit on that history, including the shallow-bottom. >> > > Hmm.. right. And the receiver

Re: [PATCH] .mailmap: Combine more (email, name) to individual persons

2013-07-14 Thread Jonathan Nieder
Stefan Beller wrote: > Signed-off-by: Stefan Beller Markup and methodology look correct. Fwiw, Reviewed-by: Jonathan Nieder Is this meant to be squashed with 94b410bb (.mailmap: Map email addresses to names, 2013-07-12)? Ciao, Jonathan -- To unsubscribe from this list: send the line "unsubsc

Re: [PATCH v4 2/2] post-receive-email: deprecate script in favor of git-multimail

2013-07-14 Thread Jonathan Nieder
Michael Haggerty wrote: > Add a notice to the top of post-receive-email explaining that the > script is no longer under active development and pointing the user to > git-multimail. I think the spirit of this patch is sane. Some thoughts on wording: [...] > --- a/contrib/hooks/post-receive-email

Re: [PATCH v4 1/2] git-multimail: an improved replacement for post-receive-email

2013-07-14 Thread Jonathan Nieder
Michael Haggerty wrote: > Add git-multimail, a tool for generating notification emails for > pushes to a Git repository. It is largely plug-in compatible with > post-receive-email, and is proposed to eventually replace that script. > The advantages of git-multimail relative to post-receive-email

Re: [PATCH v3] config: add support for http..* settings

2013-07-14 Thread Jeff King
On Sun, Jul 14, 2013 at 09:02:19PM -0700, Junio C Hamano wrote: > > Or proceed with what's there right now (there are a few pending > > updates from reviewers) and then, as Junio says above, adjust it later > > if needed? > > I have been assuming that "strictly textual match" will be a subset > o

Re: [PATCH v3] config: add support for http..* settings

2013-07-14 Thread Jeff King
On Sat, Jul 13, 2013 at 12:46:17PM -0700, Kyle J. McKay wrote: > I expect it will be easier just to normalize the URL without > splitting. That is, lowercase the parts that are case-insensitive > (scheme and host name) and adjust the URL-escaping to remove URL > escaping (%xx) from characters tha

Re: [PATCH 7/7] push: document --lockref

2013-07-14 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Nieder writes: >> Then I will use >> >> (5c) git push --force >> >> which means not to use this new lockref trick that looks at my >> remote-tracking branch and instead to just force the ref update. > > I am not sure I follow. Do other contributors update th

Re: [PATCH v3] config: add support for http..* settings

2013-07-14 Thread Jeff King
On Fri, Jul 12, 2013 at 06:07:35AM -0700, Kyle J. McKay wrote: > >It looks like you're matching the URLs as raw strings, and I don't see > >any canonicalization going on. What happens if I have > >"https://example.com/foo+bar"; in my config, but then I visit > >"https://example.comfoo%20bar";? >

Re: [PATCH 1/7] cat-file: disable object/refname ambiguity check for batch mode

2013-07-14 Thread Jeff King
On Fri, Jul 12, 2013 at 12:30:07PM +0200, Michael Haggerty wrote: > But with particular respect to "git cat-file", I see problems: > > 1. get_ref_snapshot() would have to read all loose and packed refs > within the specified subtree, because loose refs have to be read before > packed refs. So th

Re: [PATCH] fixup! pull: require choice between rebase/merge on non-fast-forward pull

2013-07-14 Thread Junio C Hamano
John Keeping writes: > Here is that patch. The test changes here are all reverting changes in > ae2dab2 (pull: require choice between rebase/merge on non-fast-forward > pull, 2013-06-27) - with this change to git-pull.sh the only change > needed in the tests is in t5524-pull-msg: > > $ git d

Re: [PATCH 1/7] cat-file: disable object/refname ambiguity check for batch mode

2013-07-14 Thread Jeff King
On Sun, Jul 14, 2013 at 08:45:37PM -0700, Junio C Hamano wrote: > >> To cat-file we could add an option like "--sha1-only" or "--literal" or > >> "--no-dwim" (... better names are failing me) which would skip *all* > >> dwimming of 40-character strings. It would also assume that any shorter > >>

Re: [PATCH v2 1/2] send-email: squelch warning from Net::SMTP::SSL

2013-07-14 Thread Junio C Hamano
Torsten Bögershausen writes: >> I didn't stick the require in the eval because git-send-email will fail >> in this case anyway if you don't have it, since Net::SMTP::SSL requires >> it. Let me know if you want a patch for this on top of the existing two >> in this series and I'll provide one. >>

Re: [PATCH] http.c: fix parsing of http.sslCertPasswordProtected variable

2013-07-14 Thread Junio C Hamano
Mark Lodato writes: > On Fri, Jul 12, 2013 at 3:52 PM, Junio C Hamano wrote: >> >> Jonathan Nieder writes: >> >> > FWIW the GIT_SSL_CERT_PASSWORD_PROTECTED envvar has a similar "can >> > only enable" behavior, but since it's documented, that's not as big >> > of a problem. Do you remember why

Re: [PATCH 7/7] push: document --lockref

2013-07-14 Thread Junio C Hamano
Jonathan Nieder writes: > (4) gitk @{u}@{1}..@{u}; # Is the change good? > > (5a) git pull --rebase; git push; # Yes, put my change on top of it > (5b) git push --force; # No, my change is better! > > So far so good. But what if yet another change is made upstream > between ste

Re: [PATCH v3] config: add support for http..* settings

2013-07-14 Thread Junio C Hamano
"Kyle J. McKay" writes: > On Jul 12, 2013, at 13:58, Aaron Schrab wrote: > ... > This should guarantee a match in the scenario Aaron proposes above and > still has pretty much the same easy explanation to the user. > > Shall I go ahead and add that to the next patch version? > > Or proceed with w

Re: [PATCH 7/7] push: document --lockref

2013-07-14 Thread Junio C Hamano
Johannes Sixt writes: > Am 14.07.2013 21:17, schrieb Junio C Hamano: >> Johannes Sixt writes: >>> I actually think that by implying allow-no-ff in --lockref, you are >>> hurting users who have configured a push refspec without a + prefix: >>> They suddenly do not get the push denied when it is n

Re: [PATCH 1/7] cat-file: disable object/refname ambiguity check for batch mode

2013-07-14 Thread Junio C Hamano
Jeff King writes: >> To cat-file we could add an option like "--sha1-only" or "--literal" or >> "--no-dwim" (... better names are failing me) which would skip *all* >> dwimming of 40-character strings. It would also assume that any shorter >> strings are abbreviated SHA-1s and fail if they are n

Re: [PATCH 1/6] templates: Use heredoc in pre-commit hook

2013-07-14 Thread Junio C Hamano
Jonathan Nieder writes: >> Based on 98770971aef8d1cbc78876d9023d10aa25df0526 in original patch >> series from 2013-06-10. > > Please don't include this. The audience for the commit message > doesn't have that commit to compare to. > > If you want to preserve the original date, the way to do that

Re: [PATCH v2 1/2] send-email: squelch warning from Net::SMTP::SSL

2013-07-14 Thread Torsten Bögershausen
On 2013-07-14 19.03, brian m. carlson wrote: > On Sun, Jul 14, 2013 at 07:19:10PM +0530, Ramkumar Ramachandra wrote: >> Torsten Bögershausen wrote: >>> /usr/bin/perl -MIO::Socket::SSL -e 'print "$IO::Socket::SSL::VERSION\n";' >>> 1.22 >> >> This is ancient! (I have 1.84). Is it not possible to do

Re: [PATCH] mailmap: Testing the single letter name case.

2013-07-14 Thread Eric Sunshine
On Sat, Jul 13, 2013 at 4:20 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Indeed the patch tests for both bugs unintentionally. > > I was puzzled because I do not think that is what is happening with > the posted patch. > > The off-by-one fix seems to be correct from code inspection, bu

Re: [PATCH] git-clone.txt: remove the restriction on pushing from a shallow clone

2013-07-14 Thread Duy Nguyen
On Mon, Jul 15, 2013 at 1:52 AM, Junio C Hamano wrote: > Duy Nguyen writes: > >> On Sun, Jul 14, 2013 at 4:25 AM, Jonathan Nieder wrote: >>> Hi, >>> >>> Nguyễn Thái Ngọc Duy wrote: >>> Since 52fed6e (receive-pack: check connectivity before concluding "git push" - 2011-09-02), receive-p

Re: [PATCH] gitweb: Ensure OPML text fits inside its box.

2013-07-14 Thread Jonathan Nieder
Tony Finch wrote: > The rss_logo CSS style has a fixed width which is too narrow for > the string "OPML". Replace the fixed width with horizontal padding > so the text fits with nice margins. Sounds sensible. Can we have your sign-off? (Likewise for the next patch.) Thanks, Jonathan -- To unsu

Re: [PATCH 4/4] diff.c: Do not initialize a variable, which gets reassigned anyway.

2013-07-14 Thread Jonathan Nieder
Stefan Beller wrote: > Signed-off-by: Stefan Beller > --- > diff.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) [...] > --- a/diff.c > +++ b/diff.c > @@ -1677,21 +1677,19 @@ static void show_stats(struct diffstat_t *data, > struct diff_options *options) > } > >

Re: [PATCH 3/4] diff-no-index: Remove unused variable.

2013-07-14 Thread Jonathan Nieder
Stefan Beller wrote: > [Subject: diff-no-index: Remove unused variable.] [...] > --- a/diff-no-index.c > +++ b/diff-no-index.c [...] > - else if (!strcmp(argv[i], "-q")) { > + else if (!strcmp(argv[i], "-q")) > - options |= DIFF_SILENT_ON_REMOVED; >

Re: [PATCH v2 1/2] send-email: squelch warning from Net::SMTP::SSL

2013-07-14 Thread Ramkumar Ramachandra
brian m. carlson wrote: > I didn't stick the require in the eval because git-send-email will fail > in this case anyway if you don't have it, since Net::SMTP::SSL requires > it. Let me know if you want a patch for this on top of the existing two > in this series and I'll provide one. Yeah, that'd

Re: [PATCH 2/4] commit: Fix a memory leak in determine_author_info

2013-07-14 Thread Jonathan Nieder
Stefan Beller wrote: > Signed-off-by: Stefan Beller Thanks. That was quick. :) Reviewed-by: Jonathan Nieder -- 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.htm

Re: [PATCH 1/4] daemon.c:handle: Remove unneeded check for null pointer.

2013-07-14 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > addr doesn't need to be checked at that line as it it already accessed > 7 lines before in the if (addr->sa_family). Good catch. This asymmetry has been present since the lines were first introduced (all guarded by "if (addr)") in v1.4.1-rc1~3^2~4 (Log peer address wh

[PATCH 4/4] diff.c: Do not initialize a variable, which gets reassigned anyway.

2013-07-14 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/diff.c b/diff.c index e53ddad..24382d7 100644 --- a/diff.c +++ b/diff.c @@ -1677,21 +1677,19 @@ static void show_stats(struct diffstat_t *data, struct diff_options *options)

[PATCH 3/4] diff-no-index: Remove unused variable.

2013-07-14 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff-no-index.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/diff-no-index.c b/diff-no-index.c index e66fdf3..842add4 100644 --- a/diff-no-index.c +++ b/diff-no-index.c @@ -181,19 +181,18 @@ static int queue_diff(struct diff_options *o,

[PATCH 2/4] commit: Fix a memory leak in determine_author_info

2013-07-14 Thread Stefan Beller
The date variable is assigned new memory via xmemdupz and 2 lines later it is assigned new memory again via xmalloc, but the first assignment is never freed nor used. Signed-off-by: Stefan Beller --- builtin/commit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/builtin/commit.c b/builtin/c

[PATCH 1/4] daemon.c:handle: Remove unneeded check for null pointer.

2013-07-14 Thread Stefan Beller
addr doesn't need to be checked at that line as it it already accessed 7 lines before in the if (addr->sa_family). Signed-off-by: Stefan Beller --- daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon.c b/daemon.c index 6aeddcb..5e48c1e 100644 --- a/daemon.c +++ b/

Re: [PATCH 7/7] push: document --lockref

2013-07-14 Thread Jonathan Nieder
Johannes Sixt wrote: > Am 14.07.2013 22:34, schrieb Jonathan Nieder: >> Would a '*' that acts like --lockref on a per ref basis address your >> concerns? > > No, because I think that new syntax is not necessary. > > But admittedly, I haven't spent any time to think about push.default > modes other

Re: [PATCH 7/7] push: document --lockref

2013-07-14 Thread Johannes Sixt
Am 14.07.2013 22:34, schrieb Jonathan Nieder: > Johannes Sixt wrote: > >> Sorry, IMO, this goes into a totally wrong direction, in particular, I >> think that this is going to close to door to make --lockref the default >> some day in a way that helps everyone. > > Would a '*' that acts like --lo

Re: [PATCH 7/7] push: document --lockref

2013-07-14 Thread Jonathan Nieder
Jonathan Nieder wrote: > Johannes Sixt wrote: >> Sorry, IMO, this goes into a totally wrong direction, in particular, I >> think that this is going to close to door to make --lockref the default >> some day in a way that helps everyone. > > Would a '*' that acts like --lockref on a per ref basis a

Re: [PATCH 7/7] push: document --lockref

2013-07-14 Thread Jonathan Nieder
Johannes Sixt wrote: > Sorry, IMO, this goes into a totally wrong direction, in particular, I > think that this is going to close to door to make --lockref the default > some day in a way that helps everyone. Would a '*' that acts like --lockref on a per ref basis address your concerns? I realiz

Re: [PATCH 1/6] templates: Use heredoc in pre-commit hook

2013-07-14 Thread Jonathan Nieder
Richard Hartmann wrote: > fwiw, I replaced my one single echo with heredoc as you > suggested I do that. I don't mind undoing that, or I can drop it from > this series altogether. > > Guidance would be appreciated. :) Thanks for your work, and no problem. Both Junio's and my responses were

Re: [PATCH 7/7] push: document --lockref

2013-07-14 Thread Johannes Sixt
Am 14.07.2013 21:17, schrieb Junio C Hamano: > Johannes Sixt writes: >> I actually think that by implying allow-no-ff in --lockref, you are >> hurting users who have configured a push refspec without a + prefix: >> They suddenly do not get the push denied when it is not a fast-forward >> anymore.

Re: [PATCH 1/6] templates: Use heredoc in pre-commit hook

2013-07-14 Thread Richard Hartmann
On Sun, Jul 14, 2013 at 9:20 PM, Junio C Hamano wrote: > Shells on modern distros and platforms have "echo" built-in, so this > patch replaces series of writes internal to the shell with a fork to > cat with heredoc (which often is implemented with a temporary file). True; fwiw, I replaced my on

Re: [PATCH 1/6] templates: Use heredoc in pre-commit hook

2013-07-14 Thread Junio C Hamano
Richard Hartmann writes: > Spawning a new subprocess for every line printed is inefficient. This is not a valid justification at all, is it? Shells on modern distros and platforms have "echo" built-in, so this patch replaces series of writes internal to the shell with a fork to cat with hered

Re: [PATCH 7/7] push: document --lockref

2013-07-14 Thread Junio C Hamano
Johannes Sixt writes: > All you have been saying is that you find your > >git push --lockref there topic > > is more useful than my > >git push --lockref there +topic > > You are trading crystal clear semantics to save users ONE character to > type. IMO, it's a bad deal. Think how you wo

Re: [PATCH 6/6] template: Fix comment indentation in pre-rebase hook

2013-07-14 Thread Jonathan Nieder
Richard Hartmann wrote: > The other hooks use two whitespace for indentation instead of tabs > to signify code in the example/echo output. > Follow the same layout in templates/hooks--pre-rebase.sample I don't understand the point of this one. Is it just consistency for the sake of consistency?

Re: [PATCH] git-clone.txt: remove the restriction on pushing from a shallow clone

2013-07-14 Thread Junio C Hamano
Duy Nguyen writes: > On Sun, Jul 14, 2013 at 4:25 AM, Jonathan Nieder wrote: >> Hi, >> >> Nguyễn Thái Ngọc Duy wrote: >> >>> Since 52fed6e (receive-pack: check connectivity before concluding "git >>> push" - 2011-09-02), receive-pack is prepared to deal with broken >>> push, a shallow push can't

Re: [PATCH 5/6] templates: Fix ASCII art in pre-rebase hook

2013-07-14 Thread Jonathan Nieder
Richard Hartmann wrote: > The example assumes 8-char wide tabs and breaks for people with > 4-char wide tabs. Convert all of those tabs to whitespace, instead. Makes sense --- we cannot assume much about the end-user's editor setup used to look at sample hooks. Thanks. -- To unsubscribe from thi

Re: [PATCH 4/6] Documentation: Update manpage for pre-commit hook

2013-07-14 Thread Jonathan Nieder
Richard Hartmann wrote: > --- a/Documentation/githooks.txt > +++ b/Documentation/githooks.txt > @@ -80,7 +80,8 @@ causes the 'git commit' to abort. > > The default 'pre-commit' hook, when enabled, catches introduction > of lines with trailing whitespaces and aborts the commit when > -such a li

Re: [PATCH 2/6] templates: Reformat pre-commit hook's message

2013-07-14 Thread Jonathan Nieder
Richard Hartmann wrote: > Now that we're using heredoc, the message can span the full 80 chars. The output is going to a console and not an email, so makes sense. :) > Verbatim copy of 634709b489bb3db79f59127fd6bf79c5fd9b5ddf in original > patch series from 2013-06-10. As in patch 1, please dro

Re: [PATCH 1/6] templates: Use heredoc in pre-commit hook

2013-07-14 Thread Jonathan Nieder
Hi, Richard Hartmann wrote: > Spawning a new subprocess for every line printed is inefficient. > Use heredoc, instead. I think this makes sense as a code clarity, simplicity, and internationalizability improvement, but don't like the precedent of eliminating 'echo' for the sake of fork removal (

Re: [PATCH v2 1/2] send-email: squelch warning from Net::SMTP::SSL

2013-07-14 Thread brian m. carlson
On Sun, Jul 14, 2013 at 07:19:10PM +0530, Ramkumar Ramachandra wrote: > Torsten Bögershausen wrote: > > /usr/bin/perl -MIO::Socket::SSL -e 'print "$IO::Socket::SSL::VERSION\n";' > > 1.22 > > This is ancient! (I have 1.84). Is it not possible to do an > ssl-verify-peer in older versions (is it ex

[PATCH 3/6] templates: Fix spelling in pre-commit hook

2013-07-14 Thread Richard Hartmann
Based on 0b9b01276553de8097442c3c996b7a49367dd234 in original patch series. Signed-off-by: Richard Hartmann --- templates/hooks--pre-commit.sample |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample

[PATCH 5/6] templates: Fix ASCII art in pre-rebase hook

2013-07-14 Thread Richard Hartmann
The example assumes 8-char wide tabs and breaks for people with 4-char wide tabs. Convert all of those tabs to whitespace, instead. Verbatim copy of 11edd8a05778700382e6a21cfc0a6b5b72eff852 in original patch series from 2013-06-10. Signed-off-by: Richard Hartmann --- templates/hooks--pre-rebase

[PATCH 4/6] Documentation: Update manpage for pre-commit hook

2013-07-14 Thread Richard Hartmann
Verbatim copy of 4b8234b2693af634a77ea059331d1658e070f6d7 in original patch series from 2013-06-10. Signed-off-by: Richard Hartmann --- Documentation/githooks.txt |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt inde

[PATCH 6/6] template: Fix comment indentation in pre-rebase hook

2013-07-14 Thread Richard Hartmann
The other hooks use two whitespace for indentation instead of tabs to signify code in the example/echo output. Follow the same layout in templates/hooks--pre-rebase.sample Based on d153a68bebfabc1db5241d02ee75fa5cb4538ab0 in original patch series from 2013-06-10. Signed-off-by: Richard Hartmann

[PATCH 1/6] templates: Use heredoc in pre-commit hook

2013-07-14 Thread Richard Hartmann
Spawning a new subprocess for every line printed is inefficient. Use heredoc, instead. Based on 98770971aef8d1cbc78876d9023d10aa25df0526 in original patch series from 2013-06-10. Signed-off-by: Richard Hartmann --- templates/hooks--pre-commit.sample | 25 + 1 file chan

[PATCH 2/6] templates: Reformat pre-commit hook's message

2013-07-14 Thread Richard Hartmann
Now that we're using heredoc, the message can span the full 80 chars. Verbatim copy of 634709b489bb3db79f59127fd6bf79c5fd9b5ddf in original patch series from 2013-06-10. Signed-off-by: Richard Hartmann --- templates/hooks--pre-commit.sample |6 ++ 1 file changed, 2 insertions(+), 4 dele

[PATCH 0/6] Update to janitorial work on hook templates

2013-07-14 Thread Richard Hartmann
Dear all, I worked Jeff's and Junio's feedback into this patch series, referencing the old commits. As stated earlier, you are welcome to drop 1/6, but 2/6 depends on it. Your choice, both is fine by me. Thanks, Richard Richard Hartmann (6): templates: Use heredoc in pre-commit hook templat

Re: [RFC/PATCH v2 1/1] cygwin: Add fast_lstat() and fast_fstat() functions

2013-07-14 Thread Mark Levedahl
On 07/10/2013 04:23 PM, Ramsay Jones wrote: Commit adbc0b6b ("cygwin: Use native Win32 API for stat", 30-09-2008) added a Win32 specific implementation of the stat functions. In order to handle absolute paths, cygwin mount points and symbolic links, this implementation may fall back on the standa

[PATCH] Cygwin has trustable filemode

2013-07-14 Thread Mark Levedahl
The supported Cygwin distribution on supported Windows versions provides complete support for POSIX filemodes, so enable this by default. git as distributed by the Cygwin project is configured this way. This fixes one testsuite failure: t3300 test 17 (diff-index -M -p with mode change quotes funny

Re: [PATCH] test-lib.sh - cygwin does not have usable FIFOs

2013-07-14 Thread Mark Levedahl
On 07/13/2013 08:57 PM, Jonathan Nieder wrote: I'm not sure I follow. Are you saying Windows users would never want to access Subversion repositories? Thanks, Jonathan Quite the contrary. SVN and git both work on Windows without having POSIX FIFOs - Windows does have FIFOS, but the semantics a

[PATCH] fixup! pull: require choice between rebase/merge on non-fast-forward pull

2013-07-14 Thread John Keeping
--- On Fri, Jun 28, 2013 at 03:41:34PM -0700, Junio C Hamano wrote: > John Keeping writes: > > I don't think "git pull remote branch" falls into the same category as > > plain "git pull" so I'm not convinced that defaulting to merge there is > > unreasonable. The original message about this [1] d

Re: [PATCH 7/7] push: document --lockref

2013-07-14 Thread John Keeping
On Sat, Jul 13, 2013 at 01:08:09PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > If "--lockref" automatically implies "--allow-no-ff" (the design in > > the reposted patch), you cannot express that combination. But once > > you use "--lockref" in such a situation , for the push to

[PATCH] commit: Fix a memory leak in determine_author_info

2013-07-14 Thread Stefan Beller
The date variable is assigned new memory via xmemdupz and 2 lines later it is assigned new memory again via xmalloc, but the first assignment is never freed nor used. --- builtin/commit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/builtin/commit.c b/builtin/commit.c index 790e5ab..00da83c

Re: [PATCH v2 1/2] send-email: squelch warning from Net::SMTP::SSL

2013-07-14 Thread Ramkumar Ramachandra
Torsten Bögershausen wrote: > /usr/bin/perl -MIO::Socket::SSL -e 'print "$IO::Socket::SSL::VERSION\n";' > 1.22 This is ancient! (I have 1.84). Is it not possible to do an ssl-verify-peer in older versions (is it exported as something else)? The older versions don't display the warning anyway, an

[PATCH] more mailmap entries

2013-07-14 Thread Stefan Beller
This patch goes on top of branch sb/mailmap-updates Stefan Beller (1): .mailmap: Combine more (email, name) to individual persons .mailmap | 42 +++--- 1 file changed, 35 insertions(+), 7 deletions(-) -- 1.8.3.2.804.g0da7a53.dirty -- To unsubscribe from

[PATCH] .mailmap: Combine more (email, name) to individual persons

2013-07-14 Thread Stefan Beller
I got more responses from people regarding the .mailmap file. All added persons gave permission to add them to the .mailmap file. It's mostly email mappings again. However we also have Nick Stokoe, who contributed as Nick Woolley. He changed his name, but kept the email. Signed-off-by: Stefan Bel

Re: [PATCH v2 46/46] parse_pathspec: accept :(icase)path syntax

2013-07-14 Thread Eric Sunshine
On Sun, Jul 14, 2013 at 4:36 AM, Nguyễn Thái Ngọc Duy wrote: > diff --git a/Documentation/git.txt b/Documentation/git.txt > index 3571a1b..546eea4 100644 > --- a/Documentation/git.txt > +++ b/Documentation/git.txt > @@ -879,6 +883,10 @@ GIT_NOGLOB_PATHSPECS:: > Setting this variable to `1`

[PATCH v2 44/46] pathspec: make --literal-pathspecs disable pathspec magic

2013-07-14 Thread Nguyễn Thái Ngọc Duy
--literal-pathspecs and its equivalent environment variable are probably used for scripting. In that setting, pathspec magic may be unwanted. Disabling globbing in individual pathspec can be done via :(literal) magic. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git.txt | 4 ++-- p

[PATCH v2 45/46] pathspec: support :(glob) syntax

2013-07-14 Thread Nguyễn Thái Ngọc Duy
:(glob)path differs from plain pathspec that it uses wildmatch with WM_PATHNAME while the other uses fnmatch without FNM_PATHNAME. The difference lies in how '*' (and '**') is processed. With the introduction of :(glob) and :(literal) and their global options --[no]glob-pathspecs, the user can:

[PATCH v2 46/46] parse_pathspec: accept :(icase)path syntax

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git.txt | 8 Documentation/glossary-content.txt | 3 ++ builtin/add.c | 6 ++- builtin/ls-tree.c | 2 +- cache.h| 1 + dir.c

[PATCH v2 42/46] Kill limit_pathspec_to_literal() as it's only used by parse_pathspec()

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- dir.c | 8 pathspec.c | 8 ++-- pathspec.h | 2 -- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/dir.c b/dir.c index bf22498..79465e7 100644 --- a/dir.c +++ b/dir.c @@ -1473,14 +1473,6 @@ int remove_path(const char *name

[PATCH v2 38/46] tree-diff: remove the use of pathspec's raw[] in follow-rename codepath

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Put a checkpoint to guard unsupported pathspec features in future. Signed-off-by: Nguyễn Thái Ngọc Duy --- tree-diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree-diff.c b/tree-diff.c index e1145c6..21a50d8 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -224,7 +22

[PATCH v2 43/46] pathspec: support :(literal) syntax for noglob pathspec

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/glossary-content.txt | 20 builtin/add.c | 2 +- builtin/diff.c | 2 +- dir.c | 15 --- pathspec.c | 11 -

[PATCH v2 36/46] Remove init_pathspec() in favor of parse_pathspec()

2013-07-14 Thread Nguyễn Thái Ngọc Duy
While at there, move free_pathspec() to pathspec.c Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/blame.c| 8 +--- builtin/log.c | 2 +- builtin/ls-files.c | 11 +-- diff-lib.c | 2 +- dir.c | 58 --

[PATCH v2 40/46] parse_pathspec: make sure the prefix part is wildcard-free

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Prepending prefix to pathspec is a trick to workaround the fact that commands can be executed in a subdirectory, but all git commands run at worktree's root. The prefix part should always be treated as literal string. Make it so. Signed-off-by: Nguyễn Thái Ngọc Duy --- cache.h| 2 ++ path.c

[PATCH v2 35/46] Remove diff_tree_{setup,release}_paths

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/blame.c | 12 ++-- builtin/reset.c | 9 + combine-diff.c | 4 ++-- diff.h | 2 -- notes-merge.c | 4 ++-- revision.c | 5 +++-- tree-diff.c | 18 -- 7 files changed, 22 insertions(+), 32 del

[PATCH v2 41/46] parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN

2013-07-14 Thread Nguyễn Thái Ngọc Duy
The prefix length is passed from one command to another via the new magic 'prefix'. The magic is for parse_pathspec's internal use only, not visible to parse_pathspec's callers. Prefix length is not preserved across commands when --literal-pathspecs is specified (no magic is allowed, including 'pr

[PATCH v2 37/46] Remove match_pathspec() in favor of match_pathspec_depth()

2013-07-14 Thread Nguyễn Thái Ngọc Duy
match_pathspec_depth was created to replace match_pathspec (see 61cf282 (pathspec: add match_pathspec_depth() - 2010-12-15). It took more than two years, but the replacement finally happens :-) Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/add.c | 30 +++--- builtin/check-ign

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

2013-07-14 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 --- builtin/l

[PATCH v2 30/46] Convert report_path_error to take struct pathspec

2013-07-14 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 | 19 +++ cache.h| 2 +- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index c2f3

[PATCH v2 25/46] line-log: convert to use parse_pathspec

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- line-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/line-log.c b/line-log.c index 4bbb09b..843a334 100644 --- a/line-log.c +++ b/line-log.c @@ -747,7 +747,7 @@ void line_log_init(struct rev_info *rev, const char *prefix, struct

[PATCH v2 33/46] Convert add_files_to_cache to take struct pathspec

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/add.c| 11 +++ builtin/commit.c | 2 +- cache.h | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index 34c9358..a47aeb4 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -16

[PATCH v2 34/46] Convert common_prefix() to use struct pathspec

2013-07-14 Thread Nguyễn Thái Ngọc Duy
The code now takes advantage of nowildcard_len field. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/commit.c | 2 +- builtin/ls-files.c | 2 +- dir.c | 31 +++ dir.h | 2 +- 4 files changed, 18 insertions(+), 19 deletions(-) diff --gi

[PATCH v2 24/46] reset: convert to use parse_pathspec

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/reset.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index afa6e02..313b296 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -174,7 +174,10 @@ static void di

[PATCH v2 26/46] Convert read_cache_preload() to take struct pathspec

2013-07-14 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 | 2 +- preload-index.c | 20 +++- 7 files changed, 19 inse

[PATCH v2 23/46] add: convert to use parse_pathspec

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/add.c | 103 +- pathspec.c| 43 2 files changed, 45 insertions(+), 101 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index f45d9d4..9a7235e 100644 ---

[PATCH v2 31/46] Convert refresh_index to take struct pathspec

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

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

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/add.c | 4 +++- builtin/clean.c| 2 +- builtin/grep.c | 2 +- builtin/ls-files.c | 2 +- dir.c | 16 +++- dir.h | 4 ++-- wt-status.c| 2 +- 7 files changed, 20 insertions(+), 12 dele

[PATCH v2 27/46] Convert run_add_interactive to use struct pathspec

2013-07-14 Thread Nguyễn Thái Ngọc Duy
This passes the pathspec, more or less unmodified, to git-add--interactive. The command itself does not process pathspec. It simply passes the pathspec to other builtin commands. So if all those commands support pathspec, we're good. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/add.c | 2

[PATCH v2 29/46] checkout: convert read_tree_some to take struct pathspec

2013-07-14 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 5d31767..c2f3571 100644 --- a/builtin/checkout.c +++ b/bu

[PATCH v2 28/46] Convert unmerge_cache to take struct pathspec

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- rerere.c | 2 +- resolve-undo.c | 4 ++-- resolve-undo.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rerere.c b/rerere.c index 27afbfe..4105bca 100644 --- a/rerere.c +++ b/rerere.c @@ -668,7 +668,7 @@ int rerere_forget(stru

[PATCH v2 18/46] checkout: convert to use parse_pathspec

2013-07-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/checkout.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 7fe0bff..6721de2 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -46,7 +46

  1   2   >