commit 2ae2891d0e4f8e66706be6eb6394c199f18b7691 from: Stefan Sperling date: Sat Aug 28 10:23:24 2021 UTC remove github capabilities workaround from got-send-pack, it is not needed This workaround was inherited from git9, which claims that Github did not send capabilities. Protocol traces show that Github's server does in fact advertise its capabilities. Git protocol capabilities are hidden behind a NUL byte in the middle of the first refline sent by the server. This makes them easy to miss when treating a refline as a C string. I guess this is why Ori concluded that Github didn't send any capabilities. Or perhaps Github has been fixed since. commit - 26ac815fc44811dc1fa663baa02c1a65836dd649 commit + 2ae2891d0e4f8e66706be6eb6394c199f18b7691 blob - d114153710d8ca1d1fa45597373406f7d5fbe3fd blob + 70cdbda2df02489a97ea03b27cca01f0e4d3fb10 --- libexec/got-send-pack/got-send-pack.c +++ libexec/got-send-pack/got-send-pack.c @@ -369,27 +369,6 @@ match_capabilities(char **my_capabilities, char *serve goto done; } } - - /* - * Workaround for github. - * - * Github will accept the pack but fail to update the references - * if we don't have capabilities advertised. Report-status seems - * harmless to add, so we add it. - * - * Github doesn't advertise any capabilities, so we can't check - * for compatibility. We just need to add it blindly. - */ - if (strstr(*my_capabilities, GOT_CAPA_REPORT_STATUS) == NULL) { - char *s; - if (asprintf(&s, "%s %s", *my_capabilities, - GOT_CAPA_REPORT_STATUS) == -1) { - err = got_error_from_errno("asprintf"); - goto done; - } - free(*my_capabilities); - *my_capabilities = s; - } done: if (err) { free(*my_capabilities);