Re: [PATCH] Revert retry request without query when info/refs?query fails

2012-09-20 Thread Junio C Hamano
Shawn O. Pearce spea...@spearce.org writes: This reverts commit 703e6e76a14825e5b0c960d525f34e607154b4f7. Retrying without the query parameter was added as a workaround for a single broken HTTP server at git.debian.org[1]. The server was misconfigured to route every request with a query

Re: [PATCH] test-string-list.c: Fix some sparse warnings

2012-09-20 Thread Michael Haggerty
On 09/19/2012 09:07 PM, Ramsay Jones wrote: Michael Haggerty wrote: Is there some documentation about how to run sparse on the git codebase? I naively tried make sparse and ended up with zillions of errors like /usr/include/unistd.h:288:54: error: attribute '__leaf__': unknown attribute

Re: [PATCH v4 3/6] Color skipped tests blue

2012-09-20 Thread Adam Spiers
On Thu, Sep 20, 2012 at 6:48 AM, Johannes Sixt j.s...@viscovery.net wrote: Am 9/19/2012 22:24, schrieb Adam Spiers: skip) - tput bold; tput setaf 2;; # bold green + tput setaf 4;;# blue It's unreadable on black background.

[PATCH v5 3/3] Color skipped tests bold blue

2012-09-20 Thread Adam Spiers
Skipped tests indicate incomplete test coverage. Whilst this is not a test failure or other error, it's still not complete success, so according to the universal traffic lights coloring scheme, yellow/brown seems more suitable than green. However, it's more informational than cautionary, so

Re: [PATCH v5 3/3] Color skipped tests bold blue

2012-09-20 Thread Stefano Lattarini
Hi Adam. On 09/20/2012 11:08 AM, Adam Spiers wrote: Skipped tests indicate incomplete test coverage. Whilst this is not a test failure or other error, it's still not complete success, so according to the universal traffic lights coloring scheme, yellow/brown seems more suitable than green.

Re: [PATCH] log --oneline: put decoration at the end of the line

2012-09-20 Thread Nguyen Thai Ngoc Duy
On Thu, Sep 20, 2012 at 6:42 AM, Jeff King p...@peff.net wrote: If you are particular about the exact format, how about using --format=%h%d %s instead? Obviously Duy could do the same to achieve his format, but I think there is still value in considering what the default for --oneline should

[PATCH 1/2] pretty: share code between format_decoration and show_decorations

2012-09-20 Thread Nguyễn Thái Ngọc Duy
This also adds color support to format_decoration() Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- log-tree.c | 55 +-- log-tree.h | 3 +++ pretty.c | 19 +-- 3 files changed, 37 insertions(+), 40 deletions(-)

[PATCH 2/2] pretty: support placeholders %C+ and %C-

2012-09-20 Thread Nguyễn Thái Ngọc Duy
%C+ tells the next specifiers that color is preferred. %C- the opposite. So far only %H, %h and %d support coloring. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/pretty-formats.txt | 2 ++ pretty.c | 13 - 2 files changed, 14

Re: [PATCH 3/2] pretty: support right alignment

2012-09-20 Thread Nguyen Thai Ngoc Duy
And this is a for-fun patch that adds %| to right align everything after that. I'm ignoring problems with line wrapping, i18n and so on. %C+%h %s%|%d looks quite nice. I'm not sure how much useful it is beyond --oneline though. It looks something like this cc543b2 pretty: support placeholders %C+

Re: [PATCH v5 3/3] Color skipped tests bold blue

2012-09-20 Thread Junio C Hamano
Stefano Lattarini stefano.lattar...@gmail.com writes: Hi Adam. On 09/20/2012 11:08 AM, Adam Spiers wrote: Skipped tests indicate incomplete test coverage. Whilst this is not a test failure or other error, it's still not complete success, so according to the universal traffic lights

Re: [PATCH] Revert retry request without query when info/refs?query fails

2012-09-20 Thread Jeff King
On Wed, Sep 19, 2012 at 11:29:34PM -0700, Junio C Hamano wrote: Shawn O. Pearce spea...@spearce.org writes: This reverts commit 703e6e76a14825e5b0c960d525f34e607154b4f7. Retrying without the query parameter was added as a workaround for a single broken HTTP server at git.debian.org[1].

Re: [PATCH 3/2] pretty: support right alignment

