From: Junio C Hamano <gitster@pobox•com>
To: "SZEDER Gábor" <szeder@ira•uka.de>
Cc: "Jeff King" <peff@peff•net>,
"Torsten Bögershausen" <tboegi@web•de>,
git@vger•kernel.org
Subject: Re: Compiler warning under cygwin/mingw
Date: Tue, 12 Apr 2016 16:20:25 -0700 [thread overview]
Message-ID: <xmqqy48imn2e.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1456754714-25237-1-git-send-email-szeder@ira.uka.de> ("SZEDER Gábor"'s message of "Mon, 29 Feb 2016 15:05:14 +0100")
SZEDER Gábor <szeder@ira•uka.de> writes:
> Hi,
>
>> > And MINGW is not happy for other reasons:
>> >
>> > builtin/rev-parse.c: In function 'cmd_rev_parse':
>> > builtin/rev-parse.c:775:12: warning: implicit declaration of function
>> > 'realpath' [-Wimplicit-function-declaration]
>> > if (!realpath(gitdir, absolute_path))
>> > ^
>>
>> I guess you're building "pu"; that is only in sg/completion-updates. I
>> don't know if our custom real_path() would suffice there. You might want
>> to ping the author. The patch is:
>>
>> http://article.gmane.org/gmane.comp.version-control.git/287462
>
> Oh, I was not aware that there is a custom real_path() that is
> preferred over the system realpath(). I don't see why our real_path()
> would not suffice, it even makes the code a tad shorter.
>
> I will include the patch below in the reroll.
A friendly ping to see if I am missing new development that followed
this message...
>
> Best,
> Gábor
>
>
> ---- >8 ----
> Subject: [PATCH] fixup! rev-parse: add '--absolute-git-dir' option
>
> ---
> builtin/rev-parse.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
> index 90a4dd6032c0..d6d9a82c77c4 100644
> --- a/builtin/rev-parse.c
> +++ b/builtin/rev-parse.c
> @@ -762,10 +762,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
> if (!gitdir && !prefix)
> gitdir = ".git";
> if (gitdir) {
> - char absolute_path[PATH_MAX];
> - if (!realpath(gitdir, absolute_path))
> - die_errno(_("unable to get absolute path"));
> - puts(absolute_path);
> + puts(real_path(gitdir));
> continue;
> }
> }
next prev parent reply other threads:[~2016-04-12 23:20 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 6:30 50a6c8ef - xmalloc_array Torsten Bögershausen
2016-02-29 9:28 ` [PATCH] compat/mingw: brown paper bag fix for 50a6c8e Jeff King
2016-02-29 9:56 ` Torsten Bögershausen
2016-02-29 10:02 ` Jeff King
2016-02-29 10:40 ` Compiler warning under cygwin/mingw (was: fix for 50a6c8e) Torsten Bögershausen
2016-02-29 10:47 ` Jeff King
2016-02-29 14:05 ` SZEDER Gábor
2016-04-12 23:20 ` Junio C Hamano [this message]
2016-05-10 18:29 ` [PATCH 0/6] modernize t1500 Junio C Hamano
2016-02-29 12:32 ` Compiler warning under cygwin/mingw Ramsay Jones
2016-03-03 3:33 ` Ramsay Jones
2016-03-03 5:25 ` Ramsay Jones
2016-02-29 19:10 ` [PATCH] compat/mingw: brown paper bag fix for 50a6c8e Junio C Hamano
2016-02-29 21:36 ` Jeff King
2016-03-01 5:49 ` Torsten Bögershausen
2016-03-01 5:54 ` Jeff King
2016-03-01 13:52 ` Johannes Schindelin
2016-02-29 13:01 ` Johannes Schindelin
-- strict thread matches above, loose matches on Subject: below --
2016-05-10 5:20 [PATCH 0/6] modernize t1500 Eric Sunshine
2016-05-10 5:20 ` [PATCH 1/6] t1500: test_rev_parse: facilitate future test enhancements Eric Sunshine
2016-05-10 5:20 ` [PATCH 2/6] t1500: reduce dependence upon global state Eric Sunshine
2016-05-10 5:20 ` [PATCH 3/6] t1500: avoid changing working directory outside of tests Eric Sunshine
2016-05-10 5:20 ` [PATCH 4/6] t1500: avoid setting configuration options " Eric Sunshine
2016-05-10 6:34 ` Eric Sunshine
2016-05-10 18:02 ` Junio C Hamano
2016-05-10 5:20 ` [PATCH 5/6] t1500: avoid setting environment variables " Eric Sunshine
2016-05-10 18:39 ` Jeff King
2016-05-10 19:12 ` Eric Sunshine
2016-05-10 19:19 ` Junio C Hamano
2016-05-10 19:48 ` Eric Sunshine
2016-05-10 19:59 ` Eric Sunshine
2016-05-10 20:41 ` Jeff King
2016-05-10 20:07 ` Junio C Hamano
2016-05-10 21:01 ` SZEDER Gábor
2016-05-10 21:11 ` Junio C Hamano
2016-05-10 21:19 ` Eric Sunshine
2016-05-10 5:20 ` [PATCH 6/6] t1500: be considerate to future potential tests Eric Sunshine
2016-05-10 6:07 ` [PATCH 0/6] modernize t1500 Junio C Hamano
2016-05-10 18:10 ` Junio C Hamano
2016-05-10 18:26 ` Junio C Hamano
2016-05-16 17:39 ` Eric Sunshine
2016-05-16 18:52 ` Junio C Hamano
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=xmqqy48imn2e.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=peff@peff$(echo .)net \
--cc=szeder@ira$(echo .)uka.de \
--cc=tboegi@web$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox