Re: [PATCH/RFD] fix connection via git protocol
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Apr 18, 2023, 21:24 UTC
- Message-ID
- <CAPig+cTTTNO9e3X5u8irHjGHmY5t3GA1_zrvYmfhETn312XJcQ@mail.gmail.com>
- In-Reply-To
- <xmqqwn28c3dh.fsf@gitster.g>
On Tue, Apr 18, 2023 at 5:06 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> From: Elijah Newren <newren@gmail.com> > Subject: [PATCH] protocol.h: move definition of DEFAULT_GIT_PORT from cache.h > > Michael J Gruber noticed that connection via the git:// protocol no > longer worked after a recent header clean-up.
A link to Michael's email might be useful for future readers of this commit message.
Michale J Gruber noticed[1] that connection...
[1]: https://lore.kernel.org/git/5d4e0ce10f537b4bb795a70dd51db12ecaf0206d.1681556597.git.git@grubix.eu/
Show 18 quoted lines
> This was caused by > funny interaction of few gotchas. First, a necessary definition > > #define DEFAULT_GIT_PORT 9418 > > was made invisible to a place where > > const char *port = STR(DEFAULT_GIT_PORT); > > was expecting to turn the integer into "9418" with a clever STR() > macro, and ended up stringifying it to > > const char *port = "DEFAULT_GIT_PORT"; > > without giving any chance to compilers to notice such a mistake. > > Signed-off-by: Elijah Newren <newren@gmail.com> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
Perhaps an additional tailer would be appropriate?
Reported-by: Michael J Gruber <git@grubix.eu>