2012-09-20 Thread Junio C Hamano
Nguyen Thai Ngoc Duy pclo...@gmail.com writes: And this is a for-fun patch that adds %| to right align everything after that. I'm ignoring problems with line wrapping, i18n and so on. %C+%h %s%|%d looks quite nice. I'm not sure how much useful it is beyond --oneline though. It looks something

Re: [PATCH] Improve legibility of test_expect_code output

2012-09-20 Thread Junio C Hamano
Adam Spiers g...@adamspiers.org writes: On Thu, Sep 20, 2012 at 1:06 AM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: --- No explanation why this is a good idea, nor sign-off? I realised I forgot the sign-off seconds after sending :-( Isn't it

Re: [PATCH] completion: fix shell expansion of items

2012-09-20 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, Sep 20, 2012 at 04:15:15AM +0200, Felipe Contreras wrote: As reported by Jeroen Meijer[1]; the current code doesn't deal properly with items (tags, branches, etc.) that have ${} in them because they get expaned by bash while using compgen. A simple

Re: [PATCH] Improve legibility of test_expect_code output

2012-09-20 Thread Adam Spiers
On Thu, Sep 20, 2012 at 5:50 PM, Junio C Hamano gits...@pobox.com wrote: Do you want this queued on top of your other series, or as an independent change? Independent please. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org

[PATCH 0/2] smart http toggle switch fails

2012-09-20 Thread Jeff King
On Thu, Sep 20, 2012 at 12:24:56PM -0400, Jeff King wrote: I think Shawn's revert is the right thing to do. But it is not complete without the manual workaround. I'm putting that patch together now and should have it out in a few minutes. And here it is. This goes on top of Shawn's revert

[PATCH 1/2] remote-curl: rename is_http variable

2012-09-20 Thread Jeff King
We don't actually care whether the connection is http or not; what we care about is whether it might be smart http. Rename the variable to be more accurate, which will make it easier to later make smart-http optional. Signed-off-by: Jeff King p...@peff.net --- remote-curl.c | 6 +++--- 1 file

[PATCH 2/2] remote-curl: let users turn off smart http

2012-09-20 Thread Jeff King
Usually there is no need for users to specify whether an http remote is smart or dumb; the protocol is designed so that a single initial request is made, and the client can determine the server's capability from the response. However, some misconfigured dumb-only servers may not like the initial

Re: [PATCH] Disable dumb HTTP fallback with GIT_CURL_FALLBACK=0

2012-09-20 Thread Jeff King
On Wed, Sep 19, 2012 at 10:57:35PM -0700, Shawn O. Pearce wrote: I have been looking into this recently, as well. GitHub does not allow dumb http at all these days, Interesting that GitHub doesn't support dumb transfer either. Our objects are still in regular repos, and is served by

Re: [PATCH 2/2] pretty: support placeholders %C+ and %C-

2012-09-20 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: %C+ tells the next specifiers that color is preferred. %C- the opposite. So far only %H, %h and %d support coloring. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com ---

[PATCHv8] clone --single: limit the fetch refspec to fetched branch

2012-09-20 Thread Ralf Thielow
After running git clone --single, the resulting repository has the usual default +refs/heads/*:refs/remotes/origin/* wildcard fetch refspec installed, which means that a subsequent git fetch will end up grabbing all the other branches. Update the fetch refspec to cover only the singly cloned ref

Re: [PATCH 2/2] remote-curl: let users turn off smart http

2012-09-20 Thread Jeff King
On Thu, Sep 20, 2012 at 10:53:15AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: I added the config item as remote.foo.smarthttp. You could also allow http.$url.smart (and just http.smart, for that matter), which could be more flexible if you have multiple remotes pointing

Re: [PATCH] completion: fix shell expansion of items

2012-09-20 Thread SZEDER Gábor
Hi, On Wed, Sep 19, 2012 at 09:46:08PM -0400, Jeff King wrote: On Thu, Sep 20, 2012 at 04:15:15AM +0200, Felipe Contreras wrote: As reported by Jeroen Meijer[1]; the current code doesn't deal properly with items (tags, branches, etc.) that have ${} in them because they get expaned by

Re: [PATCH] completion: fix shell expansion of items

2012-09-20 Thread Jeff King
On Thu, Sep 20, 2012 at 08:11:52PM +0200, SZEDER Gábor wrote: In order to achieve that I took bash-completion's quote() function, which is rather simple, and renamed it to __git_quote() as per Jeff King's suggestion. Solves the original problem for me. Me too. Thanks.

Re: [PATCH 2/2] remote-curl: let users turn off smart http

2012-09-20 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Thu, Sep 20, 2012 at 10:53:15AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: I added the config item as remote.foo.smarthttp. You could also allow http.$url.smart (and just http.smart, for that matter), which could be more flexible if

Re: The GitTogether

2012-09-20 Thread Sebastian Schuberth
On 19.09.2012 15:43, Michael Haggerty wrote: Is there any news about the proposed gatherings? I would be quite interested in attending the developer meeting. October is just around the corner...what's up? I'm also very much interested in attending a gathering Berlin, though preferably not

Re: [PATCH] completion: fix shell expansion of items

2012-09-20 Thread Felipe Contreras
On Thu, Sep 20, 2012 at 8:21 PM, Jeff King p...@peff.net wrote: On Thu, Sep 20, 2012 at 08:11:52PM +0200, SZEDER Gábor wrote: In order to achieve that I took bash-completion's quote() function, which is rather simple, and renamed it to __git_quote() as per Jeff King's suggestion.

[PATCH v2 01/14] Update directory listing API doc to match code

2012-09-20 Thread Adam Spiers
7c4c97c0ac turned the flags in struct dir_struct into a single bitfield variable, but forgot to update this document. Signed-off-by: Adam Spiers g...@adamspiers.org --- Documentation/technical/api-directory-listing.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[PATCH v2 00/14] new git check-ignore sub-command

2012-09-20 Thread Adam Spiers
This is a re-vamp of my original check-ignore series, which aims to address all the feedback which was raised in the first round of reviews. The most notable changes are the CLI options and output formats as suggested by Junio and Nguyễn; now there are three levels of verbosity: --quiet, default,

[PATCH v2 05/14] Rename excluded_from_list() to is_excluded_from_list()

2012-09-20 Thread Adam Spiers
Continue adopting clearer names for exclude functions. This 'is_*' naming pattern for functions returning booleans was discussed here: http://thread.gmane.org/gmane.comp.version-control.git/204661/focus=204924 Signed-off-by: Adam Spiers g...@adamspiers.org --- dir.c | 11 ++-

[PATCH v2 06/14] Rename excluded() to is_excluded()

2012-09-20 Thread Adam Spiers
Continue adopting clearer names for exclude functions. This is_* naming pattern for functions returning booleans was discussed here: http://thread.gmane.org/gmane.comp.version-control.git/204661/focus=204924 Signed-off-by: Adam Spiers g...@adamspiers.org --- attr.c | 2 +- dir.c | 10

[PATCH v2 07/14] Refactor is_excluded_from_list()

2012-09-20 Thread Adam Spiers
The excluded function uses a new helper function called last_exclude_matching_from_list() to perform the inner loop over all of the exclude patterns. The helper just tells us whether the path is included, excluded, or undecided. However, it may be useful to know _which_ pattern was triggered.

[PATCH v2 09/14] Refactor is_path_excluded()

2012-09-20 Thread Adam Spiers
In a similar way to the previous commit, this extracts a new helper function last_exclude_matching_path() which return the last exclude_list element which matched, or NULL if no match was found. is_path_excluded() becomes a wrapper around this, and just returns 0 or 1 depending on whether any

[PATCH v2 08/14] Refactor is_excluded()

2012-09-20 Thread Adam Spiers
In a similar way to the previous commit, this extracts a new helper function last_exclude_matching() which returns the last exclude_list element which matched, or NULL if no match was found. is_excluded() becomes a wrapper around this, and just returns 0 or 1 depending on whether any matching

[PATCH v2 10/14] For each exclude pattern, store information about where it came from

2012-09-20 Thread Adam Spiers
For exclude patterns read in from files, the filename is stored together with the corresponding line number (counting starting at 1). For exclude patterns provided on the command line, the sequence number is negative, with counting starting at -1, so for example the 2nd pattern provided via

[PATCH v2 11/14] Refactor treat_gitlinks()

2012-09-20 Thread Adam Spiers
Extract the body of the for loop in treat_gitlinks() into a separate treat_gitlink() function so that it can be reused elsewhere. This paves the way for a new check-ignore sub-command. Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/add.c | 49

[PATCH v2 12/14] Extract some useful pathspec handling code from builtin/add.c into a library

2012-09-20 Thread Adam Spiers
This is in preparation for reuse by a new git check-ignore command. Signed-off-by: Adam Spiers g...@adamspiers.org --- Makefile | 2 ++ builtin/add.c | 95 ++--- pathspec.c| 97

[PATCH v2 03/14] Rename cryptic 'which' variable to more consistent name

2012-09-20 Thread Adam Spiers
'el' is only *slightly* less cryptic, but is already used as the variable name for a struct exclude_list pointer in numerous other places, so this reduces the number of cryptic variable names in use by one :-) Signed-off-by: Adam Spiers g...@adamspiers.org --- dir.c | 10 +- dir.h | 4

[PATCH v2 13/14] Provide free_directory() for reclaiming dir_struct memory

2012-09-20 Thread Adam Spiers
Signed-off-by: Adam Spiers g...@adamspiers.org --- Documentation/technical/api-directory-listing.txt | 2 ++ dir.c | 23 +-- dir.h | 1 + 3 files changed, 24 insertions(+), 2 deletions(-)

[PATCH v2 04/14] Rename path_excluded() to is_path_excluded()

2012-09-20 Thread Adam Spiers
Start adopting clearer names for exclude functions. This 'is_*' naming pattern for functions returning booleans was agreed here: http://thread.gmane.org/gmane.comp.version-control.git/204661/focus=204924 Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/add.c | 2 +-

[PATCH v2 02/14] Improve documentation and comments regarding directory traversal API

2012-09-20 Thread Adam Spiers
From the perspective of a newcomer to the codebase, the directory traversal API has a few potentially confusing properties. These comments clarify a few key aspects and will hopefully make it easier to understand for other newcomers in the future. Signed-off-by: Adam Spiers g...@adamspiers.org

Re: git diff across submodules

2012-09-20 Thread Jens Lehmann
Am 20.09.2012 00:31, schrieb Junio C Hamano: Junio C Hamano gits...@pobox.com writes: I also suspect that you do not have to change git diff at all to show the patch recursively by using the attribute mechanism (look in Documentation/gitattributes.text for a string GIT_EXTERNAL_DIFF). It

Re: [PATCH] Documentation: Document signature showing options

2012-09-20 Thread Junio C Hamano
Thanks. -- 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: [PATCH 5/7] grep.c: mark private file-scope symbols as static

2012-09-20 Thread Ramsay Jones
Junio C Hamano wrote: Ramsay Jones ram...@ramsay1.demon.co.uk writes: Heh, so I obviously didn't see this before sending the patch yesterday! :-D Yes, this solves the problem addressed by yesterday's patch, so please ignore that. However, this tickles sparse to complain as well ... ;-)

Re: git diff across submodules

2012-09-20 Thread Junio C Hamano
Jens Lehmann jens.lehm...@web.de writes: That's pretty cool! Even though diff options like --stat and --name-only still won't take into account what happened inside the submodule this approach makes it possible to see the diff recursively. Wouldn't it make sense add this script to contrib

Re: [PATCH v3 4/6] Refactor mechanics of testing in a sub test-lib

2012-09-20 Thread Junio C Hamano
Adam Spiers g...@adamspiers.org writes: This will allow us to test the test framework more thoroughly without disrupting the top-level test metrics. Signed-off-by: Adam Spiers g...@adamspiers.org --- t/t-basic.sh | 67 1 file

Re: [PATCH 2/2] remote-curl: let users turn off smart http

2012-09-20 Thread Junio C Hamano
Jeff King p...@peff.net writes: I'm half-tempted to just drop the config entirely, leave GIT_SMART_HTTP=false as an escape hatch, and see if anybody even cares. Sounds like a very attractive minimalistic way to go forward. We can always add per-remote configuration when we find it necessary,

Re: [PATCHv8] clone --single: limit the fetch refspec to fetched branch

2012-09-20 Thread Junio C Hamano
Thanks. -- 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: [PATCH v2 00/14] new git check-ignore sub-command

2012-09-20 Thread Junio C Hamano
Adam Spiers g...@adamspiers.org writes: Adam Spiers (14): Update directory listing API doc to match code Improve documentation and comments regarding directory traversal API Rename cryptic 'which' variable to more consistent name Rename path_excluded() to is_path_excluded() Rename

Re: [PATCH 2/2] remote-curl: let users turn off smart http

2012-09-20 Thread Jeff King
On Thu, Sep 20, 2012 at 02:15:20PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: I'm half-tempted to just drop the config entirely, leave GIT_SMART_HTTP=false as an escape hatch, and see if anybody even cares. Sounds like a very attractive minimalistic way to go forward.

Re: [PATCH v2 10/14] For each exclude pattern, store information about where it came from

2012-09-20 Thread Junio C Hamano
Adam Spiers g...@adamspiers.org writes: void add_exclude(const char *string, const char *base, - int baselen, struct exclude_list *el) + int baselen, struct exclude_list *el, const char *src, int srcpos) { struct exclude *x; size_t len; @@ -341,6

Re: [PATCH v2 00/14] new git check-ignore sub-command

2012-09-20 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Adam Spiers g...@adamspiers.org writes: Adam Spiers (14): Update directory listing API doc to match code Improve documentation and comments regarding directory traversal API Rename cryptic 'which' variable to more consistent name Rename

Re: git archive --format zip utf-8 issues

2012-09-20 Thread René Scharfe
Am 18.09.2012 23:12, schrieb Junio C Hamano: René Scharfe rene.scha...@lsrfire.ath.cx writes: WindowsInfo-ZIP unzip 7-Zip PeaZip builtin Linux msysgit Windows 7-Zip 9.20 0 0 4626

Re: [PATCH] Disable dumb HTTP fallback with GIT_CURL_FALLBACK=0

2012-09-20 Thread Shawn Pearce
On Thu, Sep 20, 2012 at 10:24 AM, Jeff King p...@peff.net wrote: On Wed, Sep 19, 2012 at 10:57:35PM -0700, Shawn O. Pearce wrote: so transient errors on the initial smart contact can cause us to fall back to dumb, Transient errors is actually what is leading me down this path. We see

Re: [PATCH v2 00/14] new git check-ignore sub-command

2012-09-20 Thread Adam Spiers
On Thu, Sep 20, 2012 at 10:43 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Adam Spiers g...@adamspiers.org writes: Adam Spiers (14): Update directory listing API doc to match code Improve documentation and comments regarding directory traversal API

git diff-tree -r -C output inexact sometimes

2012-09-20 Thread Cristian Tibirna
Hello A colleague of mine discovered an inconsistency in the functioning of git diff-tree -r -C in specific conditions. As tenuous as these conditions might seem (once you run the script in attachment and analyse its output), please rest assured that it comes from a real-life case. Running

Re: [PATCH v2 00/14] new git check-ignore sub-command

2012-09-20 Thread Junio C Hamano
Adam Spiers g...@adamspiers.org writes: Sure, I can do that, but shouldn't this convention be documented in SubmittingPatches? People must have learned this by imitating what senior contributors send to the list, but the [Subject] area: title thing does not appear in that document. I agree it

Re: [PATCH] Disable dumb HTTP fallback with GIT_CURL_FALLBACK=0

2012-09-20 Thread Jeff King
On Thu, Sep 20, 2012 at 04:05:03PM -0700, Shawn O. Pearce wrote: But right now I am seeing failures in libcurl's SSL connection that may also be causing the smart connection failures. For example this trace, where libcurl was just not able to connect to respond to the 401 with a password. I

[PATCH 0/3] nicer receive-pack errors over http

2012-09-20 Thread Jeff King
While we are on the subject of http user experience, I thought I'd mention this patch to route more errors from index-pack back to the user. We're not doing it yet at GitHub, but I plan to apply it soon. The first patch is a cleanup and minor bug fix. The second is the interesting one. The third

[PATCH 1/3] receive-pack: redirect unpack-objects stdout to /dev/null

2012-09-20 Thread Jeff King
The unpack-objects command should not generally produce any output on stdout. However, if it's given extra input after the packfile, it will spew the remainder to stdout. When called by receive-pack, this means we will break protocol, since our stdout is connected to the remote send-pack.

[PATCH 2/3] receive-pack: send pack-processing stderr over sideband

2012-09-20 Thread Jeff King
Receive-pack invokes either unpack-objects or index-pack to handle the incoming pack. However, we do not redirect the stderr of the sub-processes at all, so it is never seen by the client. From the initial thread adding sideband support, which is here:

[PATCH 3/3] receive-pack: drop n/a on unpacker errors

2012-09-20 Thread Jeff King
The output from git push currently looks like this: $ git push dest HEAD fatal: [some message from index-pack] error: unpack failed: index-pack abnormal exit To dest ! [remote rejected] HEAD - master (n/a (unpacker error)) That n/a is meant to be the per-ref status is not available