All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: tboegi@web.de
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC] t0060: basename("//") is implementation defined
Date: Wed, 13 Jan 2016 13:16:52 -0800	[thread overview]
Message-ID: <xmqqegdlmb7f.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1452718561-32226-1-git-send-email-tboegi@web.de> (tboegi@web.de's message of "Wed, 13 Jan 2016 21:56:01 +0100")

tboegi@web.de writes:

> From: Torsten Bögershausen <tboegi@web.de>
>
> From
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/basename.html
> basename("//") may return either "//" or "/".
>
> Linux returns "/", some systems like Mac OS X return "//".
> Skip the test unless NO_LIBGEN_H is set and gitbasename() from
> compat/basename is used.
>
> Signed-off-by: Torsten Bögershausen <tboegi@web.de>
> ---
> My version of a hot fix
>  test-path-utils.c | 2 ++
>  1 file changed, 2 insertions(+)

Thanks.  Ramsay gave a nice analysis at

  http://thread.gmane.org/gmane.comp.version-control.git/283928

and Dscho already is working on it, IIUC, in a slightly different
direction.

> diff --git a/test-path-utils.c b/test-path-utils.c
> index 4ab68ac..db0bb39 100644
> --- a/test-path-utils.c
> +++ b/test-path-utils.c
> @@ -142,7 +142,9 @@ static struct test_data dirname_data[] = {
>  	{ ".",               "."      },
>  	{ "..",              "."      },
>  	{ "/",               "/"      },
> +#if defined(NO_LIBGEN_H)
>  	{ "//",              "//"     },
> +#endif
>  #if defined(__CYGWIN__) && !defined(NO_LIBGEN_H)
>  	{ "///",             "//"     },
>  	{ "////",            "//"     },

  reply	other threads:[~2016-01-13 21:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13 20:56 [PATCH/RFC] t0060: basename("//") is implementation defined tboegi
2016-01-13 21:16 ` Junio C Hamano [this message]
2016-01-14  7:00 ` Johannes Schindelin
2016-01-14 11:47   ` Torsten Bögershausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqegdlmb7f.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.