Re: What's cooking in git.git (Jun 2013, #07; Thu, 20)

2013-06-22 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Because the implementation is too ugly. I know :) The only reason I sent it with code is because I didn't get any responses to an email without code. If you agree that it is a useful feature, we have to figure out a beautiful implementation. I would however can imagine

Re: [PATCH 01/16] t/t5505-remote: modernize subshell-style of one test

2013-06-22 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Good, but a style only patch like this should consider taking advantage of the occasion to clean up the entire file, as we do not often get enough chance to do so without conflicting with in-flight topics. Is there something else that would conflict if this step did so?

Re: [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url

2013-06-22 Thread Ramkumar Ramachandra
Junio C Hamano wrote: Is there a reason why quux is better than another randomly chosen string $(pwd)/one? $(pwd)/one is not randomly chosen: that configuration will work with push/pull, and is therefore misleading. I put in a deliberately bogus value because I wanted to make it clear that

Re: [PATCH 08/16] t/t5516-fetch-push: use test_config()

2013-06-22 Thread Ramkumar Ramachandra
Junio C Hamano wrote: That may be a good thing in principle, but I _think_ [...] sequence is used so that we do not even have to worry about what leftover configuration values are in the testrepo/.git/config; so does it really matter? Yeah, you're right. Dropped. -- To unsubscribe from this

Re: [PATCH 06/16] t/t5505-remote: test url-with-# in branches-file

2013-06-22 Thread Ramkumar Ramachandra
Junio C Hamano wrote: diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index fd0a81e..93e11c8 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -702,27 +702,42 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' ' ) ' -test_expect_success

Re: [PATCH 05/16] remote: remove dead code in read_branches_file()

2013-06-22 Thread Ramkumar Ramachandra
Junio C Hamano wrote: As far as I can tell, that valid-remote-nick was done in df93e33c (Validate nicknames of remote branches to prohibit confusing ones, 2008-02-15), and back in that version, the codepath and the feature that wants to see a slash and do magical things, which is described by

Re: [PATCH 13/16] t/t5505-remote: test multiple push/pull in remotes-file

2013-06-22 Thread Ramkumar Ramachandra
Eric Sunshine wrote: Broken -chain. Good eyes, 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

[PATCH v2 00/14] Classify {branches,remotes}-file as fringe features

2013-06-22 Thread Ramkumar Ramachandra
Hi, Since I didn't explain the series properly last time: this series reduces the burden of the branches-file/remotes-file cruft. It does not argue for deprecation, because it is still useful to some people and harms nobody. It removes dead code, tests the feature properly, and doesn't mention

[PATCH v2 14/14] remote: add comment about read_{branches,remotes}_file

2013-06-22 Thread Ramkumar Ramachandra
Explain that they are fringe features. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- remote.c | 8 1 file changed, 8 insertions(+) diff --git a/remote.c b/remote.c index 128b210..f980928 100644 --- a/remote.c +++ b/remote.c @@ -227,6 +227,10 @@ static void

[PATCH v2 10/14] ls-remote doc: don't encourage use of branches-file

2013-06-22 Thread Ramkumar Ramachandra
One outdated example encourages the use of $GIT_DIR/branches files. Replace it with an equivalent example using a remote. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- Documentation/git-ls-remote.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 01/14] t/t5505-remote: modernize style

2013-06-22 Thread Ramkumar Ramachandra
Modernize the style of all tests throughout the file: - Remove spurious blank lines. - Indent the test body. - Make sure that all lines end with , to make it easier to spot breaks in the chain. - When executing something in a subshell, put the parenthesis on separate lines and indent the body.

[PATCH v2 07/14] t/t5516-fetch-push: don't use branches-file

2013-06-22 Thread Ramkumar Ramachandra
Four tests exercising fetch and push functionality unnecessarily depend on $GIT_DIR/branches files. Modern Git does not encourage the use of those files, and the parser remote.c:read_branches_file() is only provided for backward compatibility with older repositories. We already have tests in

[PATCH v2 13/14] t/t5515-fetch-merge-logic: don't use {branches,remotes}-file

2013-06-22 Thread Ramkumar Ramachandra
Replace it with the equivalent gitconfig configuration, using the results of the corresponding tests in t/t5505-remote. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- t/t5515-fetch-merge-logic.sh | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-)

[PATCH v2 06/14] t/t5505-remote: test url-with-# in branches-file

