subtree: clean up, improve UX
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest30 patches 14 repliesIn review
- v230 patches 3 repliesSuperseded
- v130 patches 34 repliesSuperseded
Changes in v3 from the cover letter
- Consistently put the do of a loop on its own line.
subtree: t7900: comment subtree_test_create_repo
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/30 | .gitignore: Ignore /git-subtree.gitignore | +1 | 0 replies | |
| 2/30 | subtree: t7900: update for having the default branch name be 'main'contrib/ | +59 | 2 replies | |
| 3/30 | subtree: t7900: use test-lib.sh's test_countcontrib/ | +300 | 2 replies | |
| 4/30 | subtree: t7900: use consistent formattingcontrib/ | +35 | 0 replies | |
| 5/30 | subtree: t7900: comment subtree_test_create_repocontrib/ | +8 | 2 replies | |
| 6/30 | subtree: t7900: use 'test' for string equalitycontrib/ | +24 | 2 replies | |
| 7/30 | subtree: t7900: delete some dead codecontrib/ | +1 | 0 replies | |
| 8/30 | subtree: t7900: fix 'verify one file change per commit'contrib/ | +6 | 0 replies | |
| 9/30 | subtree: t7900: rename last_commit_message to last_commit_subjectcontrib/ | +13 | 1 reply | |
| 10/30 | subtree: t7900: add a test for the -h flagcontrib/ | +7 | 4 replies | |
| 11/30 | subtree: t7900: add porcelain tests for 'pull' and 'push'contrib/ | +127 | 0 replies | |
| 12/30 | subtree: don't have loose code outside of a functioncontrib/ | +125 | 0 replies | |
| 13/30 | subtree: more consistent error propagationcontrib/ | +14 | 0 replies | |
| 14/30 | subtree: drop support for git < 1.7contrib/ | +4 | 0 replies | |
| 15/30 | subtree: use `git merge-base --is-ancestor`contrib/ | +1 | 0 replies | |
| 16/30 | subtree: use git-sh-setup's `say`contrib/ | +7 | 0 replies | |
| 17/30 | subtree: use more explicit variable names for cmdline argscontrib/ | +66 | 0 replies | |
| 18/30 | subtree: use "$*" instead of "$@" as appropriatecontrib/ | +3 | 0 replies | |
| 19/30 | subtree: don't fuss with PATHcontrib/ | +16 | 0 replies | |
| 20/30 | subtree: use "^{commit}" instead of "^0"contrib/ | +2 | 0 replies | |
| 21/30 | subtree: parse revs in individual cmd_ functionscontrib/ | +24 | 0 replies | |
| 22/30 | subtree: remove duplicate checkcontrib/ | +0 | 0 replies | |
| 23/30 | subtree: add comments and sanity checkscontrib/ | +61 | 0 replies | |
| 24/30 | subtree: don't let debug and progress output clashcontrib/ | +21 | 0 replies | |
| 25/30 | subtree: have $indent actually affect indentationcontrib/ | +24 | 0 replies | |
| 26/30 | subtree: give the docs a once-overcontrib/ contrib/ contrib/ | +87 | 0 replies | |
| 27/30 | subtree: allow --squash to be used with --rejoincontrib/ contrib/ contrib/ | +96 | 0 replies | |
| 28/30 | subtree: allow 'split' flags to be passed to 'push'contrib/ contrib/ contrib/ | +223 | 0 replies | |
| 29/30 | subtree: push: allow specifying a local rev other than HEADcontrib/ contrib/ contrib/ | +47 | 0 replies | |
| 30/30 | subtree: be stricter about validating flagscontrib/ contrib/ | +175 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 00/30] subtree: clean up, improve UX
From: Luke Shumaker <[email protected]>
The diff between v1 and v2 is largely stylistic. The only non-stylistic changes are fixing the tests to use test_must_fail instead of !, and re-thinking the commit about fussing with PATH.
The diff between v2 and v3 contains a few stylistic changes, but the meat of it is that it fixes a bug with --squash and --rejoin being used together, and that it fixes a mistake in the man page.
Ostensibly, this patch set is about improving various aspects of git subtree's user interface (and it is!), but it's also mostly about setting the foundation and being "batch 1" of a bunch more changes to subtree that I'm getting queued up. So please forgive the large amount of churn in the leading clean-up commits, 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). In the mean-time, I do think that the UX improvements in this patchset are already worth it themselves.
- The first 11 commits improve subtree's tests, largely around the code-quality of the tests, but a few of the commits do actually improve what's being tested.
- The middle 12 commits improve the code-quality of subtree's implementation.
- The final 7 commits improve various aspects of subtree's user experience, from readability of the debug output, to documentation, to option flag handling.
The very last commit is likely to be a little objectionable--it makes some option flag parsing more strict, so there will probably be worry that the change breaks existing users. However, it's being strict about arg combinations that were always invalid, the difference is that now it reports that to the users and bails. Those users were already broken, they just didn't know it. git subtree should tell them.
Luke Shumaker (30):
.gitignore: Ignore /git-subtree
subtree: t7900: update for having the default branch name be 'main'
subtree: t7900: use test-lib.sh's test_count
subtree: t7900: use consistent formatting
v2:
- Also normalize on test X instead of [ X ].
- Also normalize on >FILENAME with no spaces.
- Fix a few if statements with if and then on the same line that I missed in v1.
v3:
- Consistently put the do of a loop on its own line.
subtree: t7900: comment subtree_test_create_repo
v2:
- Also switch the few uses of vanilla test_create_repo over to subtree_test_create_repo. In v1 this was erroneously included in a different commit.
subtree: t7900: use 'test' for string equality
subtree: t7900: delete some dead code
subtree: t7900: fix 'verify one file change per commit'
v2:
- Fix whitespace.
subtree: t7900: rename last_commit_message to last_commit_subject
subtree: t7900: add a test for the -h flag
subtree: t7900: add porcelain tests for 'pull' and 'push'
v2:
- Don't switch unrelated uses of vanilla test_create_repo over to subtree_test_create_repo; this has been moved to happen in an earlier commit.
- Fix whitespace.
subtree: don't have loose code outside of a function
v2:
- Include rationale in the the commit message.
subtree: more consistent error propagation
subtree: drop support for git < 1.7
v2:
- Include rationale in the the commit message.
subtree: use git merge-base --is-ancestor
subtree: use git-sh-setup's say
subtree: use more explicit variable names for cmdline args
subtree: use "$*" instead of "$@" as appropriate
v2:
- Improve the commit message with quoting and clearer explanation.
subtree: don't fuss with PATH
v2:
- This commit changed entirely. In v1 it changed how git-subtree adjusts the PATH. In v2, it removes any fussing with the PATH, and in its place adds a pre-flight sanity check that it doesn't need to fuss with the PATH.
v3:
- Fix capitalization in the commit message.
subtree: use "^{commit}" instead of "^0"
subtree: parse revs in individual cmd_ functions
subtree: remove duplicate check
subtree: add comments and sanity checks
v2:
- Expand on the the commit message.
- Fix capitalization in one of the comments.
subtree: don't let debug and progress output clash
v2:
- Reword the commit message to be clearer.
- Add comments to the code.
- Flip the if and else cases around, so that the comments read better.
subtree: have $indent actually affect indentation
subtree: give the docs a once-over
v2:
- behaviour -> behavior
v3:
- Trim trailing whitespace.
- Fix the man page saying "--ignore-join" instead of "--ignore-joins".
subtree: allow --squash to be used with --rejoin
v2:
- In the added tests, use test_must_fail instead of !, as appropriate.
v3:
- Style: Put the then of an if/then on its own line.
- Fix a bug (and add a test) where the resulting commits confuse a subsequent git subtree merge --squash.
subtree: allow 'split' flags to be passed to 'push'
v2:
- In the added tests, use test_must_fail instead of !, as appropriate.
subtree: push: allow specifying a local rev other than HEAD
subtree: be stricter about validating flags
.gitignore | 1 + contrib/subtree/git-subtree.sh | 642 +++++++----- contrib/subtree/git-subtree.txt | 192 ++-- contrib/subtree/t/t7900-subtree.sh | 1450 ++++++++++++++++++---------- contrib/subtree/todo | 6 +- 5 files changed, 1425 insertions(+), 866 deletions(-)
Signature · 4 lines
2.31.1 Happy hacking, ~ Luke Shumaker