-
Notifications
You must be signed in to change notification settings - Fork 94
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
github-merge: context not isolated #49
Comments
When it throws you into a shell there is code to guard against this ("ERROR: Tree hash changed unexpectedly"), but right, not when it's waiting for Could add a further check that the A worktree wouldn't fully avoid this either. It's possible to switch branches in a worktree. But maybe having a new (temporary) worktree makes it less likely for conflicts like this to arise? Could have this as an option. |
Yep, I was more thinking of accidents -- if there's a malicious second process you're lost.
Right, this was the idea. Of course you could modify this temporary worktree in another shell but then you probably know what you're doing. |
If you're going to implement this, I can think of some complications:
|
Maybe a warning that no git "write-actions" are allowed while the script is running (only git "read-actions" like |
You could add a warning to the "documentation" I guess. But I think everyone within the very small circle of users of this tool is aware they shouldn't interfere with it in that way 😄 Still, mistakes happen, I think adding a check that it's signing (and pushing) the correct commit probably can't hurt. |
I just run into opentimestamps/opentimestamps-client#87, so a worktree is not a good idea here. |
One potential pitfall of github-merge is that works in your normal worktree. That is, you can switch branches, change things, etc, between two git commands issued by the script, in particular when it waits for user input. For example, if you switch to a different branch and then type
s
, you sign the wrong commit. (I haven't tested it but this is what I assume from reading the code.)Could git worktrees help here?
https://git-scm.com/docs/git-worktree
The text was updated successfully, but these errors were encountered: