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

Re: [msysGit] Re: [PATCH 0/2] submodules: Use relative paths to gitdir and work tree

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 28, 2012, 19:14 UTC
Message-ID
<7vehtezs6q.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4F4D23D8.1050208@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 5 quoted lines
> With the following patch on top of your always-use-relative-gitdir branch
> from https://github.com/jlehmann/git-submod-enhancements the tests pass
> on Windows.
>
> Thanks, Dscho, for pointing out the obvious.
The patch looks unintrusive and sane.

Thanks all three of you for looking into this. Should I wait for a patch with nice write-up from one of you, or should I just come up with a random message and apply it locally avoiding roundtrip cost?

Show 14 quoted lines
> diff --git a/git-submodule.sh b/git-submodule.sh
> index e1984e0..953ca5e 100755
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -151,6 +151,9 @@ module_clone()
>  
>  	a=$(cd "$gitdir" && pwd)
>  	b=$(cd "$path" && pwd)
> +	# normalize Windows-style absolute paths to POSIX-style absolute paths
> +	case $a in [a-zA-Z]:/*) a=/${a%%:*}${a#*:} esac
> +	case $b in [a-zA-Z]:/*) b=/${b%%:*}${b#*:} esac
>  	# Remove all common leading directories
>  	while test -n "$a" && test -n "$b" && test "${a%%/*}" = "${b%%/*}"
>  	do
Previous: Johannes SixtNext: Jens Lehmann
Message 19 of 21 in “submodules: Use relative paths to gitdir and work tree”
  1. 0/2 submodules: Use relative paths to gitdir and work treeJens Lehmann, Feb 8, 2012
  2. 1/2 submodules: always use a relative path to gitdirJens Lehmann, Feb 8, 2012
  3. 1/2 submodules: always use a relative path to gitdirJens Lehmann, Feb 9, 2012
  4. Junio C HamanoFeb 9, 2012
  5. Junio C HamanoFeb 9, 2012
  6. Jens LehmannFeb 9, 2012
  7. 2/2 submodules: always use a relative path from gitdir to work treeJens Lehmann, Feb 8, 2012
  8. 2/2 submodules: always use a relative path from gitdir to work treeJens Lehmann, Feb 9, 2012
  9. Junio C HamanoFeb 13, 2012
  10. Jens LehmannFeb 14, 2012
  11. Junio C HamanoFeb 14, 2012
  12. Junio C HamanoFeb 14, 2012
  13. Jens LehmannFeb 15, 2012
  14. Johannes SixtFeb 26, 2012
  15. Jens LehmannFeb 26, 2012
  16. Johannes SixtFeb 27, 2012
  17. Johannes SchindelinFeb 27, 2012
  18. Johannes SixtFeb 28, 2012
  19. Junio C HamanoFeb 28, 2012
  20. Jens LehmannFeb 28, 2012
  21. Jens LehmannFeb 28, 2012

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.