{"thread":{"id":"66360","subject":"Re: [PATCH] exec_cmd: RUNTIME_PREFIX on OpenBSD systems","startedAt":"2026-09-21T13:00:18Z","lastAt":"2026-09-22T01:18:15Z","messageCount":3,"participants":["Chris Torek","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"552926","messageId":"CAPx1Gvco17vf-rmQsqumLdX8Gcjnu0Qx=e7_PdFw0p7BDRLU7Q@mail.gmail.com","threadId":"66360","inReplyTo":"1789994808-30642-mlmmj-3f9f948b@vger.kernel.org","subject":"Re: [PATCH] exec_cmd: RUNTIME_PREFIX on OpenBSD systems","fromName":"Chris Torek","fromEmail":"chris.torek@gmail.com","sentAt":"2026-09-21T13:00:04Z","receivedAt":"2026-09-21T13:00:18Z","isPatch":true,"body":"[Ugh, somehow plain text mode got turned off, re-sending]\n\nOn Wed, Sep 16, 2026 at 8:41 PM Brad Smith <brad@comstyle.com> wrote:\n>\n> @@ -209,6 +229,10 @@ static int git_get_exec_path(struct strbuf *buf, const char *argv0)\n>          * after the first successful method.\n>          */\n>         if (\n> +#ifdef HAVE_GETEXECPATH\n> +               git_get_exec_path_getexecpath(buf) &&\n> +#endif /* HAVE_GETEXECPATH */\n> +\n>  #ifdef HAVE_BSD_KERN_PROC_SYSCTL\n>                 git_get_exec_path_bsd_sysctl(buf) &&\n>  #endif /* HAVE_BSD_KERN_PROC_SYSCTL */\n> --\n> 2.55.0\n\nSort of a minor nit, but given this code construct, there should probably be\ninstructions saying to define only one of these.\n\nChris\n"},{"id":"552938","messageId":"9d1ac51b-9969-49a1-a911-7669872d28c4@kdbg.org","threadId":"66360","inReplyTo":"CAPx1Gvco17vf-rmQsqumLdX8Gcjnu0Qx=e7_PdFw0p7BDRLU7Q@mail.gmail.com","subject":"Re: [PATCH] exec_cmd: RUNTIME_PREFIX on OpenBSD systems","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2026-09-21T16:43:02Z","receivedAt":"2026-09-21T16:43:05Z","isPatch":true,"body":"Am 21.09.26 um 15:00 schrieb Chris Torek:\n> [Ugh, somehow plain text mode got turned off, re-sending]\n> \n> On Wed, Sep 16, 2026 at 8:41 PM Brad Smith <brad@comstyle.com> wrote:\n>>\n>> @@ -209,6 +229,10 @@ static int git_get_exec_path(struct strbuf *buf, const char *argv0)\n>>          * after the first successful method.\n>>          */\n>>         if (\n>> +#ifdef HAVE_GETEXECPATH\n>> +               git_get_exec_path_getexecpath(buf) &&\n>> +#endif /* HAVE_GETEXECPATH */\n>> +\n>>  #ifdef HAVE_BSD_KERN_PROC_SYSCTL\n>>                 git_get_exec_path_bsd_sysctl(buf) &&\n>>  #endif /* HAVE_BSD_KERN_PROC_SYSCTL */\n>> --\n>> 2.55.0\n> \n> Sort of a minor nit, but given this code construct, there should probably be\n> instructions saying to define only one of these.\nThis caught me too. But notice that the calls are chained by && so that\nthe first successful call determines the outcome.\n\n-- Hannes\n\n"},{"id":"552965","messageId":"CAPx1GvfaSK-rUqKAPz37D5K3COJ9orXNKSkFtDmqVocuvfaNZw@mail.gmail.com","threadId":"66360","inReplyTo":"9d1ac51b-9969-49a1-a911-7669872d28c4@kdbg.org","subject":"Re: [PATCH] exec_cmd: RUNTIME_PREFIX on OpenBSD systems","fromName":"Chris Torek","fromEmail":"chris.torek@gmail.com","sentAt":"2026-09-22T01:17:59Z","receivedAt":"2026-09-22T01:18:15Z","isPatch":true,"body":"On Mon, Sep 21, 2026 at 9:43 AM Johannes Sixt <j6t@kdbg.org> wrote:\n[re the multiple get exec path call sequence]\n> This caught me too. But notice that the calls are chained by && so that\n> the first successful call determines the outcome.\n\nI noticed the &&'s but I somehow thought that successful\nreturn was nonzero instead of zero.\n\n(It didn't help when gmail went a little wonky on me,\neither, hence the accidental rejected HTML email)\n\nChris\n"}]}