Re: [PATCH] Add support for a 'pre-push' hook

2012-11-17 Thread Aske Olsson
On Sat, Nov 17, 2012 at 7:39 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 11/16/2012 09:30 PM, Junio C Hamano wrote: Aske Olsson askeols...@gmail.com writes: If the script .git/hooks/pre-push exists and is executable it will be called before a `git push` command, and when the

Re: [PATCH] Add support for a 'pre-push' hook

2012-11-17 Thread Aske Olsson
On Fri, Nov 16, 2012 at 9:25 PM, Matthieu Moy matthieu@grenoble-inp.fr wrote: Aske Olsson askeols...@gmail.com writes: +--no-verify:: + This option bypasses the pre-push hook. + See also linkgit:githooks[5]. + -q:: --quiet:: Suppress all output, including the listing of updated

Re: Auto-repo-repair

2012-11-17 Thread Enrico Weigelt
Hi, You can't reliably just grab the broken objects, because most transports don't support grabbing arbitrary objects (you can do it if you have shell access to a known-good repository, but it's not automated). can we introduce a new or extend existing transports to support that ? cu --

Re: [PATCH] tcsh-completion re-using git-completion.bash

2012-11-17 Thread SZEDER Gábor
On Fri, Nov 16, 2012 at 10:46:16PM +0100, Felipe Contreras wrote: On Fri, Nov 16, 2012 at 10:22 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Fri, Nov 16, 2012 at 10:03:41PM +0100, Felipe Contreras wrote: As I understand the main issues with using the completion script with zsh are the

Re: [RFC/PATCH 5/5] completion: refactor __gitcomp_1

2012-11-17 Thread SZEDER Gábor
[Wow, that's quite the Cc-list above. I wonder why e.g. Robert ended up there, when all his sins were to add a couple of 'git svn' options back in 2009.] On Sat, Nov 17, 2012 at 02:38:18AM +0100, Felipe Contreras wrote: It's only used by __gitcomp, so move some code there and avoid going

Re: [RFC/PATCH 3/5] completion: trivial test improvement

2012-11-17 Thread SZEDER Gábor
On Sat, Nov 17, 2012 at 02:38:16AM +0100, Felipe Contreras wrote: Instead of passing a dummy , let's check if the last character is a space, and then move the _cword accordingly. Apparently we were passing all the way to compgen, which fortunately expanded it to nothing. Glad you noticed

Re: [RFC/PATCH 4/5] completion: get rid of compgen

2012-11-17 Thread SZEDER Gábor
On Sat, Nov 17, 2012 at 02:38:17AM +0100, Felipe Contreras wrote: The functionality we use is very simple, plus, this fixes a known breakage 'complete tree filename with metacharacters'. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/completion/git-completion.bash |

[PATCH 0/7] completion: fix expansion issues with compgen

2012-11-17 Thread SZEDER Gábor
This series fixes the expansion issues with compgen reported by Jeroen Meijer a while ago in http://article.gmane.org/gmane.comp.version-control.git/201596 The problem is that the compgen Bash-builtin performs expansion on all words in the wordlist given to its -W option, breaking Git's

[PATCH 2/7] completion: fix args of run_completion() test helper

2012-11-17 Thread SZEDER Gábor
To simulate that the user hit 'git TAB, the 'basic' test sets up the rather strange command line containing the two words git i.e. the second word on the command line consists of two double quotes. This is not what happens for real, however, because after 'git TAB' the second word on the

[PATCH 3/7] completion: add tests for the __gitcomp_nl() completion helper function

2012-11-17 Thread SZEDER Gábor
Test __gitcomp_nl()'s basic functionality, i.e. that trailing space, prefix, and suffix are added correctly. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9902-completion.sh | 84 +++ 1 file changed, 84 insertions(+) diff --git

[PATCH 1/7] completion: make the 'basic' test more tester-friendly

2012-11-17 Thread SZEDER Gábor
The 'basic' test uses 'grep -q' to filter the resulting possible completion words while looking for the presence or absence of certain git commands, and relies on grep's exit status to indicate a failure. This works fine as long as there are no errors. However, in case of a failure it doesn't

[PATCH 4/7] completion: add tests for invalid variable name among completion words

2012-11-17 Thread SZEDER Gábor
The compgen Bash-builtin performs expansion on all words in the wordlist given to its -W option, breaking Git's completion script in various ways if one of those words can be expanded. The breakage can be simply bogus possible completion words, but it can also be a failure: $ git branch

[PATCH 6/7] completion: fix expansion issue in __gitcomp()

2012-11-17 Thread SZEDER Gábor
The compgen Bash-builtin performs expansion on all words in the wordlist given to its -W option, breaking Git's completion script when words passed to __gitcomp() contain expandable substrings. In __gitcomp() we only use a small subset ot compgen's functionality, namely the filtering of matching

[PATCH 7/7] completion: remove the now unused __gitcomp_1() internal helper function

2012-11-17 Thread SZEDER Gábor
Since the __gitcomp_1() helper is basically only an implementation detail of __gitcomp() that exists solely for performance reasons (see ab02dfe5 (bash completion: Improve responsiveness of git-log completion, 2008-07-13)), it's quite unlikely that anyone uses or ever used it besides __gitcomp().

[PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread SZEDER Gábor
The compgen Bash-builtin performs expansion on all words in the wordlist given to its -W option, breaking Git's completion script when refs or filenames passed to __gitcomp_nl() contain expandable substrings. At least one user can't use ref completion at all in a repository, which contains tags

Re: [RFC/PATCH 5/5] completion: refactor __gitcomp_1

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 11:58 AM, SZEDER Gábor sze...@ira.uka.de wrote: # The following function is based on code from: @@ -249,10 +246,16 @@ __gitcomp () --*=) ;; *) - local IFS=$'\n' - __gitcompadd $(__gitcomp_1 ${1-} ${4-}) ${2-} $cur_

Re: [RFC/PATCH 4/5] completion: get rid of compgen

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 12:00 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sat, Nov 17, 2012 at 02:38:17AM +0100, Felipe Contreras wrote: The functionality we use is very simple, plus, this fixes a known breakage 'complete tree filename with metacharacters'. Signed-off-by: Felipe Contreras

Re: [PATCH] tcsh-completion re-using git-completion.bash

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 11:56 AM, SZEDER Gábor sze...@ira.uka.de wrote: On Fri, Nov 16, 2012 at 10:46:16PM +0100, Felipe Contreras wrote: But even in that case, if push comes to shoves, this zsh wrapper can ultimately read COMPREPLY and figure things backwards, as even more previous versions

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor sze...@ira.uka.de wrote: __gitcomp_nl () { local IFS=$'\n' - COMPREPLY=($(compgen -P ${2-} -S ${4- } -W $1 -- ${3-$cur})) + COMPREPLY=($(awk -v pfx=${2-} -v sfx=${4- } -v cur=${3-$cur} ' + BEGIN { +

git-credential-gnome-keyring fails at multilib

2012-11-17 Thread Peter Alfredsen
Downstream bug report: https://bugs.gentoo.org/443634 The git-credential-gnome-keyring Makefile doesn't allow overriding its variables, making for spectacular link failure if you use CFLAGS for aught but decoration. gcc -g -O2 -Wall -I/usr/include/gnome-keyring-1 -I/usr/include/glib-2.0

Re: [PATCH 6/7] completion: fix expansion issue in __gitcomp()

2012-11-17 Thread SZEDER Gábor
On Sat, Nov 17, 2012 at 12:39:24PM +0100, Felipe Contreras wrote: On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor sze...@ira.uka.de wrote: -# Generates completion reply with compgen, appending a space to possible -# completion words, if necessary. +# Generates completion reply for the word

Re: [RFC/PATCH 4/5] completion: get rid of compgen

2012-11-17 Thread SZEDER Gábor
On Sat, Nov 17, 2012 at 12:42:38PM +0100, Felipe Contreras wrote: On Sat, Nov 17, 2012 at 12:00 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sat, Nov 17, 2012 at 02:38:17AM +0100, Felipe Contreras wrote: The functionality we use is very simple, plus, this fixes a known breakage 'complete

Re: [RFC/PATCH 5/5] completion: refactor __gitcomp_1

2012-11-17 Thread SZEDER Gábor
On Sat, Nov 17, 2012 at 12:27:40PM +0100, Felipe Contreras wrote: On Sat, Nov 17, 2012 at 11:58 AM, SZEDER Gábor sze...@ira.uka.de wrote: # The following function is based on code from: @@ -249,10 +246,16 @@ __gitcomp () --*=) ;; *) - local

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread SZEDER Gábor
On Sat, Nov 17, 2012 at 12:50:39PM +0100, Felipe Contreras wrote: On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor sze...@ira.uka.de wrote: __gitcomp_nl () { local IFS=$'\n' - COMPREPLY=($(compgen -P ${2-} -S ${4- } -W $1 -- ${3-$cur})) + COMPREPLY=($(awk -v

Re: [PATCH] tcsh-completion re-using git-completion.bash

2012-11-17 Thread SZEDER Gábor
On Sat, Nov 17, 2012 at 12:46:27PM +0100, Felipe Contreras wrote: On Sat, Nov 17, 2012 at 11:56 AM, SZEDER Gábor sze...@ira.uka.de wrote: On Fri, Nov 16, 2012 at 10:46:16PM +0100, Felipe Contreras wrote: But even in that case, if push comes to shoves, this zsh wrapper can ultimately read

using multiple version of git simultaneously

2012-11-17 Thread arif
Hi, I'm trying to use different version of git simultaneously. So how can i append some suffix (like --program-suffix=git1.8) so that i can distinguish between different versions. -- Cheers arif -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

Re: [PATCH] Rename V15_MINGW_HEADERS into CYGWIN_OLD_WINSOCK_HEADERS

2012-11-17 Thread Mark Levedahl
On 11/17/2012 02:09 AM, Torsten Bögershausen wrote: See commit 380a4d927bff693c42fc6b22c3547bdcaac4bdc3: Update cygwin.c for new mingw-64 win32 api headers Cygwin up to 1.7.16 uses some header file from the WINE project Cygwin 1.7.17 uses some header file from the mingw-64 project As the old

Re: using multiple version of git simultaneously

2012-11-17 Thread Tomas Carnecky
On Sat, 17 Nov 2012 20:25:21 +0600, arif aft...@gmail.com wrote: I'm trying to use different version of git simultaneously. So how can i append some suffix (like --program-suffix=git1.8) so that i can distinguish between different versions. Install each version into its own prefix

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread Heiko Voigt
Hi, sorry for the late reply but my git time is limited. On Sat, Nov 10, 2012 at 02:02:32PM -0500, W. Trevor King wrote: On Fri, Nov 09, 2012 at 05:29:27PM +0100, Heiko Voigt wrote: I think we should agree on a behavior for this option and implement it the same time when add learns about

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread Heiko Voigt
Hi, On Sun, Nov 11, 2012 at 10:00:48AM -0500, W. Trevor King wrote: On Sun, Nov 11, 2012 at 02:33:45AM -0800, Junio C Hamano wrote: In order to avoid losing (or creating) local-only submodule commits, I'll probably bail (with an error) on non-fast-forward pulls. Can anyone else think of

Re: [PATCH] tcsh-completion re-using git-completion.bash

2012-11-17 Thread Marc Khouzam
On Fri, Nov 16, 2012 at 4:56 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Fri, Nov 16, 2012 at 10:20 PM, Junio C Hamano gits...@pobox.com wrote: The point is not about the quality of zsh's emulation of (k)sh when it is run under that mode, but is about not having to have that

Re: [PATCH] tcsh-completion re-using git-completion.bash

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 6:15 PM, Marc Khouzam marc.khou...@gmail.com wrote: On Fri, Nov 16, 2012 at 4:56 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Fri, Nov 16, 2012 at 10:20 PM, Junio C Hamano gits...@pobox.com wrote: The point is not about the quality of zsh's emulation of

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 3:14 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sat, Nov 17, 2012 at 12:50:39PM +0100, Felipe Contreras wrote: On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor sze...@ira.uka.de wrote: __gitcomp_nl () { local IFS=$'\n' - COMPREPLY=($(compgen -P

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread W. Trevor King
On Sat, Nov 17, 2012 at 04:04:42PM +0100, Heiko Voigt wrote: On Sat, Nov 10, 2012 at 01:44:37PM -0500, W. Trevor King wrote: $ git submodule pull-branch I think floating submodules is a misleading name for this feature though, since the checkout SHA is explicitly specified. We're

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 8:08 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, Nov 17, 2012 at 3:14 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sat, Nov 17, 2012 at 12:50:39PM +0100, Felipe Contreras wrote: On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor sze...@ira.uka.de wrote:

Re: [RFC/PATCH 4/5] completion: get rid of compgen

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 3:12 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sat, Nov 17, 2012 at 12:42:38PM +0100, Felipe Contreras wrote: On Sat, Nov 17, 2012 at 12:00 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sat, Nov 17, 2012 at 02:38:17AM +0100, Felipe Contreras wrote: The functionality

Re: `git mv` has ambiguous error message for non-existing target

2012-11-17 Thread Junio C Hamano
Patrick Lehner lehner.patr...@gmx.de writes: But just because mv's error essage isnt very good, does that mean git mv's error message mustn't be better? Did I say the error message from 'mv' was not very good in the message you are responding to (by the way, this is why you should never

[PATCH v4 0/5] push: update remote tags only with force

2012-11-17 Thread Chris Rorvick
This patch set can be divided into two sets: 1. Provide useful advice for rejected tag references. push: return reject reasons via a mask push: add advice for rejected tag reference Recommending a merge to resolve a rejected tag update seems nonsensical since the tag does

[PATCH v4 1/5] push: return reject reasons via a mask

2012-11-17 Thread Chris Rorvick
Pass all rejection reasons back from transport_push(). The logic is simpler and more flexible with regard to providing useful feedback. Signed-off-by: Chris Rorvick ch...@rorvick.com --- builtin/push.c | 13 - builtin/send-pack.c | 4 ++-- transport.c | 17

[PATCH v4 4/5] push: flag updates that require force

2012-11-17 Thread Chris Rorvick
Add a flag for indicating an update to a reference requires force. Currently the nonfastforward flag of a ref is used for this when generating status the status message. A separate flag insulates the status logic from the details of set_ref_status_for_push(). Signed-off-by: Chris Rorvick

[PATCH v4 5/5] push: update remote tags only with force

2012-11-17 Thread Chris Rorvick
References are allowed to update from one commit-ish to another if the former is a ancestor of the latter. This behavior is oriented to branches which are expected to move with commits. Tag references are expected to be static in a repository, though, thus an update to a tag (lightweight and

[PATCH v4 3/5] push: flag updates

2012-11-17 Thread Chris Rorvick
If the reference exists on the remote and the the update is not a delete, then mark as an update. This is in preparation for handling tags and branches differently when pushing. Signed-off-by: Chris Rorvick ch...@rorvick.com --- cache.h | 1 + remote.c | 18 +++--- 2 files

Re: [PATCH v2 4/6] completion: consolidate test_completion*() tests

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 12:41 AM, Junio C Hamano gits...@pobox.com wrote: Felipe Contreras felipe.contre...@gmail.com writes: No need to have two versions; if a second argument is specified, use that, otherwise use stdin. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com ---

Re: Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread Heiko Voigt
On Sat, Nov 17, 2012 at 02:20:27PM -0500, W. Trevor King wrote: On Sat, Nov 17, 2012 at 04:30:07PM +0100, Heiko Voigt wrote: (2) git diff [$path] and friends in the superproject compares the HEAD of thecheckout of the submodule at $path with the tip of the branch named by

[PATCH v4.1 5/5] push: update remote tags only with force

2012-11-17 Thread Chris Rorvick
References are allowed to update from one commit-ish to another if the former is a ancestor of the latter. This behavior is oriented to branches which are expected to move with commits. Tag references are expected to be static in a repository, though, thus an update to a tag (lightweight and

Re: Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread W. Trevor King
On Sat, Nov 17, 2012 at 10:31:30PM +0100, Heiko Voigt wrote: On Sat, Nov 17, 2012 at 02:20:27PM -0500, W. Trevor King wrote: On Sat, Nov 17, 2012 at 04:30:07PM +0100, Heiko Voigt wrote: (2) git diff [$path] and friends in the superproject compares the HEAD of thecheckout of the

Re: [PATCH 1/7] completion: make the 'basic' test more tester-friendly

2012-11-17 Thread Jonathan Nieder
SZEDER Gábor wrote: The 'basic' test uses 'grep -q' to filter the resulting possible completion words while looking for the presence or absence of certain git commands, and relies on grep's exit status to indicate a failure. [...] To make testers' life easier provide some output about the

Re: [PATCH 2/7] completion: fix args of run_completion() test helper

2012-11-17 Thread Jonathan Nieder
SZEDER Gábor wrote: Fix this by passing the command line to run_completion() as separate words. Good catch. The change makes sense, the code looks saner after the fix, and since this is test code any breakage should be caught quickly, so Reviewed-by: Jonathan Nieder jrnie...@gmail.com

Re: [PATCH 3/7] completion: add tests for the __gitcomp_nl() completion helper function

2012-11-17 Thread Jonathan Nieder
SZEDER Gábor wrote: --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -155,6 +155,90 @@ test_expect_success '__gitcomp - suffix' ' test_cmp expected out ' +test_expect_success '__gitcomp_nl - trailing space' ' + sed -e s/Z$// expected -\EOF '$' is usually a shell

Re: [PATCH 4/7] completion: add tests for invalid variable name among completion words

2012-11-17 Thread Jonathan Nieder
SZEDER Gábor wrote: The breakage can be simply bogus possible completion words, but it can also be a failure: $ git branch '${foo.bar}' $ git checkout TAB bash: ${foo.bar}: bad substitution Or arbitrary code execution: $

Re: [RFC/PATCH 4/5] completion: get rid of compgen

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 8:33 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, Nov 17, 2012 at 3:12 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sat, Nov 17, 2012 at 12:42:38PM +0100, Felipe Contreras wrote: On Sat, Nov 17, 2012 at 12:00 PM, SZEDER Gábor sze...@ira.uka.de wrote:

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 8:28 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, Nov 17, 2012 at 8:08 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, Nov 17, 2012 at 3:14 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sat, Nov 17, 2012 at 12:50:39PM +0100, Felipe

Re: [PATCH 5/7] completion: fix expansion issues in __gitcomp_nl()

2012-11-17 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor sze...@ira.uka.de wrote: __gitcomp_nl () { local IFS=$'\n' - COMPREPLY=($(compgen -P ${2-} -S ${4- } -W $1 -- ${3-$cur})) + COMPREPLY=($(awk -v pfx=${2-} -v sfx=${4- } -v cur=${3-$cur} ' + BEGIN { +

Re: t5801-remote-helpers.sh fails

2012-11-17 Thread Torsten Bögershausen
On 10.11.12 23:05, Felipe Contreras wrote: On Sat, Nov 10, 2012 at 8:20 PM, Torsten Bögershausen tbo...@web.de wrote: On 11/10/2012 08:15 PM, Felipe Contreras wrote: Hi, On Sat, Nov 10, 2012 at 2:48 PM, Torsten Bögershausen tbo...@web.de wrote: on peff/pu t5801 fails, the error is in

Re: [PATCH] Rename V15_MINGW_HEADERS into CYGWIN_OLD_WINSOCK_HEADERS

2012-11-17 Thread Junio C Hamano
Mark Levedahl mleved...@gmail.com writes: ... -V15_MINGW_HEADERS = YesPlease +CYGWIN_OLD_WINSOCK_HEADERS = YesPlease WINSOCK is certainly a part of the win32 api implementation, but it is is the entire win32api that changed, not just the tiny bit dealing with