From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Joey Hess <id@joeyh.name>, Git Mailing List <git@vger.kernel.org>
Subject: Re: use of PWD
Date: Sat, 11 Nov 2017 11:13:21 +0900 [thread overview]
Message-ID: <xmqqd14pef5q.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20171108075336.is4awgyw53dohf7y@sigill.intra.peff.net> (Jeff King's message of "Wed, 8 Nov 2017 02:53:36 -0500")
Jeff King <peff@peff.net> writes:
> So totally orthogonal to your bug, I wonder if we ought to be doing:
>
> diff --git a/sha1_file.c b/sha1_file.c
> index 057262d46e..0b76233aa7 100644
> --- a/sha1_file.c
> +++ b/sha1_file.c
> @@ -530,11 +530,11 @@ void prepare_alt_odb(void)
> if (alt_odb_tail)
> return;
>
> - alt = getenv(ALTERNATE_DB_ENVIRONMENT);
> - if (!alt) alt = "";
> -
> alt_odb_tail = &alt_odb_list;
> - link_alt_odb_entries(alt, strlen(alt), PATH_SEP, NULL, 0);
> +
> + alt = getenv(ALTERNATE_DB_ENVIRONMENT);
> + if (alt)
> + link_alt_odb_entries(alt, strlen(alt), PATH_SEP, NULL, 0);
>
> read_info_alternates(get_object_directory(), 0);
> }
>
> to avoid hitting link_alt_odb_entries() at all when there are no
> entries.
Sounds sane.
next prev parent reply other threads:[~2017-11-11 2:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 19:22 use of PWD Joey Hess
2017-11-08 7:53 ` Jeff King
2017-11-11 2:13 ` Junio C Hamano [this message]
2017-11-12 10:27 ` [PATCH] link_alt_odb_entries: make empty input a noop Jeff King
2017-11-13 17:11 ` Joey Hess
2017-11-14 2:07 ` 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqd14pef5q.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=id@joeyh.name \
--cc=peff@peff.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).