-
Notifications
You must be signed in to change notification settings - Fork 128
Add an --exec
option
#58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, that would be very nice. Do you already have some code that you are willing to share with us? The obvious place to wire in a test would be in But I think that building and/or running tests will make the test merges so expensive that other inefficiencies will become very annoying (as for example you observed in issue #59). For example, presumably the build/test would be run during the test merges (e.g., the ones made during bisection), and then when autofilling the same merges are done (albeit from different parents). But, as long as the tree SHA-1s match, there is no reason to run the same build/tests again. For example, one could keep a record of trees that have tested OK, and if the same tree reappears, just assume that it is still OK. |
The patch I'm currently using is here. I opted to only run I don't think I understand enough about autofilling to understand your comment on trees; I agree that if the same tree appears then there should not be a need to run the script again. |
Thanks for sharing the patch.
Interesting; that was one of the things that I was wondering about. And if you are only running the build when performing test merges, then probably the same tree is not being tested multiple times (simply because trees shouldn't be seen more than once when testing). I don't expect to have time to work on this soon, so if somebody else is interested, by all means step up. Aside from @johnkeeping's patch (or something like it), I guess we would need a new option for the user to use to specify to the test command. The test command should probably be stored as a string to the git config and executed using the shell. And we might want to handle test command failures different than merge conflicts; perhaps there should be two separate exceptions, both derived from |
Are you suggesting the command is configured with |
Yes, I think the command should be stored using It would be wrong to store the command choice in the git repository in the imerge state blob, because (especially when we better support collaborations on imerges) it should not be possible for one user to cause another user to execute an arbitrary command (security risk). And it could very well be that different users want to run different commands for testing, or that their differing local environments require the commands to be run differently. But we can nevertheless store it in a part of the configuration specific to a particular imerge:
We might also offer a default setting that is used if there is no setting for a particular imerge (because, realistically, the command will probably be the same for different imerge runs within the same repository):
If imerge were the only program involved, I'd stop there. But I've had a few ideas about how various commands could use tests. For example,
Maybe there should even be a new command, |
While git-imerge is great for identifying where textual conflicts are introduced, I would also like to be able to detect where logical conflicts are introduced.
At the moment this can be accomplished using the
--manual
mode and wrapping a script aroundmake && git imerge continue
, but it would be nice if git-imerge could be automated in the same way as git-bisect in order to check the consistency of the result even when no textual conflict has been found.The text was updated successfully, but these errors were encountered: