git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 00/30] subtree: clean up, improve UX

From
=?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason <avarab@gmail.com>
Date
Apr 26, 2021, 07:55 UTC
Message-ID
<875z091nuj.fsf@evledraar.gmail.com>
In-Reply-To
<87wnss2219.wl-lukeshu@lukeshu.com>
On Fri, Apr 23 2021, Luke Shumaker wrote:
Show 10 quoted lines
> On Fri, 23 Apr 2021 13:42:00 -0600,
> Luke Shumaker wrote:
>>                                                  I promise that
>> there's more work coming on top of it (we've discovered lots of ways
>> to break the "subtree split" algorithm, and come up with fixes for
>> most of them).
>
> Follow-up question: If in that work I changed the shebang from
> "#!/bin/sh" to "#!/usr/bin/env bash" and started using Bash arrays,
> would that be so bad?  Would that be land-able?

It's in contrib, so personally I don't care much. But e.g. on OSX that means targeting some ancient (and going away?) version of bash + having *BSDs needing to install bash for this etc.

Bash or not it seems to me like that argument parsing code could be much simplified by simply declaring strings of arguments accepted for each sub-command, and then parsing those arguments + dying on unknown ones.

Previous: Luke ShumakerNext: Junio C Hamano
Message 64 of 144 in “subtree: clean up, improve UX”
  1. 00/30 subtree: clean up, improve UXLuke Shumaker, Apr 23, 2021
  2. 01/30 .gitignore: Ignore /git-subtreeLuke Shumaker, Apr 23, 2021
  3. 02/30 subtree: t7900: update for having the default branch name be 'main'Luke Shumaker, Apr 23, 2021
  4. 04/30 subtree: t7900: use consistent formattingLuke Shumaker, Apr 23, 2021
  5. Eric SunshineApr 23, 2021
  6. Luke ShumakerApr 23, 2021
  7. Junio C HamanoApr 27, 2021
  8. Luke ShumakerApr 27, 2021
  9. Junio C HamanoApr 28, 2021
  10. 05/30 subtree: t7900: comment subtree_test_create_repoLuke Shumaker, Apr 23, 2021
  11. 03/30 subtree: t7900: use test-lib.sh's test_countLuke Shumaker, Apr 23, 2021
  12. 06/30 subtree: t7900: use 'test' for string equalityLuke Shumaker, Apr 23, 2021
  13. 07/30 subtree: t7900: delete some dead codeLuke Shumaker, Apr 23, 2021
  14. 08/30 subtree: t7900: fix 'verify one file change per commit'Luke Shumaker, Apr 23, 2021
  15. 09/30 subtree: t7900: rename last_commit_message to last_commit_subjectLuke Shumaker, Apr 23, 2021
  16. 10/30 subtree: t7900: add a test for the -h flagLuke Shumaker, Apr 23, 2021
  17. 11/30 subtree: t7900: add porcelain tests for 'pull' and 'push'Luke Shumaker, Apr 23, 2021
  18. Eric SunshineApr 23, 2021
  19. Luke ShumakerApr 23, 2021
  20. 12/30 subtree: don't have loose code outside of a functionLuke Shumaker, Apr 23, 2021
  21. Luke ShumakerApr 23, 2021
  22. Eric SunshineApr 23, 2021
  23. Luke ShumakerApr 23, 2021
  24. Eric SunshineApr 23, 2021
  25. Luke ShumakerApr 23, 2021
  26. 14/30 subtree: drop support for git < 1.7Luke Shumaker, Apr 23, 2021
  27. Luke ShumakerApr 23, 2021
  28. Eric SunshineApr 23, 2021
  29. Luke ShumakerApr 23, 2021
  30. Eric SunshineApr 23, 2021
  31. Luke ShumakerApr 24, 2021
  32. 13/30 subtree: more consistent error propagationLuke Shumaker, Apr 23, 2021
  33. 15/30 subtree: use `git merge-base --is-ancestor`Luke Shumaker, Apr 23, 2021
  34. 16/30 subtree: use git-sh-setup's `say`Luke Shumaker, Apr 23, 2021
  35. 17/30 subtree: use more explicit variable names for cmdline argsLuke Shumaker, Apr 23, 2021
  36. 18/30 subtree: use $* instead of $@ as appropriateLuke Shumaker, Apr 23, 2021
  37. Eric SunshineApr 23, 2021
  38. Luke ShumakerApr 23, 2021
  39. Eric SunshineApr 24, 2021
  40. 19/30 subtree: give `$(git --exec-path)` precedence over `$PATH`Luke Shumaker, Apr 23, 2021
  41. =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= BjarmasonApr 26, 2021
  42. 20/30 subtree: use "^{commit}" instead of "^0"Luke Shumaker, Apr 23, 2021
  43. Ævar Arnfjörð BjarmasonApr 26, 2021
  44. 21/30 subtree: parse revs in individual cmd_ functionsLuke Shumaker, Apr 23, 2021
  45. 22/30 subtree: remove duplicate checkLuke Shumaker, Apr 23, 2021
  46. 23/30 subtree: add comments and sanity checksLuke Shumaker, Apr 23, 2021
  47. Eric SunshineApr 23, 2021
  48. Luke ShumakerApr 23, 2021
  49. 24/30 subtree: don't let debug and progress output clashLuke Shumaker, Apr 23, 2021
  50. Eric SunshineApr 23, 2021
  51. Luke ShumakerApr 24, 2021
  52. Eric SunshineApr 24, 2021
  53. 25/30 subtree: have $indent actually affect indentationLuke Shumaker, Apr 23, 2021
  54. 26/30 subtree: give the docs a once-overLuke Shumaker, Apr 23, 2021
  55. 27/30 subtree: allow --squash to be used with --rejoinLuke Shumaker, Apr 23, 2021
  56. Eric SunshineApr 24, 2021
  57. Luke ShumakerApr 25, 2021
  58. 28/30 subtree: allow 'split' flags to be passed to 'push'Luke Shumaker, Apr 23, 2021
  59. 29/30 subtree: push: allow specifying a local rev other than HEADLuke Shumaker, Apr 23, 2021
  60. 30/30 subtree: be stricter about validating flagsLuke Shumaker, Apr 23, 2021
  61. Danny LinApr 25, 2021
  62. Luke ShumakerApr 26, 2021
  63. Luke ShumakerApr 23, 2021
  64. =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= BjarmasonApr 26, 2021
  65. Junio C HamanoApr 27, 2021
  66. 00/30 subtree: clean up, improve UXLuke Shumaker, Apr 26, 2021
  67. 01/30 .gitignore: Ignore /git-subtreeLuke Shumaker, Apr 26, 2021
  68. 02/30 subtree: t7900: update for having the default branch name be 'main'Luke Shumaker, Apr 26, 2021
  69. 04/30 subtree: t7900: use consistent formattingLuke Shumaker, Apr 26, 2021
  70. Luke ShumakerApr 26, 2021
  71. 03/30 subtree: t7900: use test-lib.sh's test_countLuke Shumaker, Apr 26, 2021
  72. 05/30 subtree: t7900: comment subtree_test_create_repoLuke Shumaker, Apr 26, 2021
  73. 06/30 subtree: t7900: use 'test' for string equalityLuke Shumaker, Apr 26, 2021
  74. 07/30 subtree: t7900: delete some dead codeLuke Shumaker, Apr 26, 2021
  75. 08/30 subtree: t7900: fix 'verify one file change per commit'Luke Shumaker, Apr 26, 2021
  76. 09/30 subtree: t7900: rename last_commit_message to last_commit_subjectLuke Shumaker, Apr 26, 2021
  77. 10/30 subtree: t7900: add a test for the -h flagLuke Shumaker, Apr 26, 2021
  78. 11/30 subtree: t7900: add porcelain tests for 'pull' and 'push'Luke Shumaker, Apr 26, 2021
  79. 12/30 subtree: don't have loose code outside of a functionLuke Shumaker, Apr 26, 2021
  80. 13/30 subtree: more consistent error propagationLuke Shumaker, Apr 26, 2021
  81. 16/30 subtree: use git-sh-setup's `say`Luke Shumaker, Apr 26, 2021
  82. 14/30 subtree: drop support for git < 1.7Luke Shumaker, Apr 26, 2021
  83. 17/30 subtree: use more explicit variable names for cmdline argsLuke Shumaker, Apr 26, 2021
  84. 15/30 subtree: use `git merge-base --is-ancestor`Luke Shumaker, Apr 26, 2021
  85. 18/30 subtree: use "$*" instead of "$@" as appropriateLuke Shumaker, Apr 26, 2021
  86. 20/30 subtree: use "^{commit}" instead of "^0"Luke Shumaker, Apr 26, 2021
  87. 21/30 subtree: parse revs in individual cmd_ functionsLuke Shumaker, Apr 26, 2021
  88. 19/30 subtree: Don't fuss with PATHLuke Shumaker, Apr 26, 2021
  89. Luke ShumakerApr 26, 2021
  90. 22/30 subtree: remove duplicate checkLuke Shumaker, Apr 26, 2021
  91. 28/30 subtree: allow 'split' flags to be passed to 'push'Luke Shumaker, Apr 26, 2021
  92. 24/30 subtree: don't let debug and progress output clashLuke Shumaker, Apr 26, 2021
  93. 23/30 subtree: add comments and sanity checksLuke Shumaker, Apr 26, 2021
  94. 30/30 subtree: be stricter about validating flagsLuke Shumaker, Apr 26, 2021
  95. 29/30 subtree: push: allow specifying a local rev other than HEADLuke Shumaker, Apr 26, 2021
  96. 25/30 subtree: have $indent actually affect indentationLuke Shumaker, Apr 26, 2021
  97. 27/30 subtree: allow --squash to be used with --rejoinLuke Shumaker, Apr 26, 2021
  98. Luke ShumakerApr 26, 2021
  99. 26/30 subtree: give the docs a once-overLuke Shumaker, Apr 26, 2021
  100. 00/30 subtree: clean up, improve UXLuke Shumaker, Apr 27, 2021
  101. 01/30 .gitignore: Ignore /git-subtreeLuke Shumaker, Apr 27, 2021
  102. 02/30 subtree: t7900: update for having the default branch name be 'main'Luke Shumaker, Apr 27, 2021
  103. Ævar Arnfjörð BjarmasonApr 30, 2021
  104. Luke ShumakerApr 30, 2021
  105. 03/30 subtree: t7900: use test-lib.sh's test_countLuke Shumaker, Apr 27, 2021
  106. Ævar Arnfjörð BjarmasonApr 30, 2021
  107. Luke ShumakerApr 30, 2021
  108. 04/30 subtree: t7900: use consistent formattingLuke Shumaker, Apr 27, 2021
  109. 05/30 subtree: t7900: comment subtree_test_create_repoLuke Shumaker, Apr 27, 2021
  110. Ævar Arnfjörð BjarmasonApr 30, 2021
  111. Luke ShumakerApr 30, 2021
  112. 06/30 subtree: t7900: use 'test' for string equalityLuke Shumaker, Apr 27, 2021
  113. Ævar Arnfjörð BjarmasonApr 30, 2021
  114. Luke ShumakerApr 30, 2021
  115. 07/30 subtree: t7900: delete some dead codeLuke Shumaker, Apr 27, 2021
  116. 08/30 subtree: t7900: fix 'verify one file change per commit'Luke Shumaker, Apr 27, 2021
  117. 09/30 subtree: t7900: rename last_commit_message to last_commit_subjectLuke Shumaker, Apr 27, 2021
  118. Ævar Arnfjörð BjarmasonApr 30, 2021
  119. 10/30 subtree: t7900: add a test for the -h flagLuke Shumaker, Apr 27, 2021
  120. Ævar Arnfjörð BjarmasonApr 30, 2021
  121. Luke ShumakerApr 30, 2021
  122. Bagas SanjayaApr 30, 2021
  123. Luke ShumakerApr 30, 2021
  124. 11/30 subtree: t7900: add porcelain tests for 'pull' and 'push'Luke Shumaker, Apr 27, 2021
  125. 12/30 subtree: don't have loose code outside of a functionLuke Shumaker, Apr 27, 2021
  126. 14/30 subtree: drop support for git < 1.7Luke Shumaker, Apr 27, 2021
  127. 13/30 subtree: more consistent error propagationLuke Shumaker, Apr 27, 2021
  128. 15/30 subtree: use `git merge-base --is-ancestor`Luke Shumaker, Apr 27, 2021
  129. 16/30 subtree: use git-sh-setup's `say`Luke Shumaker, Apr 27, 2021
  130. 17/30 subtree: use more explicit variable names for cmdline argsLuke Shumaker, Apr 27, 2021
  131. 18/30 subtree: use "$*" instead of "$@" as appropriateLuke Shumaker, Apr 27, 2021
  132. 19/30 subtree: don't fuss with PATHLuke Shumaker, Apr 27, 2021
  133. 20/30 subtree: use "^{commit}" instead of "^0"Luke Shumaker, Apr 27, 2021
  134. 21/30 subtree: parse revs in individual cmd_ functionsLuke Shumaker, Apr 27, 2021
  135. 22/30 subtree: remove duplicate checkLuke Shumaker, Apr 27, 2021
  136. 24/30 subtree: don't let debug and progress output clashLuke Shumaker, Apr 27, 2021
  137. 25/30 subtree: have $indent actually affect indentationLuke Shumaker, Apr 27, 2021
  138. 23/30 subtree: add comments and sanity checksLuke Shumaker, Apr 27, 2021
  139. 26/30 subtree: give the docs a once-overLuke Shumaker, Apr 27, 2021
  140. 28/30 subtree: allow 'split' flags to be passed to 'push'Luke Shumaker, Apr 27, 2021
  141. 29/30 subtree: push: allow specifying a local rev other than HEADLuke Shumaker, Apr 27, 2021
  142. 27/30 subtree: allow --squash to be used with --rejoinLuke Shumaker, Apr 27, 2021
  143. 30/30 subtree: be stricter about validating flagsLuke Shumaker, Apr 27, 2021
  144. Luke ShumakerApr 28, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.