Comments (6)
This may be done by a CI job that check PRs for merging conditions, and then creates a commit that includes the PR plus an increment to the version number and closes the PR in the commit message, like how it's currently done. It'll need to take the remaining part of the commit message from somewhere, which can be a comment in the PR.
from vim.
We can hook events of PR merged by GitHub Actions.
from vim.
So I am looking for ways how to automate incrementing the patch number.
maybe just change to another kind of number, since we do need 'patch number' e.g for has('patch-xxx')
check.
// it sounds like the problem what was done in p4 in the past? if i recalled correctly, or some others one, sounds similar.
from vim.
We all appreciate your hard work, Christian.
What if there were another permanent Git branch beside
master
? And with it, some reviewing and merging effort be
delegated to another volunteering, seasoned member(s).
The runtime
commits are not tagged: colors, documentation,
filetype, indent, keymap, syntax, translation. And there
should be very little merge conflicts with this hypothetical
branch(es) and C-tagged commits of master
. Then, whoever
is at the helm of master
can take in (fast-forward?) already
vetted and approved runtime
commits.
from vim.
git describe
is usually the go-to method for projects to give a ref a human readable name. It can be adjusted to only give the number of commits since last tagged commit, which can be used to construct an equivalent patch number similar to the one currently used.
Using this method would allow merging pull requests normally without manual fiddling and also avoid introducing additional maintenance overhead or complicated CI automation.
A slight drawback of this is that tarball releases won't be able to calculate the patch number as the git history isn't there. This is in my opinion a small problem, but mentioning it for completeness sake.
from vim.
Now that runtime
commits also come with patch number bumps, I suggest a workflow like the following:
- Provide a script in the source that automatically increments the patch number (my attempt later). This makes it easy for any maintainer to increment the patch number.
- Put this script in
hooks/pre-commit
and instruct maintainers togit config core.hooksPath hooks
. This makes it so maintainer commits automatically include the patch bump. (In theory contributed patches could use this, too, but they probably should not, since that may induce more hassle for multiple maintainers pushing.) Note that usingcommit --no-verify
will skip the pre-commit hook, in which case the script may need to be executed manually (but if you've already bumped the version, this is how you would skip bumping it again). - Maintainers that plan to push patches should coordinate "stewardship" of PRs and patches on the mailing list, so that ultimately a single maintainer pushes the corresponding patch (if the push is rejected,
git pull --rebase
and, for conflicts with the patch, something likegit checkout --ours src/version.c && hooks/pre-commit && git rebase --continue
will work as long as the conflict is only the patch number). For PRs, I suggest "assigning" the PR in GitHub. - All this should be documented somewhere.
Alternatively, a "seen" branch that maintainers could push patches without patch numbers to mark them as ready would be good; then a script to cherry-pick those commits with appropriate new patch numbers and any commit message tweaks could be used to migrate such patches to the master branch.
Here's my attempt to bump patch numbers; the only reliance on bash is for process substitution and heredocs. The vim commands could be put in a file and the script changed to be POSIX sh compatible. If there any problems, the script exits with an error (stopping the commit in the case of a pre-commit hook).
#! /bin/bash
cd "$(git rev-parse --show-toplevel)" || exit 1
vim -Nu NONE -S <(cat <<'EOF'
try
autocmd SwapExists * let v:swapchoice = 'q'
edit src/version.c
/included_patches/,/\d\+,/
let patch = getline('.')->matchstr('\d\+')->str2nr()
let leading = getline('.')->matchstr('^\s*')
-2put =['/**/', $'{leading}{patch+1},']
wq
catch
cquit
endtry
EOF
)
git add src/version.c
from vim.
Related Issues (20)
- `find_module` is deleted in python3.13 HOT 1
- A minor correction to the docs HOT 1
- Why and How to Solve Vim and Gvim Not Listening Content of Specific Folders on Windows 11 HOT 1
- Make command-line execute vim9script without typing vim9cmd HOT 33
- Unify/simplify the config file search across OS versions. ALT: Allow all versions to honor XDG_CONFIG_HOME if set
- Remove/modify filetype indent for asm files HOT 4
- Add commentstring for dart filetypes HOT 2
- select breaks syntax highlighting in bash HOT 7
- [vim9]Memory Leak when assigning a lambda function decorated in a HigherOrder function to a variable
- Escaped `,` and `:` in patterns in `b:match_words` is not correctly unescaped
- listchars: trailmultispace to easily identify the number of trailing spaces HOT 6
- Msys vim's executable() can't find programs despite them being add in the PATH HOT 10
- Minor syntax highlighting issue with swayconfig files HOT 3
- no help for comment.txt for the newly introduced comment.vim plugin HOT 3
- search() vs ignorecase vs smartcase HOT 4
- A correction to the docs HOT 2
- New compiler warnings in 9.1.444 HOT 1
- HighlightedYank feature HOT 10
- No indentation of HTML tags in PHP files HOT 2
- Update defaults.vim HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim.