-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
enable using worktrees #829
Conversation
lvlrt
commented
Sep 27, 2021
- Enables using act in a worktree of Git (needs to follow the .git file directions)
Codecov Report
@@ Coverage Diff @@
## master #829 +/- ##
==========================================
+ Coverage 49.27% 59.02% +9.75%
==========================================
Files 23 25 +2
Lines 2401 4288 +1887
==========================================
+ Hits 1183 2531 +1348
- Misses 1090 1569 +479
- Partials 128 188 +60
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
@lvlrt this pull request has failed checks 🛠 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ // nolint:gocyclo
func findGitDirectory(fromFile string) (string, error) {
This comment has been minimized.
This comment has been minimized.
Is it possible to have a git worktree on GitHub or some easy instructions to test the change? @lvlrt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, it looks good to me but I never used git worktree nor know how they work
Absolutely, Tldr;
Let me know if this clarifies the change |
I'm asking this since it would be great if it's possible to add a testcase |
PR is stale and will be closed in 14 days unless there is new activity |
this doesn't seem to work for me
|
@lvlrt This doesn't work as expected, since act is not working with bare repositories right now. Act expects the |
Support for a bare clone should probably be something different from support for worktrees. You can use worktrees without a bare clone too.
|
But it will still not work with the current implementation, as act is working on the root working copy. |
Just in case, really looking for this to be implemented. If you need some help with worktrees/testing, please just let me know. |
@grigorye as stated above, it doesn't currently work and original PR author is not responding. |
@catthehacker Thanks for letting me know – I'll try to take a look. I have basically zero Go knowledge, though. Btw, I can highly recommend taking a look at Git worktrees - if you like act, I guess you'll like worktrees as well: act makes GHA iteration cheaper/faster, worktrees make Git cloning/branching cheaper/faster/more effective as well. (And, just to mention it, it's now a standard Git feature, so it's supported by every valid Git client "out-of-box"). |
to be completely honest, I don't use it 😳
I'll figure it out someday when I'll have time 😉 and look at implementing it in act |
Just in case, at quick glance, this PR works fine in my case (I really appreciate it, @lvlrt). I don't use bare clones though, rather just add worktrees to a "normal clone". This is probably in sync with the note from @jasonk. Ah, never mind - I used Will investigate it further. |
@KnisterPeter Can you please explain/elaborate on this a bit? Git worktree does not change the root of working copy. It just changes the real location of .git data. And the latter seems to be reflected in this very PR? |
Hi everyone, I had a look at the PR, ran a couple of scenarios with bare clone -> worktree and regular clone -> worktree. Any new on how I can give it chance to solve it opening some PR and mention @lvlrt as contributor too (as I will use most of his code in my fix ) ? 🤔 I though I can cherry-pick his/her commits may be ? Thank you. |