Re: [PATCH 00/40] MinGW port
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 2, 2008, 22:07 UTC
- Message-ID
- <alpine.LSU.1.00.0803022200070.22527@racer.site>
- In-Reply-To
- <200803022220.59711.johannes.sixt@telecom.at>
Hi,
On Sun, 2 Mar 2008, Johannes Sixt wrote:
Show 13 quoted lines
> 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 ;-)
Show 10 quoted lines
> 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?
Show 23 quoted lines
> 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. ;-)
Show 15 quoted lines
> 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.)
Show 11 quoted lines
> 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