2013-06-22 Thread Ramkumar Ramachandra
Add one more test similar to migrate a remote from named file in $GIT_DIR/branches to check that a url with a # can be used to specify the branch name (as opposed to the constant master). Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- t/t5505-remote.sh | 22 ++ 1

[PATCH v2 05/14] remote: remove dead code in read_branches_file()

2013-06-22 Thread Ramkumar Ramachandra
The first line of the function checks that the remote-name contains a slash ('/'), and sets the slash variable accordingly. The only caller of read_branches_file() is remote_get_1(); the calling codepath is guarded by valid_remote_nick(), which checks that the remote does not contain a slash.

[PATCH v2 03/14] t/t5505-remote: use test_path_is_missing

2013-06-22 Thread Ramkumar Ramachandra
Replace instances of ! test -f with test_path_is_missing. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- t/t5505-remote.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 74ddd77..d688662 100755 ---

[PATCH v2 04/14] t/t5505-remote: remove dependency on $origin_url

2013-06-22 Thread Ramkumar Ramachandra
In the tests migrate a remote from named file in $GIT_DIR/{remotes,branches}, we are only checking that a configuration is migrated successfully; it has no correspondence with whether or not those values do something sensible with other git operations (fetch/push). Therefore, there is no need to

[PATCH v2 11/14] t/t5505-remote: test multiple push/pull in remotes-file

2013-06-22 Thread Ramkumar Ramachandra
Extend the test migrate a remote from named file in $GIT_DIR/remotes to test that multiple Push: and Pull: lines in the remotes-file works as expected. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- t/t5505-remote.sh | 16 ++-- 1 file changed, 14 insertions(+), 2

[PATCH v2 09/14] ls-remote doc: rewrite repository paragraph

2013-06-22 Thread Ramkumar Ramachandra
Replace the repository paragraph containing specific references to $GIT_DIR/branches and . with a generic urls-or-remotes paragraph referencing the relevant sections in the git-fetch(1) manpage. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- Documentation/git-ls-remote.txt | 6 +++---

[PATCH v2 12/14] t/t5510-fetch: don't use remotes-file

2013-06-22 Thread Ramkumar Ramachandra
Replace it with the equivalent gitconfig configuration, using the results of a test in t/t5505-remote. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- t/t5510-fetch.sh | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh

[PATCH v2 08/14] ls-remote doc: fix example invocation on git.git

2013-06-22 Thread Ramkumar Ramachandra
Under the EXAMPLES section, there is one invocation on the git.git repository that attempts to list the refs master, pu, and rc. The ref rc does not exist in today's repository, so remove it. Among other things, this example demonstrates that the refs... argument is simply a filter; requesting a

[PATCH v2 02/14] t/t5505-remote: test push-refspec in branches-file

2013-06-22 Thread Ramkumar Ramachandra
The test migrate a remote from named file in $GIT_DIR/branches reads the branches-file, but only checks that the url and fetch-refspec are set correctly. Check that the push-refspec is also set correctly. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- t/t5505-remote.sh | 3 ++- 1

[PATCH] completion: complete rebase --edit-todo

2013-06-22 Thread Ramkumar Ramachandra
Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index fd9a1d5..43c6226 100644 ---

Re: [BUG] clone: regression in error messages in master

2013-06-22 Thread John Szakmeister
On Fri, Jun 21, 2013 at 1:11 PM, Junio C Hamano gits...@pobox.com wrote: John Szakmeister j...@szakmeister.net writes: [snip] I can see where this is confusing, but can also see how it's useful information to have. On clone, it's probably not that useful since you're looking right at the url,

Re: [PATCH 08/16] t/t5516-fetch-push: use test_config()

