On Wed, Nov 11 2020, Jeff King wrote: > On Wed, Nov 11, 2020 at 04:17:49PM +0100, Ævar Arnfjörð Bjarmason wrote: > >> I started poking at removing .git/branches from the default template, >> which I had a patch for until I noticed Johannes's old[1] series. >> >> In any case, this is one thing that came out of that >> investigation. The code we're keeping by moving it to git-submodule.sh >> can also be replaced by some C code we have, but I wanted to leave >> that to another submission (if I'll get to it), and make this simply a >> code removal. > > I'm happy to see unused code go away in general, but this raises a > question: what promises have we made to end-user scripts about this > library being available? > > We do install it, including a manpage which claims you can do: > > . "$(git --exec-path)/git-parse-remote" > > though it does not actually document any particular functions being > available. It looks like we've removed functions before without warning > (e.g., 1a92777504 (git-request-pull: open-code the only invocation of > get_remote_url, 2011-03-01)). > > I'm just wondering if we need to have any kind of warning or deprecation > period. > > To be clear, I find it pretty unlikely that anybody is using the rather > esoteric functions in this file, but that's usually when I get most > surprised. :) I think it's fine to just remove it, I'll note that in a v2 commit message. I.e. the convention at the time was just to create these *.sh libraries as documented, but I don't think anyone used them outside of git.git. If they did maybe we should move them to contrib and ... create the same bitrot as with the *.sh builtins :) So I think it's better just to "git rm" it, if it breaks things for anyone they can just get the last version and maintain it themselves. >> .gitignore | 1 - >> Documentation/git-parse-remote.txt | 23 ------- >> Makefile | 2 - >> command-list.txt | 1 - >> git-parse-remote.sh | 98 ------------------------------ >> git-submodule.sh | 8 ++- >> 6 files changed, 7 insertions(+), 126 deletions(-) >> delete mode 100644 Documentation/git-parse-remote.txt > > I expected to see a "delete" line for git-parse-remote.sh here. I > thought at first maybe you were leaving the empty shell so that people > could continue to source it (keeping the promise in the manpage, but not > providing any actual functions). But it looks like the final patch stops > building it at all, leaving the now-useless source file. That was just a mistake on my part, I meant to "git rm" it but forgot. Will fix it v2.