Closed LMaxence closed 2 years ago
Great @LMaxence !
How it will behave in case of force-push
-- what will be considered as list of changes?
Great @LMaxence ! How it will behave in case of
force-push
-- what will be considered as list of changes?
Hmm the way Mookme is conceived, the files list used to choose the steps to run is independent from the way the git command is involved. Ie, as long as you run a command that will trigger the pre-push
pre-commit hook, it will run and use the git rev-list @{push}..
command to list the commits that are in your branch and not in staging.
Regarding the very case of push force, where (I suppose) you would have commits in the remote that are not in your local, and commit in your local that are not in the remote, the commits that are used to build the files list would be the commits that are not in the remote.
I need to make sure it is the case, but my first guess would be that the commits in the remote, but not in the local repository are simply ignored :)
Hey @LMaxence Maybe you have published version from this branch? I can help with tests
I just released mookme@2.2.0-beta.5
containing this change :)
Cool, I'll test soon and leave feedback/ thanks!
Hey @LMaxence!
Unfortunately, I can only say that nothing has changed. Tested mookme@2.2.0-beta.5
Description
This mr brings basic support for the
pre-push
strategy. The list of files to use to select hooks to run is computed with the commandgit rev-list @{push}..
which returns a list of commits. This list is then used to retrieve the list of changed files.Caveats
The command will surely fail when there are no remote origins. That's why I added a
try/catch
statement. I'll try to come up with something less flaky.This should close https://github.com/Escape-Technologies/mookme/issues/81