-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support the use case of not using mergebase for --since #514
Comments
I'm affected by this too. Trying to migrate from a lerna monorepo where PR builds run based on the diff between HEAD and the base ref – which are fetched individually prior to the build step. If above code used something like |
A potential workaround is to fetch enough history so that diffing via a merge-base becomes possible. It looks like https://github.com/rmacklin/fetch-through-merge-base is attempting to achieve exactly that. It still is considered a kludge in my opinion, and support for an option to use |
Can you suggest how you'd like to specify |
Maybe there can be a flag like |
+1 on the issue. I had opened a discussion but seems is the same. #805 If we cannot fix it, at the very least we could improve the error message and documentation. Could someone explain what the advantage of "..." is over ".." in this case? |
|
Describe the feature you'd like to request
I am trying to integrate turborepo in my GitHub actions workflow.
I want to avoid checking out the entire history, so I tried to only check out two commits: the base commit and the merge commit of the pull request. Then I want to use
--since=[base-commit]
to only rebuild what has been affected by the request.However, this will result in a fatal error due to these lines:
turborepo/cli/internal/scm/git.go
Lines 74 to 84 in 23cb6c1
Example of failed run: https://github.com/SamChou19815/infra/pull/25
When using three dots, git will try to find the mergebase between the two commits, which usually does not exist when you only checkout two isolated commits. I would like to support the use case so I don't have to checkout the entire history just for an incremental build from turborepo.
Describe the solution you'd like
An option that runs
git diff --name-only fromCommit..HEAD
under the hood would be great.Describe alternatives you've considered
Use build cache instead?
The text was updated successfully, but these errors were encountered: