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

2013-01-12 Thread Jardel Weyrich
Step 1: jweyrich@pharao:test_clone1 [* master]$ git remote -v origin /Volumes/sandbox/test (fetch) origin /Volumes/sandbox/test (push) jweyrich@pharao:test_clone1 [* master]$ git config -l | grep '^remote\.origin' remote.origin.url=/Volumes/sandbox/test

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

2013-01-12 Thread Junio C Hamano
Jardel Weyrich jweyr...@gmail.com writes: Step 1: jweyrich@pharao:test_clone1 [* master]$ git remote -v origin /Volumes/sandbox/test (fetch) origin /Volumes/sandbox/test (push) jweyrich@pharao:test_clone1 [* master]$ git config -l | grep '^remote\.origin'

[PATCH] t/lib-cvs: cvsimport no longer works without Python = 2.7

2013-01-12 Thread Junio C Hamano
The new cvsimport requires at least Python 2.7 to work; do not fail the cvsimport tests on platforms without one. Signed-off-by: Junio C Hamano gits...@pobox.com --- Junio C Hamano gits...@pobox.com writes: http://docs.python.org/2/library/subprocess.html tells me that check_output has

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

2013-01-12 Thread Sascha Cunz
Am Freitag, 11. Januar 2013, 23:10:36 schrieb Junio C Hamano: Jardel Weyrich jweyr...@gmail.com writes: I believe `remote set-url --add --push` has a bug. Performed tests with v1.8.0.1 and v1.8.1 (Mac OS X). Quoting the relevant part of the documentation: set-url Changes URL

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

2013-01-12 Thread Jardel Weyrich
On Sat, Jan 12, 2013 at 6:44 AM, Sascha Cunz sascha...@babbelbox.org wrote: Am Freitag, 11. Januar 2013, 23:10:36 schrieb Junio C Hamano: Jardel Weyrich jweyr...@gmail.com writes: I believe `remote set-url --add --push` has a bug. Performed tests with v1.8.0.1 and v1.8.1 (Mac OS X).

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

2013-01-12 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 11/01/2013 19:48, Manlio Perillo ha scritto: The git-completion.bash script did not implemented full, git aware, support to complete paths, for git commands that operate on files within the current working directory or the index. [...] +#

Re: missing objects -- prevention

2013-01-12 Thread Jeff King
On Sat, Jan 12, 2013 at 06:39:52AM +0530, Sitaram Chamarty wrote: 1. The repo has a ref R pointing at commit X. 2. A user starts a push to another ref, Q, of commit Y that builds on X. Git advertises ref R, so the sender knows they do not need to send X, but only Y. The

[PATCH] Support FTP-over-SSL/TLS for regular FTP

2013-01-12 Thread Modestas Vainius
Add a boolean http.sslTry option which allows to enable AUTH SSL/TLS and encrypted data transfers when connecting via regular FTP protocol. Default is false since it might trigger certificate verification errors on misconfigured servers. Signed-off-by: Modestas Vainius modes...@vainius.eu ---

Re: [PATCH] Support FTP-over-SSL/TLS for regular FTP

2013-01-12 Thread Matt Kraai
On Sat, Jan 12, 2013 at 03:59:52PM +0200, Modestas Vainius wrote: @@ -306,6 +311,11 @@ static CURL *get_curl_handle(void) if (curl_ftp_no_epsv) curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0); +#ifdef CURLOPT_USE_SSL +if (curl_ssl_try) +

Re: [PATCH] Support FTP-over-SSL/TLS for regular FTP

2013-01-12 Thread Modestas Vainius
Hello, Saturday 12 January 2013 06:25:21 rašė: On Sat, Jan 12, 2013 at 03:59:52PM +0200, Modestas Vainius wrote: @@ -306,6 +311,11 @@ static CURL *get_curl_handle(void) if (curl_ftp_no_epsv) curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0); +#ifdef

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

2013-01-12 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 11/01/2013 23:02, Junio C Hamano ha scritto: Manlio Perillo manlio.peri...@gmail.com writes: +# Process path list returned by ls-files and diff-index --name-only +# commands, in order to list only file names relative to a specified +#

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

2013-01-12 Thread Michael Haggerty
On 01/11/2013 04:32 AM, Junio C Hamano wrote: From: Eric S. Raymond e...@thyrsus.com The combination of git-cvsimport and cvsps had serious problems. Agreed. [...] This patch also removes Michael Haggerty's git-cvsimport tests (t960[123]) from the git tree. These are actually

Re: [PATCH] t/lib-cvs: cvsimport no longer works without Python = 2.7

2013-01-12 Thread Michael Haggerty
I have the feeling I'm only seeing one side of this conversation... On 01/12/2013 09:40 AM, Junio C Hamano wrote: The new cvsimport requires at least Python 2.7 to work; do not fail the cvsimport tests on platforms without one. Signed-off-by: Junio C Hamano gits...@pobox.com --- Junio C

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

