From 331b094eec6d4c937af6e59df2a537112e4d8205 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sun, 16 Apr 2023 03:03:05 +0000 Subject: 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. 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 Signed-off-by: Junio C Hamano --- daemon.c | 1 + 1 file changed, 1 insertion(+) (limited to 'daemon.c') diff --git a/daemon.c b/daemon.c index db8a31a6ea..75c3c06457 100644 --- a/daemon.c +++ b/daemon.c @@ -4,6 +4,7 @@ #include "config.h" #include "environment.h" #include "pkt-line.h" +#include "protocol.h" #include "run-command.h" #include "setup.h" #include "strbuf.h" -- cgit v1.2.3