-
Notifications
You must be signed in to change notification settings - Fork 346
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
git sync: Get branch heads and fetch from remote #4909
Conversation
d28206b
to
aa853cb
Compare
4e46350
to
eba2a6e
Compare
aa853cb
to
50e1938
Compare
eba2a6e
to
371b264
Compare
fa04074
to
2859669
Compare
I'm not sure if I should add unit tests tests for these or just add integration tests for |
327d43d
to
c3da8e8
Compare
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.
I'm not sure what we're going to achieve, but my gut feeling is that this and the subsequent PRs duplicate git::import_refs()
? I would instead try to extend git:import_refs()
to return information needed to rebase commits.
And the core "git sync" function might be implemented in lib/src/git.rs.
## Summary * [X] Get branch pre-fetch heads * [ ] Build candidates from prefetch heads * [X] Fetch from remotes * [X] Get branch post-fetch heads * [ ] Rebase ## Details * For branch heads, we grab local branches matching the pattern specified in args. * Pre-fetch heads query tx.base_repo() while post-fetch heads query tx.repo(); tx.repo() is the in memory Mutable repo which is updated after a fetch in a transaction. * We fetch from all branches from all configured remotes. --all_remotes affects if we use `git.fetch` or all repo remotes. Issue: #1039
a7661c9
to
6c900a1
Compare
c3da8e8
to
29cd10a
Compare
Thanks for the suggestion. Based on this and comments from @martinvonz, I've gone to actually read Abandoning this PR now and will send a new one that changes |
Summary
Details
specified in args.
query tx.repo(); tx.repo() is the in memory Mutable repo which
is updated after a fetch in a transaction.
--all_remotes affects if we use
git.fetch
or all repo remotes.Issue: #1039