Re: [PATCH 00/40] MinGW port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, 2 Mar 2008, Johannes Sixt wrote:

> On Wednesday 27 February 2008 19:54, Johannes Sixt wrote:
> > So here it is, the MinGW port of git.
> > This series is also available from
> >
> > git://repo.or.cz/git/mingw/j6t.git upstream
> > http://repo.or.cz/w/git/mingw/j6t.git?a=shortlog;h=upstream
> 
> I've integrated the feedback that I received in this series. Thanks to 
> has_dos_drive_prefix() as suggested by Dscho quite a number of #ifdef's 
> could be removed. Below is the interdiff between the old and the new 
> state. However, I have not yet moved stuff out of git-compat-util.h into 
> compat/mingw.h to keep this message readable. I'll do that later after I 
> have rebased the series on top of the latest git.git master.

Thanks!

And especially thanks for the interdiff, it makes reviewing much easier 
;-)

> diff --git a/Makefile b/Makefile
> index 53a4e2a..2ea53c0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -265,6 +265,7 @@ PROGRAMS = \
>  	git-pack-redundant$X git-var$X \
>  	git-merge-tree$X \
>  	git-merge-recursive$X \
> +	$(POSIX_ONLY_PROGRAMS) \
>  	$(EXTRA_PROGRAMS)

Clever name!  But shouldn't EXTRA_PROGRAMS go?

> diff --git a/compat/mingw.c b/compat/mingw.c
> index 0888288..6733727 100644
> --- a/compat/mingw.c
> +++ b/compat/mingw.c
> @@ -330,16 +330,13 @@ struct tm *localtime_r(const time_t *timep, struct tm 
> *result)
>  #undef getcwd
>  char *mingw_getcwd(char *pointer, int len)
>  {
> +	int i;
>  	char *ret = getcwd(pointer, len);
>  	if (!ret)
>  		return ret;
> -	if (pointer[0] != 0 && pointer[1] == ':') {
> -		int i;
> -		for (i = 2; pointer[i]; i++)
> -			/* Thanks, Bill. You'll burn in hell for that. */
> -			if (pointer[i] == '\\')
> -				pointer[i] = '/';
> -	}
> +	for (i = 0; pointer[i]; i++)
> +		if (pointer[i] == '\\')
> +			pointer[i] = '/';

Boo.  My nice comment.  You just deleted it.  ;-)

> diff --git a/templates/Makefile b/templates/Makefile
> index eb08702..6c0da7a 100644
> --- a/templates/Makefile
> +++ b/templates/Makefile
> @@ -34,11 +34,8 @@ boilerplates.made : $(bpsrc)
>  		mkdir -p blt/$$dir && \
>  		case "$$boilerplate" in \
>  		*--) ;; \
> -		*) if test -n "$$(sed -ne '/^#!\//p' -e '1q' < "$$boilerplate")"; then \
> -			cp "$$boilerplate" "blt/$${dst}$(NOEXECTEMPL)"; \
> -		   else \
> -			cp "$$boilerplate" "blt/$$dst"; \
> -		   fi ;; \
> +		hooks--*) cp $$boilerplate blt/$${dst}$(NOEXECTEMPL) ;; \
> +		*) cp $$boilerplate blt/$$dst ;; \

Nice!  (IOW much better than what I suggested.)

> diff --git a/transport.c b/transport.c
> index 397983d..266a6cc 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -692,7 +692,8 @@ static int is_local(const char *url)
>  {
>  	const char *colon = strchr(url, ':');
>  	const char *slash = strchr(url, '/');
> -	return !colon || (slash && slash < colon);
> +	return !colon || (slash && slash < colon) ||
> +		has_dos_drive_prefix(url);

This must be the bug fix ;-)

I like it!

Thanks,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux