Skip to content
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

Rewrite ghstack head/base commit construction algorithm #200

Merged
merged 4 commits into from
Dec 8, 2023

Conversation

Signed-off-by: Edward Z. Yang <[email protected]>

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Dec 5, 2023
Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: c4aa536580ec65d2c5180647492d45a52c0eeb57
Pull Request resolved: #200
ezyang added a commit that referenced this pull request Dec 5, 2023
Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: 83f3f7e0641b45638d5aa74dcf7ffafb257a7172
Pull Request resolved: #200
ezyang added a commit that referenced this pull request Dec 5, 2023
Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: 82f19adf911174e95fe358163d2e4be9e964599e
Pull Request resolved: #200
if commit_count == 0:
raise RuntimeError(
"There appears to be no commits to process, based on the revs you passed me. "
f"I determined this by running `git rev-list {' '.join(revs)} ^{base_ref}`."
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong

ghstack.logs.record_status('{} "{}"'.format(stack[0].oid[:9], stack[0].title))
# TODO: figure this out. BC when revs is standard; maybe multiple calls
# for non standard rev patterns
# run_pre_ghstack_hook(sh, base, top.oid)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

if new_head := rebase_index.get(GitCommitHash(sh.git("rev-parse", "HEAD"))):
sh.git("reset", "--soft", new_head)
# TODO: print out commit hashes for things we rebased but not accessible
# from HEAD
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: test this case

Fixes #123
Fixes #101

Signed-off-by: Edward Z. Yang <[email protected]>

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Dec 6, 2023
Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: b8adce7587d5c0fb55a08b33dbfda7a2cf67855b
Pull Request resolved: #200
@ezyang ezyang merged commit 590db73 into gh/ezyang/6/base Dec 8, 2023
1 of 13 checks passed
ezyang added a commit that referenced this pull request Dec 8, 2023
Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: b8adce7587d5c0fb55a08b33dbfda7a2cf67855b
Pull Request resolved: #200
@ezyang ezyang deleted the gh/ezyang/6/head branch December 8, 2023 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant