On Tue, Apr 18, 2023 at 5:06 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > From: Elijah Newren <newren@xxxxxxxxx> > 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@xxxxxxxxx/ > 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@xxxxxxxxx> > Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> Perhaps an additional tailer would be appropriate? Reported-by: Michael J Gruber <git@xxxxxxxxx>