2013-06-22 Thread Johannes Sixt
Am 22.06.2013 00:32, schrieb Junio C Hamano: Ramkumar Ramachandra artag...@gmail.com writes: Replace the 'git config' calls in tests with test_config for greater robustness. That may be a good thing in principle, but I _think_ mk_empty testrepo ( cd

Re: fast-import bug?

2013-06-22 Thread John Keeping
On Fri, Jun 21, 2013 at 02:21:47AM -0700, Dave Abrahams wrote: The docs for fast-import seem to imply that I can use ls to get the SHA1 of a commit for which I have a mark: Reading from a named tree The dataref can be a mark reference (:idnum) or the full 40-byte

[PATCH 2/2] completion: learn about --man-path

2013-06-22 Thread John Keeping
Signed-off-by: John Keeping j...@keeping.me.uk --- contrib/completion/git-completion.bash | 2 ++ t/t9902-completion.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 8fbf941..c3290af

[PATCH 1/2] completion: handle unstuck form of base git options

2013-06-22 Thread John Keeping
git-completion.bash's parsing of the command name relies on everything preceding it starting with '-' unless it is the -c option. This allows users to use the stuck form of --work-tree=path and --namespace=path but not the unstuck forms --work-tree path and --namespace path. Fix this.

[PATCH] help: introduce man.viewer = eman

2013-06-22 Thread Ramkumar Ramachandra
Corresponding to woman. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- Documentation/git-help.txt | 3 +++ builtin/help.c | 11 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Documentation/git-help.txt b/Documentation/git-help.txt index

[PATCH v2] completion: complete rebase --edit-todo

2013-06-22 Thread Ramkumar Ramachandra
Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- contrib/completion/git-completion.bash | 4 1 file changed, 4 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 6c3bafe..b51c9e3 100644 ---

Re: [PATCH] help: introduce man.viewer = eman

2013-06-22 Thread John Keeping
On Sat, Jun 22, 2013 at 05:13:29PM +0530, Ramkumar Ramachandra wrote: Corresponding to woman. Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- Documentation/git-help.txt | 3 +++ builtin/help.c | 11 --- 2 files changed, 11 insertions(+), 3 deletions(-)

Re: [PATCH] help: introduce man.viewer = eman

2013-06-22 Thread Ramkumar Ramachandra
John Keeping wrote: Would it be nicer to pass a string in here instead of a flag? Then this becomes: strbuf_addf(man_page, (%s \%s\), command, page); You should probably also rename this function to exec_emacsclient or something as well now that it doesn't just launch woman. Sure,

Re: [PATCH 1/2] completion: handle unstuck form of base git options

2013-06-22 Thread SZEDER Gábor
Hi, On Sat, Jun 22, 2013 at 12:25:17PM +0100, John Keeping wrote: git-completion.bash's parsing of the command name relies on everything preceding it starting with '-' unless it is the -c option. This allows users to use the stuck form of --work-tree=path and --namespace=path but not the

Re: [PATCH 1/2] completion: handle unstuck form of base git options

2013-06-22 Thread SZEDER Gábor
On Sat, Jun 22, 2013 at 02:30:33PM +0200, SZEDER Gábor wrote: Hi, On Sat, Jun 22, 2013 at 12:25:17PM +0100, John Keeping wrote: git-completion.bash's parsing of the command name relies on everything preceding it starting with '-' unless it is the -c option. This allows users to use the

Re: [PATCH 2/2] user-manual: Update download size for Git and the kernel

2013-06-22 Thread W. Trevor King
On Tue, Jun 18, 2013 at 09:55:22PM -0400, W. Trevor King wrote: They've grown since d19fbc3 (Documentation: add git user's manual, 2007-01-07) when the stats were initially added. I've rounded download sizes up to the nearest power of ten MiB to decrease the precision and give a bit of

Re: [PATCH 1/4] t9903: add tests for git-prompt pcmode

2013-06-22 Thread SZEDER Gábor
Hi, On Thu, Jun 20, 2013 at 11:25:26PM -0300, Eduardo R. D'Avila wrote: git-prompt.sh lacks tests for PROMPT_COMMAND mode. Add tests for: * pcmode prompt without colors * pcmode prompt with colors for bash * pcmode prompt with colors for zsh Having these tests enables an upcoming

Re: [PATCH 3/4] git-prompt.sh: do not print duplicate clean color code

2013-06-22 Thread SZEDER Gábor
On Thu, Jun 20, 2013 at 11:25:28PM -0300, Eduardo R. D'Avila wrote: Do not print a duplicate clean color code when there is no other indicators other than the current branch in colored prompt. Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com Great. I wanted to point out in the previous

Re: [PATCH 4/4] git-prompt.sh: add missing information in comments

2013-06-22 Thread SZEDER Gábor
On Thu, Jun 20, 2013 at 11:25:29PM -0300, Eduardo R. D'Avila wrote: Mention that the command below is needed for prompt in ZSH with PS1: setopt PROMPT_SUBST Make it clear that colored prompt is only available in PROMPT_COMMAND mode. Signed-off-by: Eduardo R. D'Avila erdav...@gmail.com

Re: [PATCH 2/4] git-prompt.sh: refactor colored prompt code

