Simplify deploy-tag push now that git 2.49 is the floor#6875
Simplify deploy-tag push now that git 2.49 is the floor#6875dannyroberts wants to merge 1 commit into
Conversation
Collapses the prior init-bare + fetch + push sequence in _push_release_tag into a single clone + push, taking advantage of git clone --revision (added in git 2.49). PR #6868 made 2.49 the floor on managed machines, so the version-compat workaround is no longer needed. Per #6865 (comment). https://dimagi.atlassian.net/browse/SAAS-19703
|
Local performance testing from Claude Code (I didn't validate it in great detail, but the approach it took seemed generally correct.) @millerdev it looks like the cleaner-looking command is actually a tad slower, like ~70 ms—so basically the same speed, but not faster. (I guess |
|
I'm not sure I believe the profiling results. It's possible that result was realistic for a very small sample size, but would expect them to be far closer (possibly ~the same) on a more reasonable sample size. Otherwise, I'd like to know what's taking more time. I had hoped this would be a nice code simplification (the primary win) and slightly more readable (line wrapping seems to have wiped that out). In any case, I am not strongly attached to this change. Feel free to do with it what you want. |
https://dimagi.atlassian.net/browse/SAAS-19703
Picks up @millerdev's original suggestion on #6865. Now that #6868 / SAAS-19703 has rolled out the new git 2.49 floor across managed machines, the version-compat workaround in
_push_release_tagcan go away.The previous
git init --bare+git fetch --depth=1 --filter=blob:none ... <sha>+git pushdance is replaced bygit clone --bare --filter=blob:none --depth=1 --revision=<sha>+ push.--revisionwas added in git 2.49.This is a code-clarity change, not a perf one. Bytes-on-the-wire, on-disk size, and network round-trip count are unchanged (both versions already used
--filter=blob:none --depth=1); wall time is within noise — see comment thread for numbers.Environments Affected
None.