2013-01-12 Thread Eric S. Raymond
Junio C Hamano gits...@pobox.com: And here is what I got: Hm. In my version of these tests, I only have one regression from the old combo (in the pathological tags test, t9602). You're seeing more breakage than that, obviously. A funny thing was that without cvsps-3.7 on $PATH (which means I

[PATCH 2/3] config: Introduce diff.algorithm variable

2013-01-12 Thread Michal Privoznik
Some users or projects prefer different algorithms over others, e.g. patience over myers or similar. However, specifying appropriate argument every time diff is to be used is impractical. Moreover, creating an alias doesn't play nicely with other tools based on diff (git-show for instance). Hence,

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

2013-01-12 Thread Eric S. Raymond
Michael Haggerty mhag...@alum.mit.edu: Otherwise, how do we know that cvsps currently works with git-cvsimport? (OK, you claim that it does, but in the next breath you admit that there is a new failure in one pathological tagging case.) How can we understand its strengths/weaknesses? How can

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

2013-01-12 Thread Duy Nguyen
On Sat, Jan 12, 2013 at 6:56 AM, Junio C Hamano gits...@pobox.com wrote: * nd/parse-pathspec (2013-01-11) 20 commits Uses the parsed pathspec structure in more places where we used to use the raw array of strings pathspec. Unfortunately, this conflicts a couple of topics in flight. I

[PATCH 1/3] git-completion.bash: Autocomplete --minimal and --histogram for git-diff

2013-01-12 Thread Michal Privoznik
Even though --patience was already there, we missed --minimal and --histogram for some reason. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash

[PATCH 0/3] Rework git-diff algorithm selection

2013-01-12 Thread Michal Privoznik
It's been a while I was trying to get this in. Recently, I realized how important this is. Please keep me CC'ed as I am not subscribed to the list. Michal Privoznik (3): git-completion.bash: Autocomplete --minimal and --histogram for git-diff config: Introduce diff.algorithm variable

Re: Suggestion: add option in git-p4 to preserve user in Git repository

2013-01-12 Thread Pete Wyckoff
sh...@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500: I'm in a situation where I don't have P4 admin rights to use the --preserve-user option of git-p4. However, I would like to keep user information in the associated Git branch. Would it be possible to add an option for this? The

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

2013-01-12 Thread Jonathan Nieder
Hi Eric, Eric S. Raymond wrote: But in practice the git crew was going to lose that capability anyway simply because the new wrapper will support three engines rather than just one. It's not practical for the git tests to handle that many variant external dependencies. See the

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

2013-01-12 Thread Jonathan Nieder
Michael Haggerty wrote: Regarding your claim that within a few months the Perl git-cvsimport is going to cease even pretending to work: It might be that the old git-cvsimport will stop working *for people who upgrade to cvsps 3.x*. But it is not realistic to expect people to synchronize their

Re: erratic behavior commit --allow-empty

2013-01-12 Thread Jan Engelhardt
On Tuesday 2012-10-02 10:26, Johannes Sixt wrote: Note that git commit -m A --allow-empty *DID* create a commit. Only, that it received the same name (SHA1) as the commit you created before it because it had the exact same contents (files, parents, author, committer, and timestamps). Obviously,

git-completion.bash should not add a space after a ref

2013-01-12 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. This is not really a bug, but a small usability problem. When completing a reference, Bash will add a space after the reference name. As an example in: $git show masterTAB The problem is that an user may want to show a tree or blog object

[PATCH 0/8] Initial support for Python 3

2013-01-12 Thread John Keeping
I started having a look to see how much work would be needed to make Git work with Python 3 and the answer is mostly not much. The exception is git-p4.py which is hit hard by the distinction between byte strings and unicode strings, particularly because the Python output mode of p4 targets Python

[PATCH 1/8] git_remote_helpers: Allow building with Python 3

2013-01-12 Thread John Keeping
Change inline Python to call print as a function not a statement. This is harmless because Python 2 will see the parentheses as redundant grouping but they are necessary to run this code with Python 3. Signed-off-by: John Keeping j...@keeping.me.uk --- git_remote_helpers/Makefile | 2 +- 1 file

[PATCH 2/8] git_remote_helpers: fix input when running under Python 3

2013-01-12 Thread John Keeping
Although 2to3 will fix most issues in Python 2 code to make it run under Python 3, it does not handle the new strict separation between byte strings and unicode strings. There is one instance in git_remote_helpers where we are caught by this. Fix it by explicitly decoding the incoming byte

[PATCH 3/8] git_remote_helpers: Force rebuild if python version changes

