On Tue, Apr 18, 2017 at 3:31 PM, Ævar Arnfjörð Bjarmason
wrote:
> Change the completion of "push --delete " to complete
> refs on that , not all refs.
Good.
> Before this e.g. cloning git.git
> and doing "git push --delete origin p" will complete nothing,
Well, it will
,
because that's unexpected and we woud prefer somebody notice and
figure out why.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
Note, that the commit message references ef09036cf (t6500: wait for
detached auto gc at the end of the test script, 2017-04-13), which
is still only in 'pu
On Fri, Apr 14, 2017 at 10:08 PM, Jeff King <p...@peff.net> wrote:
> On Thu, Apr 13, 2017 at 09:35:08PM +0200, SZEDER Gábor wrote:
>
>> >> diff --git a/t/test-lib.sh b/t/test-lib.sh
>> >> index 13b569682..d7fa15a69 100644
>> >> --- a/t/test-lib.sh
On Thu, Apr 13, 2017 at 9:12 PM, Jeff King <p...@peff.net> wrote:
> On Thu, Apr 13, 2017 at 09:03:26PM +0200, SZEDER Gábor wrote:
>
>> > Yeah, I had a similar thought. I can't think of any reason why it would
>> > trigger a false positive, as long
On Thu, Apr 13, 2017 at 7:57 PM, Jeff King wrote:
> On Thu, Apr 13, 2017 at 10:55:08AM -0700, Stefan Beller wrote:
>
>> On Thu, Apr 13, 2017 at 9:37 AM, Jeff King wrote:
>> > Ah, OK, that makes more sense. I can detect it reliably by just checking
>> >
>> > ! test
On Thu, Apr 13, 2017 at 6:44 PM, Jeff King <p...@peff.net> wrote:
> On Thu, Apr 13, 2017 at 12:31:38PM +0200, SZEDER Gábor wrote:
> I did wonder what will happen if Windows learns to daemonize() the
> auto-gc. I don't think we'll get an immediate test failure, but this
> tes
On Fri, Apr 7, 2017 at 4:05 PM, Michael J Gruber <g...@grubix.eu> wrote:
> SZEDER Gábor venit, vidit, dixit 06.04.2017 16:33:
>>> @@ -1779,6 +1780,31 @@ static void wt_shortstatus_print_tracking(struct
>>> wt_status *s)
>>> }
>>&g
ixt <j...@kdbg.org>
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
Updated subject line, but otherwise the same as v2.
t/t6500-gc.sh | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh
index 08de2e8ab..cc7acd101 10
ixt <j...@kdbg.org>
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
t/t6500-gc.sh | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh
index 08de2e8ab..cc7acd101 100755
--- a/t/t6500-gc.sh
+++ b/t/t6500-gc.
On Wed, Apr 12, 2017 at 2:50 AM, Jeff King <p...@peff.net> wrote:
> On Wed, Apr 12, 2017 at 02:27:05AM +0200, SZEDER Gábor wrote:
>
>> >> I wonder if you could make it a general test-lib function, like:
>> >>
>> >> run_and_wait () {
>> >&g
On Tue, Apr 11, 2017 at 11:32 PM, Johannes Sixt wrote:
> Am 10.04.2017 um 19:01 schrieb Jeff King:
>>
>> I wonder if you could make it a general test-lib function, like:
>>
>> run_and_wait () {
>> # we read stdout from the child only for the side effect
>> # of
On Mon, Apr 10, 2017 at 6:35 PM, Jeff King <p...@peff.net> wrote:
> On Mon, Apr 10, 2017 at 06:31:54PM +0200, SZEDER Gábor wrote:
>> This means we can write this simply as:
>>
>> doesnt_matter=$(git gc --auto 9>&1)
>>
>> It's still hackery :)
&
On Mon, Apr 10, 2017 at 3:58 PM, Jeff King <p...@peff.net> wrote:
> On Mon, Apr 10, 2017 at 02:59:11PM +0200, SZEDER Gábor wrote:
>
>> While this change doesn't completely eliminate the possibility of
>> this race, it significantly and seemingly sufficiently reduces its
On Mon, Apr 10, 2017 at 1:40 PM, Ævar Arnfjörð Bjarmason
<ava...@gmail.com> wrote:
> On Mon, Apr 10, 2017 at 1:19 PM, SZEDER Gábor <szeder@gmail.com> wrote:
>> A few other failures are triggered by the ':' in the trash directory's
>> name, breaking the foll
and the pid file were
not removed.)
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
t/t6500-gc.sh | 32 +++-
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh
index 08de2e8ab..2dc202c9b 100755
--- a/t/t6500-gc.sh
+
On Mon, Apr 10, 2017 at 10:02 AM, Ævar Arnfjörð Bjarmason
<ava...@gmail.com> wrote:
> On Mon, Apr 10, 2017 at 3:47 AM, SZEDER Gábor <szeder@gmail.com> wrote:
>>> Change the test library to insert non-alphanumeric ASCII characters
>>> into the TRASH_DIRECTORY na
> Change the test library to insert non-alphanumeric ASCII characters
> into the TRASH_DIRECTORY name, that's the directory the test library
> creates, chdirs to and runs each individual test from.
>
> Unless test_fails_on_unusual_directory_names=1 is declared before
> importing test-lib.sh (and
inished merge, 2007-09-30).
Later 3041c3243 (am: --rebasing, 2008-03-04) made it possible to tell
those cases apart and made __git_ps1() use this right away to display
either "AM" or "REBASE", respectively. However, it left that
"AM/REBASE" in an else-branch as a fallbac
> Add strcmp_offset() function to also return the offset of the
> first change.
>
> Signed-off-by: Jeff Hostetler
> ---
> cache.h | 1 +
> read-cache.c | 29 +
> 2 files changed, 30 insertions(+)
>
> diff --git a/cache.h b/cache.h
>
> Teach add_index_entry_with_check() and has_dir_name()
> to see if the path of the new item is greater than the
> last path in the index array before attempting to search
> for it.
>
> During checkout, merge_working_tree() populates the new
> index in sorted order, so this change saves at least
I think this patch should be squashed into the previous commit; I
don't see any reason why the tests should be added in a different
commit than the function they are testing. However...
> Signed-off-by: Jeff Hostetler
> ---
> Makefile | 1 +
>
> In the other case (for the user bored of waiting seeking for some
> entertainment ;-)) a "-v (verbose) option could be useful. Or at the
> very least: If git is expecting that some operation will take (or
> already did take) a lot of time, give some message explaining why it
> is taking a lot
On Fri, Mar 24, 2017 at 1:52 AM, Jeff King <p...@peff.net> wrote:
> On Thu, Mar 23, 2017 at 04:38:39PM +0100, SZEDER Gábor wrote:
>
> > Just like in the case of search patterns for 'git grep', see 29eec71f2
> > (completion: match ctags symbol names in grep patterns, 20
On Fri, Mar 24, 2017 at 8:42 PM, Jeff King <p...@peff.net> wrote:
> On Thu, Mar 23, 2017 at 04:29:18PM +0100, SZEDER Gábor wrote:
>> case "$cur_" in
>> refs|refs/*)
>> format="refn
On Thu, Mar 23, 2017 at 8:39 PM, Jeff King wrote:
> On Thu, Mar 23, 2017 at 12:33:06PM -0700, Junio C Hamano wrote:
>
>> >> Nice, but why add the "if" when it's doing nothing?
>> >
>> > It's short-circuiting in the conditional.
>>
>> I think René meant this:
>>
>> /* just for
This eliminates three magic numbers.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
refs.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/refs.c b/refs.c
index e7606716d..0272e332c 100644
--- a/refs.c
+++ b/refs.c
@@ -366,11 +366,11
these options, both in stuck and in unstuck forms.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 28
1 file changed, 28 insertions(+)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completi
/completion-refs-speedup'.
SZEDER Gábor (3):
completion: put matching ctags symbol names directly into COMPREPLY
completion: extract completing ctags symbol names into helper function
completion: offer ctags symbol names for 'git log -S', '-G' and '-L:'
contrib/completion/git-completion.bash | 72
ime __gitcomp_direct "$(__git_match_ctag "" tags "" " ")"
real0m0.058s
user 0m0.048s
sys 0m0.008s
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
Notes:
It's still just a simple linear search through the tags file, so t
__git_complete_symbol(), which encompasses
the condition for checking the presence of the tag file and filling
COMPREPLY, and accepts '--opt=val'-style options with default values
that keep callsites simpler.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bas
On Thu, Mar 23, 2017 at 4:29 PM, SZEDER Gábor <szeder@gmail.com> wrote:
> This series is the updated version of 'sg/completion-refs-speedup'.
Forgot to mention that v1 can be found here:
http://public-inbox.org/git/20170203025405.8242-1-szeder@gmail.com/T/
Gábor
this new parameter the 4. positional parameter and leave the 3.
as an ignored placeholder for now (it will be used later in this patch
series).
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 21 ++---
t/t9902-complet
] - http://public-inbox.org/git/20170206181545.12869-1-szeder@gmail.com/
SZEDER Gábor (14):
completion: remove redundant __gitcomp_nl() options from _git_commit()
completion: wrap __git_refs() for better option parsing
completion: support completing full refs after '--option=refs
:
real0m2.781s
user0m1.826s
sys 0m0.136s
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completi
refs2() helper.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 102 ---
t/t9902-completion.sh | 106 +
2 files changed, 173 insertions(+), 35 deletions(-)
diff --git a/co
and branches
in __git_tags() and __git_heads().
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
real0m2.093s
user0m1.641s
sys 0m0.060s
After:
real0m0.683s
user0m0.203s
sys 0m0.076s
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 54 +-
contrib/completion/git-completio
0m0.750s
user0m0.015s
sys 0m0.090s
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completi
suffix parameters, and to fill COMPREPLY using
__gitcomp_direct().
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 25 +++--
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/contrib/completion/git-completion.bas
0m8.191s
user0m4.638s
sys 0m2.918s
After:
real0m6.187s
user0m3.358s
sys 0m2.121s
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff
and feed the result, since it doesn't need further
processing, to the new __gitcomp_direct() helper added in the previous
commit, because it should be faster when there are a lot of refspecs
to list.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.ba
0m0.104s
sys 0m0.008s
On Windows, before:
real0m1.480s
user0m1.031s
sys 0m0.060s
After:
real0m0.377s
user0m0.015s
sys 0m0.030s
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index e129f674e..5ee35d530 100644
--- a/c
) that has all the
necessary parameters to do the right thing in all cases mentioned
above, including non-fast-forward fully qualified refspecs. This new
function can also easier benefit from optimizations coming later in
this patch series.
Signed-off-by: SZEDER Gábor <szeder@gmail.com&
Those two options are specifying the default values that
__gitcomp_nl() would use anyway when invoked with no options at all.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/c
Commit 49416ad22 (completion: support excluding refs, 2016-08-24) made
possible to complete short refs with a '^' prefix.
Extend the support to full refs to make completing '^refs/...' work.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bas
On Tue, Mar 21, 2017 at 6:58 PM, Junio C Hamano <gits...@pobox.com> wrote:
> SZEDER Gábor <szeder@gmail.com> writes:
>
>>> The "Copy commit summary" command of gitk can be used to obtain this
>>> -format.
>>> +format, or this invocati
> Amend the section which describes how to get a commit summary to show
> how do to that with "git show", currently the documentation only shows
> how to do that with gitk.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason
> ---
> Documentation/SubmittingPatches | 11 ++-
> 1
ect the new test without the fix to fail most of the time on
Windows.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
Changes since v1:
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index 03f84b714..341529b5a 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -81,12 +81
On Sat, Mar 18, 2017 at 4:12 PM, SZEDER Gábor <szeder@gmail.com> wrote:
> Make sure that the buffer size is reduced on each iteration as the
> buffer pointer is advanced, thus maintaining the correct end of buffer
> location.
>
> The new test is flaky, I've never seen it
-by: SZEDER Gábor <szeder@gmail.com>
---
t/test-lib-functions.sh | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 4a50a6104..5ee124332 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functi
-off-by: SZEDER Gábor <szeder@gmail.com>
---
t/test-lib-functions.sh | 2 +-
t/test-lib.sh | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index bd357704c..4a50a6104 100644
--- a/t/test-lib-functions.sh
+
On Fri, Mar 17, 2017 at 3:55 PM, Jeff King <p...@peff.net> wrote:
> On Fri, Mar 17, 2017 at 03:46:46PM +0100, SZEDER Gábor wrote:
>
>> The 'debug' test helper is supposed to facilitate debugging by running
>> a command of the test suite under gdb. Unfortunately, its u
ails, 2016-09-21). And
based on that commit message I would expect the new test without the
fix to fail reliably on Windows.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
diffcore-pickaxe.c | 5 -
t/t4062-diff-pickaxe.sh | 5 +
2 files changed, 9 insertions(+), 1 d
, see 781f76b15 (test-lib: redirect stdin
of tests, 2011-12-15)).
Re-attach the original standard input in the debug helper, thus
creating an interactive gdb session, which is much much more useful.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
t/test-lib-functions.sh | 2 +-
On Mon, Feb 27, 2017 at 10:12 PM, Jeff King wrote:
> I didn't actually review it very carefully before, but I'll do so now
> (spoiler: a few nits, but it looks fine).
>
>> static struct ref *wanted_peer_refs(const struct ref *refs,
>> - struct refspec *refspec)
>> +
On Tue, Feb 14, 2017 at 10:24 PM, wrote:
> + *)
> + __git_complete_tree_file "$ref" "$cur"
> + ;;
There is one more caveat here.
Both our __git_complete_index_file() and Bash's builtin filename
completion
On Wed, Feb 15, 2017 at 3:41 AM, Junio C Hamano <gits...@pobox.com> wrote:
> SZEDER Gábor <szeder@gmail.com> writes:
>
>>> If you feel uncomfortable and want these to cook longer, please tell
>>> me so.
>>
>> Well, it was mainly my surp
On Tue, Feb 14, 2017 at 10:24 PM, wrote:
> From: Cornelius Weig
>
> Git-checkout completes words starting with '--' as options and other
> words as refs. Even after specifying a ref, further words not starting
> with '--' are completed as
On Mon, Feb 13, 2017 at 9:45 PM, Junio C Hamano <gits...@pobox.com> wrote:
> SZEDER Gábor <szeder@gmail.com> writes:
>
>> Recent commit 1cd23e9e0 (completion: don't use __gitdir() for git
>> commands, 2017-02-03) rewrapped a couple of long lines, and while
>&g
On Tue, Feb 14, 2017 at 12:33 AM, wrote:
> From: Cornelius Weig
>
> The command line completion for git-checkout bails out when seeing '--'
> as an isolated argument. For git-checkout this signifies the start of a
> list of files which are
On Fri, Feb 10, 2017 at 10:44 PM, Junio C Hamano wrote:
> Should I expect a reroll to come, or is this the only fix-up to the
> series that begins at <20170203025405.8242-1-szeder@gmail.com>?
>
> No hurries.
Yes, definitely.
I found a minor bug in the middle of the
Recent commit 1cd23e9e0 (completion: don't use __gitdir() for git
commands, 2017-02-03) rewrapped a couple of long lines, and while
doing so it inadvertently removed a '\' from the end of a line, thus
breaking completion for 'git config remote.name.push '.
Signed-off-by: SZEDER Gábor <sze
> * sg/completion-refs-speedup (2017-02-06) 13 commits
> - squash! completion: fill COMPREPLY directly when completing refs
> - completion: fill COMPREPLY directly when completing refs
> - completion: list only matching symbolic and pseudorefs when completing refs
> - completion: let
On Mon, Feb 6, 2017 at 7:31 PM, Jacob Keller wrote:
> On Fri, Feb 3, 2017 at 7:15 PM, Jacob Keller wrote:
>> I haven't had a chance to further investigate, but I tried this series
>> out (from your github) and it appears that this series (or the
>>
Care should be taken, though, because that prefix might contain
'for-each-ref' format specifiers as part of the left hand side of a
'..' range or '...' symmetric difference notation or fetch/push/etc.
refspec, e.g. 'git log "evil-%(refname)..br'. Doubling every '%'
in the prefix will prevent 'git
Commit 49416ad22 (completion: support excluding refs, 2016-08-24) made
possible to complete short refs with a '^' prefix.
Extend the support to full refs to make completing '^refs/...' work.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bas
and branches
in __git_tags() and __git_heads().
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
0m8.191s
user0m4.638s
sys 0m2.918s
After:
real0m6.187s
user0m3.358s
sys 0m2.121s
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 19799e3ba..d55eadfd1 100644
--- a/c
0m0.076s
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 54 --
contrib/completion/git-completion.zsh | 9 ++
t/t9902-completion.sh | 16 ++
3 files changed, 64 insertions(
this new parameter the 4. positional parameter and leave the 3.
as an ignored placeholder for now (it will be used later in this patch
series).
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 21 ++---
t/t9902-complet
the current word to be completed, as it
will allow us to optimize how refs are placed into the COMPREPLY
array.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 20
t/t9902-completion.sh | 4
2 files chang
full remote refs via 'git ls-remote').
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 14 +++--
t/t9902-completion.sh | 102 +
2 files changed, 111 insertions(+), 5 deletions(-)
diff --git a/c
refs2() helper.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 102 ---
t/t9902-completion.sh | 106 +
2 files changed, 173 insertions(+), 35 deletions(-)
diff --git a/co
:
real0m2.781s
user0m1.826s
sys 0m0.136s
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completi
0m0.750s
user0m0.015s
sys 0m0.090s
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completi
is also available at:
https://github.com/szeder/git completion-refs-speedup
SZEDER Gábor (12):
completion: remove redundant __gitcomp_nl() options from _git_commit()
completion: wrap __git_refs() for better option parsing
completion: support completing full refs after '--option=refs
Those two options are specifying the default values that
__gitcomp_nl() would use anyway when invoked with no options at all.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/c
line will not be utterly disrupted by those error messages.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 8
t/t9902-completion.sh | 7 ++-
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/contrib/com
the necessary checks of the remote in
__git_refs().
Though __git_refs() was the last remaining callsite that passed a
remote to __gitdir(), don't delete __gitdir()'s remote-handling part
yet, just in case some users' custom completion scriptlets depend on
it.
Signed-off-by: SZEDER Gábor <sze
That "first argument is passed to __gitdir()" statement in particular
is not really helpful, and after this series it won't be the case
anyway.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 8 +---
1 file changed, 5 insertions
-by: SZEDER Gábor <szeder@gmail.com>
---
t/t9902-completion.sh | 265 +-
1 file changed, 264 insertions(+), 1 deletion(-)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index f7f7d49fb..7956cb9b1 100755
--- a/t/t9902-completion.sh
+
' in __gitdir() itself.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 5b2
that this change doesn't
alter __gitdir()'s behavior.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 42 +-
t/t9902-completion.sh | 22 +-
2 files changed, 42 insertions(+), 22 deletions(-)
argument matches the name of a configured remote. Use
this helper to decide how to handle the remote passed to __git_refs().
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 20 ++--
t/t9902-completion.sh
these functions,
sparing the fork()+exec() overhead of the command substitution and the
potential 'git rev-parse' execution.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 32 +++-
1 file changed, 11 insertions(
automatically or is specified via $GIT_DIR or 'git
--git-dir='.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
Documentation/git-rev-parse.txt | 4
builtin/rev-parse.c | 26 ++
t/t1500-rev-parse.sh| 17 +
3 files chang
from. Although
one-shot variable assignments in front of shell functions are to be
avoided in our scripts in general, in the Bash completion script we
can do that safely.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 60
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 11 +++
1 file changed, 11 insertions(+)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 4ded44977..7d25b33b8 100644
--- a/contri
through __git() already have
their standard error silenced.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 28
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/contrib/completion/git-completion.bash
b/c
optional remote argument, because users' custom
completion scriptlets might depend on it.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 46 ++
t/t9902-completion.sh | 161 +
2 files c
the
path of the trash directory in a variable, and use that variable in
all __gitdir() tests.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
t/t9902-completion.sh | 44 +---
1 file changed, 21 insertions(+), 23 deletions(-)
diff --git a/t
the files we are actually interested in.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
t/t9902-completion.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index a34e55f87..f490c1d05 100755
--- a/t/t9902-complet
/CANoM8SXO_Rz_CVOz9ptsaVCzcQ2D1FQrSuFFW4vZ4SdRYMzD=w...@mail.gmail.com/
[3] -
http://public-inbox.org/git/20160518185825.horde.epd2njnvqew_vx4b01yw...@webmail.informatik.kit.edu/
SZEDER Gábor (21):
completion: improve __git_refs()'s in-code documentation
completion tests: don't add test cruft to the test repository
completion tests
The __gitdir() helper function shouldn't output anything if not in a
git repository. The relevant tests only checked its error code, so
extend them to ensure that there's no output.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
t/t9902-completion.sh | 8 +---
1 file chan
' is bashism, of course, but the tests of the Bash
completion script are run under Bash anyway, and there are already
other variables declared local in this test script.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
t/t9902-completion.sh | 4 ++--
1 file changed, 2 insertions(+), 2 del
printing anything to stdout if it doesn't.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 1 +
t/t9902-completion.sh | 8
2 files changed, 9 insertions(+)
diff --git a/contrib/completion/git-completion.bash
b/c
don't need
these '-C ' options, because __gitdir() already took those
options into account. It would not hurt them, either, but let's not
induce unnecessary code churn.
Signed-off-by: SZEDER Gábor <szeder@gmail.com>
---
contrib/completion/git-completion.bash | 19 ++--
t/t9902-complet
When refs completion is attempted while not in a git repository, the
completion script offers 'HEAD' erroneously.
Check early in __git_refs() that there is either a repository or a
remote to work on, and return early if neither is given.
Signed-off-by: SZEDER Gábor <szeder@gmail.
701 - 800 of 1200 matches
Mail list logo