2013-06-22 Thread Øystein Walle
Eduardo R. D'Avila erdavila at gmail.com writes: + local c_red='\[\e[31m\]' + local c_green='\[\e[32m\]' + local c_lblue='\[\e[1;34m\]' + local c_clear='\[\e[0m\]' fi - local c_red='\e[31m' - local c_green='\e[32m' - local

[PATCH v2 1/4] doc/clone: Remove the '--bare -l -s' example

2013-06-22 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us There are other examples in git-clone.txt demonstrating both '--bare' and '-l -s'. Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/git-clone.txt | 7 --- 1 file changed, 7 deletions(-) diff --git a/Documentation/git-clone.txt

[PATCH v2 2/4] doc/clone: Pick more compelling paths for the --reference example

2013-06-22 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us There may be times when using one of your local repositories as a reference for a new clone make sense, but the implied version-bump in the old example isn't one of them. I think a more intuitive example is multi-user system with a central reference clone,

[PATCH v2 3/4] Documentation: Update the NFS remote examples to use the staging repo

2013-06-22 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us linux-nfs.org seems to have restructured their repository layout since 8391c60 (git-remote.txt: fix example url, 2007-11-02), and Bruce's repo is now at git://git.linux-nfs.org/projects/bfields/linux.git. Bruce also has a more richer internal branch structure

[PATCH v2 4/4] Documentation: Update 'linux-2.6.git' - 'linux.git'

2013-06-22 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us The 3.x tree has been out for a while now. The -2.6 repository name survived the initial release [1], but kernel.org now only lists 'linux.git' (for aegl as well as torvalds) [2]. [1]: http://article.gmane.org/gmane.linux.kernel/1147422 On 2011-05-30

[PATCH v2 0/4] Update linux-2.6.git location and related examples

2013-06-22 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us David and Junio mentioned that I'd missed a few 2.6 references in my initial pass. Here's a second attempt that does some deeper reworking of the effected sections. Each deeper rewrite gets its own patch and motivation, with the final patch making all the

Re: [PATCH 1/4] t9903: add tests for git-prompt pcmode

2013-06-22 Thread Eduardo D'Avila
2013/6/22 SZEDER Gábor sze...@ira.uka.de: On Thu, Jun 20, 2013 at 11:25:26PM -0300, Eduardo R. D'Avila wrote: git-prompt.sh lacks tests for PROMPT_COMMAND mode. Add tests for: * pcmode prompt without colors * pcmode prompt with colors for bash * pcmode prompt with colors for zsh Having

Re: [PATCH 2/4] git-prompt.sh: refactor colored prompt code

2013-06-22 Thread Eduardo D'Avila
2013/6/22 Øystein Walle oys...@gmail.com: I've gotten the impression it's better to use tput to generate the escape sequences instead of hardcoding them. So something like: local c_red='\['$(tput setaf 1)'\]' local c_green='\['$(tput setaf 2)'\]' local c_green='\['$(tput setaf 4)'\]' local

[PATCH] git-daemon: have --no-syslog

2013-06-22 Thread Andreas Krey
Some people run inetds that collect stderr of the spawned programs. Give them 'git-daemon --inetd --no-syslog' to keep error output on stderr. Signed-off-by: Andreas Krey a.k...@gmx.de --- Documentation/git-daemon.txt | 4 daemon.c | 14 +++--- 2 files changed,

Is there a hook that runs on git reset?

2013-06-22 Thread André Hänsel
I am using a script that runs as post-checkout and post-merge hook to ensure some permissions on the working copy files. Neither of these hooks is run on git reset, so after a git reset --hard the permissions are lost because apparently the files were created freshly. I guess I would have

Re: [PATCH 04/16] t/t5505-remote: remove dependency on $origin_url

2013-06-22 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: Junio C Hamano wrote: Is there a reason why quux is better than another randomly chosen string $(pwd)/one? $(pwd)/one is not randomly chosen: that configuration will work with push/pull, and is therefore misleading. But isn't the URL: field

git subtree pull incorrectly reports merge conflict

2013-06-22 Thread Eric Lindsey
I'm having trouble pulling changes from a repo that was imported as a subtree with 'git subtree add'. The issue occurs when I have previously used 'git subtree push' from within the project directory, then pushed changes to the remote repo again from somewhere else (from another project also using

Re: fast-import bug?

2013-06-22 Thread Dave Abrahams
on Sat Jun 22 2013, John Keeping john-AT-keeping.me.uk wrote: On Fri, Jun 21, 2013 at 02:21:47AM -0700, Dave Abrahams wrote: The docs for fast-import seem to imply that I can use ls to get the SHA1 of a commit for which I have a mark: Reading from a named tree The