Re: [PATCH 2/5] t4211: demonstrate empty -L range crash

2013-07-23 Thread SZEDER Gábor
On Tue, Jul 23, 2013 at 10:28:05AM -0400, Eric Sunshine wrote: Signed-off-by: Eric Sunshine sunsh...@sunshineco.com --- t/t4211-line-log.sh | 8 1 file changed, 8 insertions(+) diff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh index 7776f93..1db1edd 100755 ---

Re: [PATCH 2/5] t4211: demonstrate empty -L range crash

2013-07-23 Thread SZEDER Gábor
On Tue, Jul 23, 2013 at 12:03:05PM -0700, Junio C Hamano wrote: SZEDER Gábor sze...@ira.uka.de writes: (Side question: the test suite is full with similar constructs, i.e. redirecting file contents to stdin, but why not just use wc -l b.c, i.e. let wc open the file?) wc -l b.c

[PATCH] bash prompt: test the prompt with newline in repository path

2013-08-16 Thread SZEDER Gábor
the need for changing into a subdir in the test. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9903-bash-prompt.sh | 16 1 file changed, 16 insertions(+) diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh index 3c3e4e8c38..dfe2088ef4 100755 --- a/t/t9903-bash

[PATCH v2] bash prompt: test the prompt with newline in repository path

2013-08-17 Thread SZEDER Gábor
or the repository, respectively, and only prints the full path to the repository when in a subdirectory, hence the need for changing into a subdir in the test. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- Added FUNNYNAMES prerequisite and Eric's typofix. t/t9903-bash-prompt.sh | 23

Re: [PATCH 3/4] t: rev-parse-parents: avoid yoda conditions

2013-09-03 Thread SZEDER Gábor
Hi, On Tue, Sep 03, 2013 at 03:12:56AM -0400, Jeff King wrote: On Mon, Sep 02, 2013 at 01:30:38AM -0500, Felipe Contreras wrote: Just as 5 == X is weird, so is comparing first the expected value, and then the value we are testing. So switch them around. Actually, our normal comparison

Re: [PATCH 3/4] t: rev-parse-parents: avoid yoda conditions

2013-09-03 Thread SZEDER Gábor
On Tue, Sep 03, 2013 at 08:39:54AM -0500, Felipe Contreras wrote: On Tue, Sep 3, 2013 at 6:10 AM, SZEDER Gábor sze...@ira.uka.de wrote: On Tue, Sep 03, 2013 at 05:45:06AM -0500, Felipe Contreras wrote: On Tue, Sep 3, 2013 at 3:03 AM, Jeff King p...@peff.net wrote: On Tue, Sep 03, 2013

Re: [PATCH 31/38] sha1_file.c: make use of decode_varint()

2013-09-05 Thread SZEDER Gábor
On Thu, Sep 05, 2013 at 02:19:54AM -0400, Nicolas Pitre wrote: ... replacing the equivalent open coded loop. Signed-off-by: Nicolas Pitre n...@fluxnic.net --- sha1_file.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index

Re: [PATCH] sequencer: trivial cleanup

2013-09-08 Thread SZEDER Gábor
Hi, On Sun, Sep 08, 2013 at 05:53:19PM -0500, Felipe Contreras wrote: On Sun, Sep 8, 2013 at 5:42 PM, Ramkumar Ramachandra artag...@gmail.com wrote: Signed-off-by: Ramkumar Ramachandra artag...@gmail.com --- sequencer.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

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] Revert completion: fix shell expansion of items

2012-09-25 Thread SZEDER Gábor
On Tue, Sep 25, 2012 at 12:31:19AM -0400, Jeff King wrote: Yeah, doing git checkout jk/tab is not working at all, and I noticed the buggy commit is on the maint track, but has not yet been released. I'm not sure of the solution, but I think we should do this in the meantime: -- 8 --

Re: Problem completing remotes when .git/remotes exits