2013-01-12 Thread John Keeping
When different version of python are used to build via distutils, the behaviour can change. Detect changes in version and pass --force in this case. Signed-off-by: John Keeping j...@keeping.me.uk --- git_remote_helpers/.gitignore | 1 + git_remote_helpers/Makefile | 8 +++- 2 files

[PATCH 4/8] git_remote_helpers: Use 2to3 if building with Python 3

2013-01-12 Thread John Keeping
Using the approach detailed on the Python wiki[1], run 2to3 on the code as part of the build if building with Python 3. The code itself requires no changes to convert cleanly. [1] http://wiki.python.org/moin/PortingPythonToPy3k Signed-off-by: John Keeping j...@keeping.me.uk ---

[PATCH 5/8] svn-fe: allow svnrdump_sim.py to run with Python 3

2013-01-12 Thread John Keeping
The changes to allow this script to run with Python 3 are minimal and do not affect its functionality on the versions of Python 2 that are already supported (2.4 onwards). Signed-off-by: John Keeping j...@keeping.me.uk --- contrib/svn-fe/svnrdump_sim.py | 4 ++-- 1 file changed, 2 insertions(+),

[PATCH 7/8] git-remote-testpy: don't do unbuffered text I/O

2013-01-12 Thread John Keeping
Python 3 forbids unbuffered I/O in text mode. Change the reading of stdin in git-remote-testpy so that we read the lines as bytes and then decode them a line at a time. This allows us to keep the I/O unbuffered in order to avoid reintroducing the bug fixed by commit 7fb8e16 (git-remote-testgit:

[PATCH 8/8] git-remote-testpy: call print as a function

2013-01-12 Thread John Keeping
This is harmless in Python 2, which sees the parentheses as redundant grouping, but is required for Python 3. Since this is the only change required to make this script just run under Python 3 without needing 2to3 it seems worthwhile. The case of an empty print must be handled specially because

Re: Suggestion: add option in git-p4 to preserve user in Git repository

2013-01-12 Thread Olivier Delalleau
2013/1/12 Pete Wyckoff p...@padd.com: sh...@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500: I'm in a situation where I don't have P4 admin rights to use the --preserve-user option of git-p4. However, I would like to keep user information in the associated Git branch. Would it be possible to

[PATCH] rebase --preserve-merges keeps empty merge commits

2013-01-12 Thread Phil Hord
Since 90e1818f9a (git-rebase: add keep_empty flag, 2012-04-20) 'git rebase --preserve-merges' fails to preserve empty merge commits unless --keep-empty is also specified. Merge commits should be preserved in order to preserve the structure of the rebased graph, even if the merge commit does not

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

2013-01-12 Thread Martin von Zweigbergk
On Fri, Jan 11, 2013 at 3:20 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: diff --git a/cache.h b/cache.h index e52365d..a3c316f 100644 --- a/cache.h +++ b/cache.h @@ -476,6 +476,9 @@ extern int ie_modified(const struct index_state *, struct cache_entry *, struct /* Pathspec magic */

Re: Suggestion: add option in git-p4 to preserve user in Git repository

2013-01-12 Thread Pete Wyckoff
sh...@keba.be wrote on Sat, 12 Jan 2013 14:44 -0500: 2013/1/12 Pete Wyckoff p...@padd.com: sh...@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500: I'm in a situation where I don't have P4 admin rights to use the --preserve-user option of git-p4. However, I would like to keep user information

Re: [PATCH 3/8] git_remote_helpers: Force rebuild if python version changes

2013-01-12 Thread Pete Wyckoff
j...@keeping.me.uk wrote on Sat, 12 Jan 2013 19:23 +: When different version of python are used to build via distutils, the behaviour can change. Detect changes in version and pass --force in this case. [..] diff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile [..]

Re: [PATCH 0/8] Initial support for Python 3

2013-01-12 Thread Pete Wyckoff
j...@keeping.me.uk wrote on Sat, 12 Jan 2013 19:23 +: I started having a look to see how much work would be needed to make Git work with Python 3 and the answer is mostly not much. The exception is git-p4.py which is hit hard by the distinction between byte strings and unicode strings,

Re: [PATCH 0/8] Initial support for Python 3

2013-01-12 Thread John Keeping
On Sat, Jan 12, 2013 at 06:43:04PM -0500, Pete Wyckoff wrote: j...@keeping.me.uk wrote on Sat, 12 Jan 2013 19:23 +: I started having a look to see how much work would be needed to make Git work with Python 3 and the answer is mostly not much. The exception is git-p4.py which is hit hard

Re: missing objects -- prevention

2013-01-12 Thread Sitaram Chamarty
On Sat, Jan 12, 2013 at 6:43 PM, Jeff King p...@peff.net wrote: On Sat, Jan 12, 2013 at 06:39:52AM +0530, Sitaram Chamarty wrote: 1. The repo has a ref R pointing at commit X. 2. A user starts a push to another ref, Q, of commit Y that builds on X. Git advertises ref R, so the

[PATCH/RFC 0/7] mutiple improvements

2013-01-12 Thread Techlive Zheng
* refactor tests for 'git subtree' * rearrange some tests * clean up unnecessary quotes * make each test self-contained * keep commit intact after the split by using '%B' * handle '--prefix' argument with slash appended correctly David A. Greene (1): contrib/subtree: Remove test number

[PATCH/RFC 1/7] contrib/subtree: Add vim modeline

2013-01-12 Thread Techlive Zheng
Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/git-subtree.sh | 2 ++ contrib/subtree/t/t7900-subtree.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 920c664..138e1e0 100755 ---

[PATCH/RFC 2/7] contrib/subtree: Ignore testing directory

2013-01-12 Thread Techlive Zheng
Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/.gitignore | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/subtree/.gitignore b/contrib/subtree/.gitignore index 91360a3..59aeeb4 100644 --- a/contrib/subtree/.gitignore +++

[PATCH/RFC 3/7] contrib/subtree: Remove test number comments

2013-01-12 Thread Techlive Zheng
From: David A. Greene gree...@obbligato.org Delete the comments indicating test numbers as it causes maintenance headaches. t*.sh -i will help us find any broken tests. Signed-off-by: David A. Greene gree...@obbligato.org Signed-off-by: Techlive Zheng techlivezh...@gmail.com ---

[PATCH/RFC 4/7] contrib/subtree: Code cleaning and refactoring

2013-01-12 Thread Techlive Zheng
Mostly prepare for the later tests refactoring. Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/git-subtree.sh | 66 - contrib/subtree/t/t7900-subtree.sh | 283 +++-- 2 files changed, 179 insertions(+), 170 deletions(-) diff

[PATCH/RFC 5/7] contrib/subtree: Make each test self-contained

2013-01-12 Thread Techlive Zheng
Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/t/t7900-subtree.sh | 865 ++--- 1 file changed, 614 insertions(+), 251 deletions(-) diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh index

[PATCH/RFC 7/7] contrib/subtree: Handle '--prefix' argument with a slash appended

2013-01-12 Thread Techlive Zheng
'git subtree merge' will fail if the argument of '--prefix' has a slash appended. Signed-off-by: Techlive Zheng techlivezh...@gmail.com --- contrib/subtree/git-subtree.sh | 2 +- contrib/subtree/t/t7900-subtree.sh | 19 +++ 2 files changed, 20 insertions(+), 1 deletion(-)

Re: How to setup bash completion for alias of git command

2013-01-12 Thread Ping Yin
On Sat, Jan 12, 2013 at 10:30 PM, Ping Yin pkufra...@gmail.com wrote: Following setup works for me in ubuntu (10.04,11.04) for a long time alias gtlg='git log' complete -o default -o nospace -F _git_log gtlg However, in debian (testing, wheezy), it doesn't work $ gtlg orTAB gtlg or-bash:

Re: Suggestion: add option in git-p4 to preserve user in Git repository

2013-01-12 Thread Olivier Delalleau
2013/1/12 Pete Wyckoff p...@padd.com: sh...@keba.be wrote on Sat, 12 Jan 2013 14:44 -0500: 2013/1/12 Pete Wyckoff p...@padd.com: sh...@keba.be wrote on Thu, 10 Jan 2013 22:38 -0500: I'm in a situation where I don't have P4 admin rights to use the --preserve-user option of git-p4. However,

[PATCH v2 0/3] pre-push hook support

2013-01-12 Thread Aaron Schrab
Main changes since the initial version: * The first patch converts the existing hook callers to use the new find_hook() function. * Information about what is to be pushed is now sent over a pipe rather than passed as command-line parameters. Aaron Schrab (3): hooks: Add function to

[PATCH v2 1/3] hooks: Add function to check if a hook exists

2013-01-12 Thread Aaron Schrab
Create find_hook() function to determine if a given hook exists and is executable. If it is, the path to the script will be returned, otherwise NULL is returned. This encapsulates the tests that are used to check for the existence of a hook in one place, making it easier to modify those checks

[PATCH v2 2/3] push: Add support for pre-push hooks

2013-01-12 Thread Aaron Schrab
Add support for a pre-push hook which can be used to determine if the set of refs to be pushed is suitable for the target repository. The hook is run with two arguments specifying the name and location of the destination repository. Information about what is to be pushed is provided by sending

[PATCH v2 3/3] Add sample pre-push hook script

2013-01-12 Thread Aaron Schrab
Create a sample of a script for a pre-push hook. The main purpose is to illustrate how a script may parse the information which is supplied to such a hook. The script may also be useful to some people as-is for avoiding to push commits which are marked as a work in progress. Signed-off-by: