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

Re: [PATCH 4/4] remote-helpers: add exec-path links

From
Junio C Hamano <gitster@pobox.com>
Date
May 28, 2013, 20:06 UTC
Message-ID
<7vfvx6zx79.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1369449507-18269-5-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 8 quoted lines
> This way we don't have to modify the PATH ourselves and it's easier to
> test without 'make'.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  .gitignore                      |  2 ++
>  contrib/remote-helpers/Makefile | 13 +++++++++----
>  2 files changed, 11 insertions(+), 4 deletions(-)

If we teach the top-level .gitignore that some contrib/ stuff might contaminate the top-level directory (which is a good idea), we should also teach the top-level Makefile how to get rid of the built cruft upon "make clean", no?

Show 52 quoted lines
> diff --git a/.gitignore b/.gitignore
> index 10aee94..a79b412 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -119,11 +119,13 @@
>  /git-reflog
>  /git-relink
>  /git-remote
> +/git-remote-bzr
>  /git-remote-http
>  /git-remote-https
>  /git-remote-ftp
>  /git-remote-ftps
>  /git-remote-fd
> +/git-remote-hg
>  /git-remote-ext
>  /git-remote-testgit
>  /git-remote-testpy
> diff --git a/contrib/remote-helpers/Makefile b/contrib/remote-helpers/Makefile
> index 55abf0b..98150b4 100644
> --- a/contrib/remote-helpers/Makefile
> +++ b/contrib/remote-helpers/Makefile
> @@ -1,9 +1,9 @@
>  TESTS := $(wildcard test-*.t)
>  SCRIPTS := $(wildcard git-remote-*.py)
> +LINKS := $(addprefix ../../,$(patsubst %.py,%,$(SCRIPTS)))
>  
>  export T := $(addprefix $(CURDIR)/,$(TESTS))
>  export MAKE := $(MAKE) -e
> -export PATH := $(CURDIR):$(PATH)
>  export TEST_LINT := test-lint-executable test-lint-shell-syntax
>  export TEST_DIRECTORY := $(CURDIR)/../../t
>  
> @@ -15,10 +15,15 @@ all: $(SCRIPTS)
>  install:
>  	$(MAKE) -C ../.. install-python-script
>  
> -test: all
> +links: all $(LINKS)
> +
> +test: links
>  	$(MAKE) -C ../../t $@
>  
> -$(TESTS): all
> +$(LINKS):
> +	ln -sf contrib/remote-helpers/$(notdir $@) ../..
> +
> +$(TESTS): links
>  	$(MAKE) -C ../../t $(CURDIR)/$@
>  
> -.PHONY: all install test $(TESTS)
> +.PHONY: all install test links $(TESTS)
Previous: Felipe Contreras
Message 12 of 12 in “remote-helpers: test reorganization”
  1. 0/4 remote-helpers: test reorganizationFelipe Contreras, May 25, 2013
  2. 1/4 remote-helpers: generate scriptsFelipe Contreras, May 25, 2013
  3. 2/4 remote-helpers: rename testsFelipe Contreras, May 25, 2013
  4. Junio C HamanoMay 28, 2013
  5. Felipe ContrerasMay 29, 2013
  6. Junio C HamanoMay 29, 2013
  7. Felipe ContrerasMay 29, 2013
  8. Junio C HamanoMay 29, 2013
  9. Felipe ContrerasMay 29, 2013
  10. 3/4 remote-helpers: allow direct test executionFelipe Contreras, May 25, 2013
  11. 4/4 remote-helpers: add exec-path linksFelipe Contreras, May 25, 2013
  12. Junio C HamanoMay 28, 2013

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.