citation-style-language / schema

Citation Style Language schema
https://citationstyles.org/
MIT License
187 stars 60 forks source link

git: 1.1 conflicts, merge commits, message guidelines #429

Open bdarcus opened 1 year ago

bdarcus commented 1 year ago

I just wanted somewhere to record this, to note problems with the branches ATM:

merge conflicts

```console ~/Code/csl/schema v1.1 *1 ?8 ❯ git rebase master warning: skipped previously applied commit e9b5d6d warning: skipped previously applied commit 2952225 warning: skipped previously applied commit 240380c warning: skipped previously applied commit b2848a6 warning: skipped previously applied commit fe7ab31 warning: skipped previously applied commit 3e5995b warning: skipped previously applied commit d86905d warning: skipped previously applied commit a97e8ef warning: skipped previously applied commit 065a420 warning: skipped previously applied commit 6b39bcb warning: skipped previously applied commit 0f83ef0 warning: skipped previously applied commit c982ed4 warning: skipped previously applied commit bb22f12 warning: skipped previously applied commit 5284161 warning: skipped previously applied commit 26e222c warning: skipped previously applied commit 5e69fcd warning: skipped previously applied commit a2ba8f8 warning: skipped previously applied commit e3ecd00 hint: use --reapply-cherry-picks to include skipped commits hint: Disable this message with "git config advice.skippedCherryPicks false" Auto-merging schemas/styles/csl.rnc CONFLICT (content): Merge conflict in schemas/styles/csl.rnc error: could not apply e07ee48... Change "and" to allow "short", use term (#196) hint: Resolve all conflicts manually, mark them as resolved with hint: "git add/rm ", then run "git rebase --continue". hint: You can instead skip this commit: run "git rebase --skip". hint: To abort and get back to the state before "git rebase", run "git rebase --abort". Could not apply e07ee48... Change "and" to allow "short", use term (#196) ```

I can't really fix it ATM; not sure what happened.

The below may be a nuclear fix, but that's a difficult/tedious also, since it means:

  1. resolving all conflicts across all files (there are a lot of them)
  2. identifying which chunks go together logically
  3. figuring out the appropriate commit message to describe them (see below).

Basically, it involves completely reconstructing the commit history of that branch.

Admittedly, I'm no git expert, so if someone can manage to fix it, please send a PR!

❯ git merge --squash v1.1
Auto-merging schemas/input/csl-citation.json
CONFLICT (content): Merge conflict in schemas/input/csl-citation.json
Auto-merging schemas/input/csl-data.json
CONFLICT (content): Merge conflict in schemas/input/csl-data.json
Auto-merging schemas/styles/csl-choose.rnc
CONFLICT (content): Merge conflict in schemas/styles/csl-choose.rnc
Auto-merging schemas/styles/csl-terms.rnc
Auto-merging schemas/styles/csl-variables.rnc
Auto-merging schemas/styles/csl.rnc
CONFLICT (content): Merge conflict in schemas/styles/csl.rnc
Squash commit -- not updating HEAD
Automatic merge failed; fix conflicts and then commit the result.

git settings

Also, I have turned off "merge-branches" on this repo, so merging PRs will be via either rebasing or squash rebasing going forward. We may actually need to be able to do merge commits to resolve these conflicts?

commit message guidelines

I also think we should adopt conventional commit guidelines, so we can better manage changelogs, version, and such.

I've tried to do it sort of off and on, but not consistently. Let's change this; it's not hard.

We'll probably have to rewrite the history on 1.1 anyway, so can rewrite the commit messages as well.

Am not sure, but for "scopes", we might think about style vs input, and optional sub-scopes of things like "dates", "terms" etc.? Like maybe:

fix(style/terms)!: some breaking fix