git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 1/1] completion: graduate out of contrib

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 14, 2021, 23:17 UTC
Message-ID
<878s28zdmz.fsf@evledraar.gmail.com>
In-Reply-To
<87bl74zdtb.fsf@evledraar.gmail.com>
On Thu, Jul 15 2021, Ævar Arnfjörð Bjarmason wrote:
Show 36 quoted lines
> On Wed, Jul 14 2021, Felipe Contreras wrote:
>> [...]
>> @@ -2399,7 +2399,7 @@ test_expect_success 'sourcing the completion script clears cached --options' '
>>  	verbose test -n "$__gitcomp_builtin_checkout" &&
>>  	__gitcomp_builtin notes_edit &&
>>  	verbose test -n "$__gitcomp_builtin_notes_edit" &&
>> -	. "$GIT_BUILD_DIR/contrib/completion/git-completion.bash" &&
>> +	. "$GIT_BUILD_DIR/extra/completion/git-completion.bash" &&
>>  	verbose test -z "$__gitcomp_builtin_checkout" &&
>>  	verbose test -z "$__gitcomp_builtin_notes_edit"
>>  '
>>
>> diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
>> index bbd513bab0..784e523fd4 100755
>> --- a/t/t9903-bash-prompt.sh
>> +++ b/t/t9903-bash-prompt.sh
>> @@ -10,7 +10,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
>>  
>>  . ./lib-bash.sh
>>  
>> -. "$GIT_BUILD_DIR/contrib/completion/git-prompt.sh"
>> +. "$GIT_BUILD_DIR/extra/completion/git-prompt.sh"
>>  
>>  actual="$TRASH_DIRECTORY/actual"
>>  c_red='\\[\\e[31m\\]'
>
> It's more of a "for bonus points", but a nic way to round-trip this
> would be to make this work with GIT_TEST_INSTALLED.
>
> I.e. source these relative to GIT_EXEC_PATH, not $GIT_BUILD_DIR, I think
> that just sourcing them as e.g.:
>
>     . git-completion.bash
>
> But the GIT_TEST_INSTALLED case is tricker, maybe we'd need to add a
> "git --share-path" :(

I forgot to include this not-working patch, i.e. I've got no idea what the "something" should be other than the harder thing of compiling "sharedir" into git and making "git --share-path" work.

It's not /that/ bad, see the grep for GIT_LOCALE_PATH, still a bit painful, and maybe not worth it for this change...

diff --git a/t/test-lib.sh b/t/test-lib.sh
index 98e20950c3..0a9fbfc253 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1301,7 +1301,7 @@ elif test -n "$GIT_TEST_INSTALLED"
 then
 	GIT_EXEC_PATH=$($GIT_TEST_INSTALLED/git --exec-path)  ||
 	error "Cannot run git from $GIT_TEST_INSTALLED."
-	PATH=$GIT_TEST_INSTALLED:$GIT_BUILD_DIR/t/helper:$PATH
+	PATH=$GIT_TEST_INSTALLED:$GIT_TEST_INSTALLED/something:$GIT_BUILD_DIR/t/helper:$PATH
 	GIT_EXEC_PATH=${GIT_TEST_EXEC_PATH:-$GIT_EXEC_PATH}
 else # normal case, use ../bin-wrappers only unless $with_dashes:
 	if test -n "$no_bin_wrappers"
@@ -1322,7 +1322,7 @@ else # normal case, use ../bin-wrappers only unless $with_dashes:
 	GIT_EXEC_PATH=$GIT_BUILD_DIR
 	if test -n "$with_dashes"
 	then
-		PATH="$GIT_BUILD_DIR:$GIT_BUILD_DIR/t/helper:$PATH"
+		PATH="$GIT_BUILD_DIR:$GIT_BUILD_DIR/t/helper:$GIT_BUILD_DIR/extra/completion:$PATH"
 	fi
 fi
 GIT_TEMPLATE_DIR="$GIT_BUILD_DIR"/templates/blt
Previous: Ævar Arnfjörð BjarmasonNext: Felipe Contreras
Message 11 of 17 in “extra: new concept of extra components”
  1. 0/2 extra: new concept of extra componentsFelipe Contreras, Jul 10, 2021
  2. 1/2 completion: graduate out of contribFelipe Contreras, Jul 10, 2021
  3. 2/2 git-new-workdir: graduate out of contribFelipe Contreras, Jul 10, 2021
  4. Philippe BlainJul 12, 2021
  5. Felipe ContrerasJul 12, 2021
  6. Junio C HamanoJul 13, 2021
  7. Felipe ContrerasJul 13, 2021
  8. 0/1 extra: new concept of extra componentsFelipe Contreras, Jul 14, 2021
  9. 1/1 completion: graduate out of contribFelipe Contreras, Jul 14, 2021
  10. Ævar Arnfjörð BjarmasonJul 14, 2021
  11. Ævar Arnfjörð BjarmasonJul 14, 2021
  12. Felipe ContrerasJul 15, 2021
  13. Ævar Arnfjörð BjarmasonJul 16, 2021
  14. Felipe ContrerasJul 16, 2021
  15. Felipe ContrerasJul 15, 2021
  16. 0/1 extra: new concept of extra componentsFelipe Contreras, Jul 16, 2021
  17. 1/1 completion: graduate out of contribFelipe Contreras, Jul 16, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.