git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael Weiser <michael.weiser@gmx.de>,
	git@vger.kernel.org,
	David Abdurachmanov <David.Abdurachmanov@cern.ch>
Subject: Re: [PATCH] Extend runtime prefix computation
Date: Mon, 18 Apr 2016 09:20:25 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1604180918500.2967@virtualbox> (raw)
In-Reply-To: <xmqqfuumddqm.fsf@gitster.mtv.corp.google.com>

Hi Junio,

On Fri, 15 Apr 2016, Junio C Hamano wrote:

> Michael Weiser <michael.weiser@gmx.de> writes:
> 
> > Make git fully relocatable at runtime extending the runtime prefix
> > calculation. Handle absolute and relative paths in argv0. Handle no path
> > at all in argv0 in a system-specific manner.  Replace assertions with
> > initialised variables and checks that lead to fallback to the static
> > prefix.
> 
> That's a dense description of "what" without saying much about
> "why".  Hint: start by describing what case(s) the current code
> fails to find the correct runtime prefix.  That would give readers a
> better understanding of what problem you are trying to solve.

I have to admit that I am really, *really* skeptical. To me, it looks like
this patch opens the door very wide to unintended consequences.

> >  #ifdef RUNTIME_PREFIX
> > -	assert(argv0_path);
> > -	assert(is_absolute_path(argv0_path));
> 
> Aren't these protecting against future and careless change that
> forgets to call extract-argv0-path or make that function return
> something that is not an absolute path?

This (first) assert() indeed saved me a couple of times from hunting for
bugs in the wrong place. Let's keep it.

Ciao,
Dscho

  reply	other threads:[~2016-04-18  7:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 14:30 [PATCH] Extend runtime prefix computation Michael Weiser
2016-04-15 16:43 ` Junio C Hamano
2016-04-18  7:20   ` Johannes Schindelin [this message]
2016-04-20 17:52   ` Michael Weiser
  -- strict thread matches above, loose matches on Subject: below --
2012-11-27 16:30 Michael Weiser
2012-11-30 10:20 ` Erik Faye-Lund
2012-11-30 10:45   ` Michael Weiser
2013-03-05 11:58 ` Michael Weiser
2013-03-05 16:13   ` Junio C Hamano
2013-03-06  8:19     ` Michael Weiser
2013-04-16 14:56       ` Michael Weiser
2013-04-16 18:23         ` Junio C Hamano
2013-04-16 15:18       ` Erik Faye-Lund
2013-04-17  6:06         ` Michael Weiser
2013-10-04 13:32           ` Michael Weiser

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=alpine.DEB.2.20.1604180918500.2967@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=David.Abdurachmanov@cern.ch \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=michael.weiser@gmx.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 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 NNTP newsgroup(s).