2012-09-25 Thread SZEDER Gábor
Hi, On Wed, Sep 19, 2012 at 09:55:28PM +0200, Johannes Sixt wrote: I have an empty .git/remotes directory. Trying to complete the name of a remote always reports an error: git@master:1023 git fetch TABls: invalid option -- ' ' Try `ls --help' for more information. I have these:

Re: Problem completing remotes when .git/remotes exits

2012-09-25 Thread SZEDER Gábor
On Wed, Sep 26, 2012 at 01:00:45AM +0200, SZEDER Gábor wrote: But then it got me thinking... Notice how much effort we spend just to get the list of remotes? We could just run 'git remote' directly instead... Actually, we can't, because 'git remote' doesn't seem to list remotes stored under

Re: Problem completing remotes when .git/remotes exits

2012-09-25 Thread SZEDER Gábor
On Wed, Sep 26, 2012 at 03:09:38AM +0200, SZEDER Gábor wrote: On Wed, Sep 26, 2012 at 01:00:45AM +0200, SZEDER Gábor wrote: But then it got me thinking... Notice how much effort we spend just to get the list of remotes? We could just run 'git remote' directly instead... Actually, we

Re: Problem completing remotes when .git/remotes exits

2012-09-26 Thread SZEDER Gábor
On Tue, Sep 25, 2012 at 04:43:59PM -0700, Junio C Hamano wrote: SZEDER Gábor sze...@ira.uka.de writes: - test -d $d/remotes ls -1 $d/remotes + test -d $d/remotes command ls -1 $d/remotes Yuck. For normal scripts, nobody sane would define alias for non-interactive environments

Re: [PATCH 3/3] completion: improve shell expansion of items

2012-09-26 Thread SZEDER Gábor
Hi, On Wed, Sep 26, 2012 at 05:51:19PM -0400, Jeff King wrote: diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index be800e0..b0416ea 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -225,6

Re: [PATCH 4/3] completion: quote completions we find

2012-09-27 Thread SZEDER Gábor
On Wed, Sep 26, 2012 at 05:57:00PM -0400, Jeff King wrote: + COMPREPLY[$i]=${COMPREPLY[$i]}$stripped This reminded me to a mini-series collecting dust in my git repo, which converts a few similar var=$var$something constructs to use the += append operator instead. Now, Bash supports

Re: [PATCH 4/3] completion: quote completions we find

2012-09-27 Thread SZEDER Gábor
On Thu, Sep 27, 2012 at 03:31:10PM -0700, Junio C Hamano wrote: SZEDER Gábor sze...@ira.uka.de writes: On Wed, Sep 26, 2012 at 05:57:00PM -0400, Jeff King wrote: + COMPREPLY[$i]=${COMPREPLY[$i]}$stripped This reminded me to a mini-series collecting dust in my git repo, which

[PATCH 1/5] completion: fix non-critical bugs in __gitcomp() tests

2012-09-28 Thread SZEDER Gábor
to __gitcomp(), which overrides $cur anyway. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9902-completion.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 92d7eb47..e7657537 100755 --- a/t/t9902-completion.sh

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

2012-09-28 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 | 47 +++ 1 file changed, 47 insertions(+) diff --git a/t/t9902

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

2012-09-28 Thread SZEDER Gábor
is just an empty string. Luckily, the test works nevertheless. Fix this by passing the command line to run_completion() as separate words. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9902-completion.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t9902

[PATCH 4/5] completion: test __gitcomp() and __gitcomp_nl() with expandable words

2012-09-28 Thread SZEDER Gábor
not found Document this breakage with tests. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9902-completion.sh | 32 1 file changed, 32 insertions(+) diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 01f33220..4af2a149 100755 --- a/t/t9902

[POC PATCH 5/5] completion: avoid compgen to fix expansion issues in __gitcomp_nl()

2012-09-28 Thread SZEDER Gábor
excessive quoting to circumvent it. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- We can also get rid of compgen in __gitcomp(); I already have working code for that, but it still needs a bit of cleanup and commit messages. contrib/completion/git-completion.bash | 6 +- t/t9902

Re: [POC PATCH 5/5] completion: avoid compgen to fix expansion issues in __gitcomp_nl()

2012-09-28 Thread SZEDER Gábor
On Fri, Sep 28, 2012 at 12:09:35PM +0200, SZEDER Gábor wrote: __gitcomp_nl () { local IFS=$'\n' - COMPREPLY=($(compgen -P ${2-} -S ${4- } -W $1 -- ${3-$cur})) + COMPREPLY=($(echo $1 |sed -n /^${3-$cur}/ { $cur can be a path, so it can contain /, which then breaks this sed

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

2012-09-28 Thread SZEDER Gábor
On Fri, Sep 28, 2012 at 11:04:05AM -0700, Junio C Hamano wrote: SZEDER Gábor sze...@ira.uka.de writes: To simulate the the user hit 'git TAB, one of the completion tests s/the the/that the/ sets up the rather strange command line git i.e. the second word on the command line

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

2012-09-28 Thread SZEDER Gábor
On Fri, Sep 28, 2012 at 12:23:47PM -0700, Junio C Hamano wrote: SZEDER Gábor sze...@ira.uka.de writes: On Fri, Sep 28, 2012 at 11:04:05AM -0700, Junio C Hamano wrote: SZEDER Gábor sze...@ira.uka.de writes: To simulate the the user hit 'git TAB, one of the completion tests s

gitk: can't reload commits with new key binding

2012-09-30 Thread SZEDER Gábor
Hi, a135f214 (gitk: Avoid Meta1-F5, 2012-04-07) changed the key binding for reloading commits to shift-F5, but this new key binding doesn't seem to be working here, because it doesn't call reloadcommits(). Choosing the reload menu item works. Shift-F5 works properly in other applications. Any

Re: [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding

2012-10-08 Thread SZEDER Gábor
Hi, (Sorry for the delayed reply, was out of town.) On Tue, Oct 02, 2012 at 11:04:43AM -0400, Andrew Wong wrote: Refactored the code for binding modified function keys as Junio suggested. Andrew Wong (2): gitk: Refactor code for binding modified function keys gitk: Use

[PATCH] bash prompt: fix tests when run with a symlink --root

2012-10-11 Thread SZEDER Gábor
Some __gitdir() tests fail when they're run with a --root directory which is a symlink, because they use $TRASH_DIRECTORY to construct the expected absolute paths. Use the path got from 'pwd -P' instead throughout the test script. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9903-bash

Re: [PATCH] completion: add format-patch options to send-email

2012-10-15 Thread SZEDER Gábor
Hi, On Sun, Oct 14, 2012 at 06:14:03PM +0200, Felipe Contreras wrote: Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- contrib/completion/git-completion.bash | 35 +- t/t9902-completion.sh | 21 2 files

Re: [PATCH] completion: add format-patch options to send-email

2012-10-15 Thread SZEDER Gábor
On Tue, Oct 16, 2012 at 01:37:35AM +0200, Felipe Contreras wrote: On Tue, Oct 16, 2012 at 12:48 AM, SZEDER Gábor sze...@ira.uka.de wrote: @@ -1559,11 +1559,12 @@ _git_send_email () --signed-off-by-cc --smtp-pass --smtp-server --smtp-server-port

Re: [PATCH v5 1/3] completion: add new __gitcompadd helper

2012-10-17 Thread SZEDER Gábor
On Sun, Oct 14, 2012 at 05:52:49PM +0200, Felipe Contreras wrote: The idea is to never touch the COMPREPLY variable directly. This allows other completion systems override __gitcompadd, and do something different instead. Also, this allows the simplifcation of the completino tests

Re: [PATCH v5 2/3] tests: use __gitcompadd to simplify completion tests

2012-10-17 Thread SZEDER Gábor
On Sun, Oct 14, 2012 at 05:52:50PM +0200, Felipe Contreras wrote: Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- t/t9902-completion.sh | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/t/t9902-completion.sh

[PATCH] completion: clean up __gitcomp() tests

2012-10-17 Thread SZEDER Gábor
created in a subshell is by definition local to that subshell. Use 'declare -a' instead. - The contents of the COMPREPLY array is written through an IFS fiddling + echo + redirection combo, although there is the print_comp() helper function for exactly this purpose. Signed-off-by: SZEDER

Re: Where should git-prompt.sh be installed?

2012-10-25 Thread SZEDER Gábor
On Wed, Oct 24, 2012 at 05:51:06PM -0700, Jonathan Nieder wrote: Hi, In olden days the admin would copy contrib/completion/git-completion.sh to /etc/bash_completion.d/git and mortals could source /etc/bash_completion or /etc/bash_completion.d/git in their ~/.bashrc (possibly

Re: [PATCH] prompt: fix show upstream with svn and zsh

2013-05-21 Thread SZEDER Gábor
Hi, On Tue, May 21, 2013 at 10:54:27PM +0200, Thomas Gummerer wrote: Currently the __git_ps1 git prompt gives the following error with a repository converted by git-svn, when used with zsh: __git_ps1_show_upstream:19: bad pattern: svn_remote[ This was introduced by 6d158cba

Re: [PATCH] prompt: fix show upstream with svn and zsh

2013-05-21 Thread SZEDER Gábor
On Tue, May 21, 2013 at 06:04:35PM -0500, Felipe Contreras wrote: On Tue, May 21, 2013 at 5:41 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Tue, May 21, 2013 at 10:54:27PM +0200, Thomas Gummerer wrote: Currently the __git_ps1 git prompt gives the following error with a repository

Re: [PATCH] prompt: fix show upstream with svn and zsh

2013-05-21 Thread SZEDER Gábor
On Tue, May 21, 2013 at 07:03:09PM -0500, Felipe Contreras wrote: On Tue, May 21, 2013 at 6:36 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Tue, May 21, 2013 at 06:04:35PM -0500, Felipe Contreras wrote: On Tue, May 21, 2013 at 5:41 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Tue, May 21

Re: [QUERY] How do you sort completions?

2013-05-24 Thread SZEDER Gábor
Hi, On Fri, May 24, 2013 at 05:03:27PM +0530, Ramkumar Ramachandra wrote: I'm not able to sort completions for some weird reason. No matter what I order I insert stuff into COMPREPLY, bash seems to auto-sort them lexically. I tried to pass --sort='-committerdate' to git for-each-ref so I

Re: [QUERY] How do you sort completions?

2013-05-28 Thread SZEDER Gábor
Hi, On Fri, May 24, 2013 at 08:11:00AM -0500, Felipe Contreras wrote: AFAIK bash needs the completions sorted, so we added some | sort | uniq. Actually, it seems to sort and remove duplicates automatically: $ _foo () { COMPREPLY=(bar foo bar baz) ; } $ complete -F _foo foo $ foo TAB bar baz

Re: [PATCH] prompt: fix show upstream with svn and zsh

2013-05-28 Thread SZEDER Gábor
Hi, On Wed, May 22, 2013 at 09:32:44AM +0200, Thomas Gummerer wrote: SZEDER Gábor sze...@ira.uka.de writes: On Tue, May 21, 2013 at 10:54:27PM +0200, Thomas Gummerer wrote: - svn_remote[ $((${#svn_remote[@]} + 1)) ]=$value + svn_remote[$((${#svn_remote

Re: [PATCH] completion: avoid ls-remote in certain scenarios

2013-05-29 Thread SZEDER Gábor
On Tue, May 28, 2013 at 10:20:48PM -0500, Felipe Contreras wrote: It's _very_ slow in many cases, and there's really no point in fetching *everything* from the remote just for completion. In many cases it might be faster for the user to type the whole thing. If the user manually specifies

Re: [PATCH 3/6] completion: add common options for blame

2013-06-03 Thread SZEDER Gábor
On Mon, Jun 03, 2013 at 03:02:00PM +0530, Ramkumar Ramachandra wrote: Thomas Rast wrote: Is this the first time we introduce completion (I guess you could call it help) for short options? I only did a quick search for /-. -/ but it certainly seems that way. Yeah. We generally prefer

Re: [PATCH 6/6] completion: clarify ls-tree, archive, show completion

2013-06-03 Thread SZEDER Gábor
On Sun, Jun 02, 2013 at 07:33:42PM +0530, Ramkumar Ramachandra wrote: Currently, the 'git ls-tree', 'git archive', and 'git show' completions use __git_complete_file (aliased to __git_complete_revlist_file). In the case of 'git ls-tree' and 'git archive', they necessarily require a tree-ish

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

2013-06-06 Thread SZEDER Gábor
On Thu, Jun 06, 2013 at 03:41:08PM -0700, Junio C Hamano wrote: * rr/complete-difftool (2013-06-03) 2 commits (merged to 'next' on 2013-06-04 at 01c7611) + completion: clarify ls-tree, archive, show completion + completion: difftool takes both revs and files Update command line

Re: [PATCH 6/6] completion: clarify ls-tree, archive, show completion

2013-06-07 Thread SZEDER Gábor
On Fri, Jun 07, 2013 at 10:51:53PM +0530, Ramkumar Ramachandra wrote: SZEDER Gábor wrote: Well, people out there might have completion scriplets for their aliases or custom git commands which use __git_complete_file(). Removing this function would break those scripts. What

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

2013-06-07 Thread SZEDER Gábor
On Fri, Jun 07, 2013 at 11:00:14PM +0530, Ramkumar Ramachandra wrote: SZEDER Gábor wrote: the one at the top because of the reasons given in $gmane/226272 Sorry about the delay: I went to sleep for a couple of days :P the one at the bottom because of the misleading commit message

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

2013-06-07 Thread SZEDER Gábor
On Fri, Jun 07, 2013 at 11:41:07AM -0700, Junio C Hamano wrote: git log -Gcomplete_file -p contrib/completion found this one: commit 1d66ec587e7d903afdf12a81718772a9eadc15a1 Author: SZEDER Gábor sze...@ira.uka.de Date: Thu Mar 10 19:12:29 2011 +0100 bash: complete 'git diff

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

2013-06-07 Thread SZEDER Gábor
On Thu, Jun 06, 2013 at 06:05:44PM -0700, Junio C Hamano wrote: SZEDER Gábor sze...@ira.uka.de writes: On Thu, Jun 06, 2013 at 03:41:08PM -0700, Junio C Hamano wrote: * rr/complete-difftool (2013-06-03) 2 commits (merged to 'next' on 2013-06-04 at 01c7611) + completion: clarify ls

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

2013-06-07 Thread SZEDER Gábor
On Fri, Jun 07, 2013 at 12:46:25PM -0700, Junio C Hamano wrote: Thanks for a pointer. I think what I was suggesting was slightly different in that I was hoping to see a single helper that knows to complete to object names (possibly including trees/blobs with the treeish:path notation),

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

2013-06-07 Thread SZEDER Gábor
On Fri, Jun 07, 2013 at 02:53:02PM -0700, Junio C Hamano wrote: SZEDER Gábor sze...@ira.uka.de writes: On Fri, Jun 07, 2013 at 12:46:25PM -0700, Junio C Hamano wrote: Thanks for a pointer. I think what I was suggesting was slightly different in that I was hoping to see a single helper

Re: [PATCH] completion: add deprecated __git_complete_file ()

2013-06-07 Thread SZEDER Gábor
On Fri, Jun 07, 2013 at 01:38:16PM -0700, Junio C Hamano wrote: Ramkumar Ramachandra artag...@gmail.com writes: 77c130 (completion: clarify ls-tree, archive, show completion, 2013-06-02) removed __git_complete_file () because it had no callers left in the file. However, to avoid breaking

Re: [PATCH] completion: add deprecated __git_complete_file ()

2013-06-07 Thread SZEDER Gábor
On Fri, Jun 07, 2013 at 02:25:54PM -0500, Felipe Contreras wrote: On Fri, Jun 7, 2013 at 2:09 PM, Ramkumar Ramachandra artag...@gmail.com wrote: 77c130 (completion: clarify ls-tree, archive, show completion, 2013-06-02) removed __git_complete_file () because it had no callers left in the

Re: [PATCH v4 03/45] build: trivial cleanup

2013-06-09 Thread SZEDER Gábor
On Sun, Jun 09, 2013 at 11:40:15AM -0500, Felipe Contreras wrote: There's no need to list again the prerequisites. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com Please write more shortlog-friendly subject lines describing what the actual change is. In this case for example:

Re: [PATCH v4 10/45] sequencer: trivial fix

2013-06-09 Thread SZEDER Gábor
On Sun, Jun 09, 2013 at 11:40:22AM -0500, Felipe Contreras wrote: We should free objects before leaving. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com A shortlog-friendlier subject could be: sequencer: free objects before leaving. -- To unsubscribe from this list: send the line

Re: [PATCH v4 10/45] sequencer: trivial fix

2013-06-09 Thread SZEDER Gábor
On Sun, Jun 09, 2013 at 12:23:01PM -0500, Felipe Contreras wrote: On Sun, Jun 9, 2013 at 12:18 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sun, Jun 09, 2013 at 11:40:22AM -0500, Felipe Contreras wrote: We should free objects before leaving. Signed-off-by: Felipe Contreras felipe.contre

Re: [PATCH v4 10/45] sequencer: trivial fix

2013-06-09 Thread SZEDER Gábor
On Sun, Jun 09, 2013 at 12:47:16PM -0500, Felipe Contreras wrote: On Sun, Jun 9, 2013 at 12:33 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sun, Jun 09, 2013 at 12:23:01PM -0500, Felipe Contreras wrote: On Sun, Jun 9, 2013 at 12:18 PM, SZEDER Gábor sze...@ira.uka.de wrote: On Sun, Jun 09

Re: [PATCH v4 10/45] sequencer: trivial fix

2013-06-09 Thread SZEDER Gábor
On Sun, Jun 09, 2013 at 02:11:18PM -0500, Felipe Contreras wrote: Perhaps trivial memory leak fix would be better. That's fine with me, thanks. If only we could have got there like 10 emails ago. Gábor -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

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

2013-06-09 Thread SZEDER Gábor
As explained by SZEDER Gábor in $gmane/226272, git_complete_file helper is about completing tree-ish, taking commit at the tips of refs and also understanding tree-ish:path notation, and changing archive and ls-tree to use git_complete_revlist_file that in addition is meant to expand

[PATCH] completion: remove ancient ensure colon in COMP_WORDBREAKS workaround

2013-06-09 Thread SZEDER Gábor
). The bug was fixed in Fedora 10 and Fedora 9 reached its EOL on 2009-07-10, almost four years ago. It's about time to remove our workaround. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- contrib/completion/git-completion.bash | 14 -- 1 file changed, 14 deletions(-) diff --git

Re: [PATCH] completion: remove ancient ensure colon in COMP_WORDBREAKS workaround

2013-06-10 Thread SZEDER Gábor
First things first: Junio, please don't pick up this patch. On Sun, Jun 09, 2013 at 05:09:54PM -0700, Jonathan Nieder wrote: SZEDER Gábor wrote: Fedore 9 shipped the gvfs package with a buggy Bash completion script: it removed the ':' character from COMP_WORDBREAKS, thereby breaking

Re: [PATCH 2/3] test: improve rebase -q test

2013-06-10 Thread SZEDER Gábor
On Sun, Jun 09, 2013 at 03:41:54PM -0500, Felipe Contreras wrote: There will not be a need for test_string_must_be_empty() just like there's no need for test_string_cmp(). Actually, if there were a test_string_cmp(), that would be the test helper function I used most often. -- To unsubscribe

Re: [PATCH 2/3] test: improve rebase -q test

2013-06-10 Thread SZEDER Gábor
On Mon, Jun 10, 2013 at 08:56:58AM -0700, Junio C Hamano wrote: SZEDER Gábor sze...@ira.uka.de writes: On Sun, Jun 09, 2013 at 03:41:54PM -0500, Felipe Contreras wrote: There will not be a need for test_string_must_be_empty() just like there's no need for test_string_cmp(). Actually

Re: [PATCH 2/3] test: improve rebase -q test

2013-06-10 Thread SZEDER Gábor
On Mon, Jun 10, 2013 at 09:07:06PM +0200, Johannes Sixt wrote: Am 10.06.2013 19:27, schrieb SZEDER Gábor: My main motivation is that, like in your example, in the bash prompt tests I only have to check a single line of output, but because of debuggability I always did: echo (master

Re: [PATCH] prompt: squelch error output from cat

2013-06-13 Thread SZEDER Gábor
Hi, On Thu, Jun 13, 2013 at 07:16:49PM +0530, Ramkumar Ramachandra wrote: The files $g/rebase-{merge,apply}/{head-name,msgnum,end} are not guaranteed to exist. When attempting to cat them, squelch the error output to get rid of messages like these: cat: .git/rebase-merge/msgnum: No such

Re: [PATCH] format-patch: remove existing output-directory

2013-06-14 Thread SZEDER Gábor
On Fri, Jun 14, 2013 at 07:04:18PM +0530, Ramkumar Ramachandra wrote: My main itch is that completion doesn't work with my fp: alias.fp = !rm -rf outgoing git format-patch -M -C -o outgoing Why not define your custom completion function for this alias in your .bashrc? _git_fp () {

Re: [PATCH] prompt: squelch error output from cat

2013-06-14 Thread SZEDER Gábor
On Thu, Jun 13, 2013 at 08:15:59PM +0530, Ramkumar Ramachandra wrote: SZEDER Gábor wrote: Just curious: when do those files don't exist? When using an older version of git with a newer prompt, obviously, but are there other cases? # On terminal one $ git rebase --interactive master

Re: [PATCH] prompt: squelch error output from cat

2013-06-15 Thread SZEDER Gábor
Hi Junio, I see you picked up this patch in branch 'rr/prompt-autostash-breakage-fix'. This patch has actually nothing to do with autostash, it is a fix for b71dc3e1 (bash-prompt.sh: show where rebase is at when stopped, 2013-04-25). Gábor On Thu, Jun 13, 2013 at 07:16:49PM +0530, Ramkumar

[PATCH v2 01/13] bash prompt: fix redirection coding style in tests

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de Use 'file' instead of ' file', in accordance with the coding guidelines. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9903-bash-prompt.sh | 232 - 1 file changed, 116 insertions(+), 116 deletions

[PATCH v2 00/13] bash prompt speedup

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de Hi, displaying the git-specific bash prompt on Windows/MinGW takes quite long, long enough to be noticeable. This is mainly caused by the numerous fork()s and exec()s to create subshells and run git or other commands, which are rather expensive on Windows

[PATCH v2 02/13] bash prompt: fix here document indentation in interactive rebase test

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de Also move the shebang line into the here document. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9903-bash-prompt.sh | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh index

[PATCH v2 06/13] bash prompt: run 'git rev-parse --git-dir' directly instead of __gitdir()

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de __git_ps1() finds out the path to the repository by using the __gitdir() helper function. __gitdir() is basically just a wrapper around 'git rev-parse --git-dir', extended with support for recognizing a remote repository given as argument, to use the path

[PATCH v2 08/13] bash prompt: use bash builtins to find out current branch

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de __git_ps1() runs the '$(git symbolic-ref HEAD)' command substitution to find out whether we are on a branch and to find out the name of that branch. This imposes the overhead of fork()ing a subshell and fork()+exec()ing a git process. Since HEAD is in most

[PATCH v2 07/13] bash prompt: use bash builtins to find out rebase state

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de During an ongoing interactive rebase __git_ps1() finds out the name of the rebased branch, the total number of patches and the number of the current patch by executing a '$(cat .git/rebase-merge/FILE)' command substitution for each. That is not quite the most

[PATCH v2 03/13] completion, bash prompt: move __gitdir() tests to completion test suite

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de Currently __gitdir() is duplicated in the git completion and prompt scripts, while its tests are in the prompt test suite. This patch series is about to change __git_ps1() in a way that it won't need __gitdir() anymore and __gitdir() will be removed from

[PATCH v2 09/13] bash prompt: use bash builtins to get detached HEAD abbrev. object name

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de When describing a detached HEAD according to the $GIT_PS1_DESCRIBE environment variable fails, __git_ps1() runs the '$(cut -c1-7 .git/HEAD)' command substitution to put the 7 hexdigits abbreviated commit object name in the prompt. This imposes the overhead

[PATCH v2 04/13] bash prompt: add a test for symbolic link symbolic refs

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9903-bash-prompt.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh index 1047c664..48460ef6 100755 --- a/t/t9903-bash-prompt.sh +++ b/t/t9903

[PATCH v2 05/13] bash prompt: return early from __git_ps1() when not in a git repository

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de ... to gain one level of indentation for the bulk of the function. (The patch looks quite unreadable, you'd better check it with 'git diff -w'.) Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- contrib/completion/git-prompt.sh | 201

[PATCH v2 13/13] bash prompt: avoid command substitution when finalizing gitstring

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de Before setting $PS1, __git_ps1() uses a command substitution to redirect the output from a printf into a variable. Spare the overhead of fork()ing a subshell by using 'printf -v var' to directly assign the output to a variable. zsh's printf doesn't support

[PATCH v2 12/13] bash prompt: avoid command substitution when checking for untracked files

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de When enabled, the bash prompt can indicate the presence of untracked files with a '%' sign. __git_ps1() checks for untracked files by running the '$(git ls-files --others --exclude-standard)' command substitution, and displays the indicator when

[PATCH v2 10/13] bash prompt: combine 'git rev-parse' executions

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de From the four '$(git rev-parse --opt)' command substitutions __git_ps1() executes three in its main code path: - the first to get the path to the .git directory ('--git-dir'), - the second to check whether we're inside the .git directory ('--is-inside

[PATCH v2 11/13] bash prompt: use bash builtins to check stash state

2013-06-17 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de When the environment variable $GIT_PS1_SHOWSTASHSTATE is set __git_ps1() checks the presence of stashes by running 'git rev-parse --verify refs/stash'. This command not only checks that the 'refs/stash' ref exists but also, well, verifies that it's a valid

Re: [PATCH v2 00/13] bash prompt speedup

2013-06-17 Thread SZEDER Gábor
Forgot to mention that it's built on top of 2847cae8 (prompt: squelch error output from cat, 2013-06-14). Best, Gábor On Tue, Jun 18, 2013 at 04:16:53AM +0200, SZEDER Gábor wrote: Hi, displaying the git-specific bash prompt on Windows/MinGW takes quite long, long enough to be noticeable

Re: [PATCH v2 10/13] bash prompt: combine 'git rev-parse' executions

2013-06-18 Thread SZEDER Gábor
On Tue, Jun 18, 2013 at 02:05:35AM -0400, Jeff King wrote: On Tue, Jun 18, 2013 at 04:17:03AM +0200, SZEDER Gábor wrote: The whole series speeds up the bash prompt on Windows/MSysGit considerably. Here are some timing results in two scenarios, repeated 10 times: At the top

[PATCH] fixup! bash prompt: use bash builtins to find out current branch

2013-06-18 Thread SZEDER Gábor
From: SZEDER Gábor sze...@ira.uka.de --- On Tue, Jun 18, 2013 at 11:49:31AM +0200, SZEDER Gábor wrote: (Hmm, speaking of which, the patch reading HEAD might break setups using $PROMPT_COMMAND, because it might do a simple return without updating $PS1...) Indeed. Here's the fixup. contrib

send-email adds redundant From: lines to message body

2013-06-18 Thread SZEDER Gábor
vim -cover-letter.patch git send-email --to=git@vger.kernel.org 00* i.e. no '--suppress-cc=self' option at all. Values of related config variables are: git config --get-regexp '(sendemail|user)\..*' sendemail.smtpserver /usr/local/bin/putmail sendemail.confirm auto user.name SZEDER

Re: send-email adds redundant From: lines to message body

2013-06-18 Thread SZEDER Gábor
On Tue, Jun 18, 2013 at 02:42:07PM +0300, Michael S. Tsirkin wrote: On Tue, Jun 18, 2013 at 01:09:04PM +0200, SZEDER Gábor wrote: Hi, 'git send-email' recently started to add redundant From: lines to my messages, see e.g. http://article.gmane.org/gmane.comp.version-control.git

Re: [PATCH 2/2] send-email: add test for duplicate utf8 name

2013-06-18 Thread SZEDER Gábor
with git am/apply on top of today's master for some reason, although the context lines seem to match exactly... in the end had to apply it manually. Anyway, 1/2 fixes my problem, so: Tested-by: SZEDER Gábor sze...@ira.uka.de Thanks, Gábor -- To unsubscribe from this list: send the line

accessing oldest reflog entry with ref@{N}?

2013-06-19 Thread SZEDER Gábor
Hi, after a couple of months of inactivity I recently updated my git clone from the main repo, and later ran 'git gc', which, of course, dutifully pruned the old reflog entries, leaving my reflogs quite shallow: $ git reflog master 0dbd8125 master@{0}: merge origin/master: Fast-forward f3828dc0

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

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

detached HEAD before root commit - possible?

2013-06-23 Thread SZEDER Gábor
I suspect that detaching HEAD before a root commit is not possible by design. What would HEAD contain then!? 'git checkout' seems to corroborate: $ git init Initialized empty Git repository in /tmp/test/.git/ $ git checkout --detach fatal: You are on a branch yet to be born Are there some

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

2013-06-24 Thread SZEDER Gábor
On Sat, Jun 22, 2013 at 01:32:38PM -0300, Eduardo D'Avila wrote: These tests where important to make sure that I wouldn't break anything during the refactorization. Having them pass before *and* after refactorization guarantees that nothing was broken (except for some subtle case that might

[PATCHv3 01/16] bash prompt: fix redirection coding style in tests

2013-06-24 Thread SZEDER Gábor
Use 'file' instead of ' file', in accordance with the coding guidelines. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9903-bash-prompt.sh | 232 - 1 file changed, 116 insertions(+), 116 deletions(-) diff --git a/t/t9903-bash-prompt.sh b/t

[PATCHv3 00/16] bash prompt speedup

2013-06-24 Thread SZEDER Gábor
] - http://article.gmane.org/gmane.comp.version-control.git/228707 SZEDER Gábor (16): bash prompt: fix redirection coding style in tests bash prompt: use 'write_script' helper in interactive rebase test completion, bash prompt: move __gitdir() tests to completion test suite bash prompt: add

[PATCHv3 03/16] completion, bash prompt: move __gitdir() tests to completion test suite

2013-06-24 Thread SZEDER Gábor
() tests from the prompt test suite over to the completion test suite. Update the setup tests so that they perform only those steps that are necessary for each test suite. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9902-completion.sh | 134

[PATCHv3 04/16] bash prompt: add a test for symbolic link symbolic refs

2013-06-24 Thread SZEDER Gábor
Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- t/t9903-bash-prompt.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh index df36239a..416e6219 100755 --- a/t/t9903-bash-prompt.sh +++ b/t/t9903-bash-prompt.sh @@ -40,6 +40,15

[PATCHv3 05/16] bash prompt: print unique detached HEAD abbreviated object name

2013-06-24 Thread SZEDER Gábor
this by using 'git rev-parse --short HEAD' instead and adjust the corresponding test to use non-standard number of hexdigits. Signed-off-by: SZEDER Gábor sze...@ira.uka.de --- contrib/completion/git-prompt.sh | 2 +- t/t9903-bash-prompt.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions

  1   2   3   4   5   6   7   8   9   10   >