-
Notifications
You must be signed in to change notification settings - Fork 55
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
Conversation
Signed-off-by: Edward Z. Yang <[email protected]> [ghstack-poisoned]
Signed-off-by: Edward Z. Yang <[email protected]> ghstack-source-id: c4aa536580ec65d2c5180647492d45a52c0eeb57 Pull Request resolved: #200
Signed-off-by: Edward Z. Yang <[email protected]> [ghstack-poisoned]
Signed-off-by: Edward Z. Yang <[email protected]> ghstack-source-id: 83f3f7e0641b45638d5aa74dcf7ffafb257a7172 Pull Request resolved: #200
Signed-off-by: Edward Z. Yang <[email protected]> [ghstack-poisoned]
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}`." |
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.
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) |
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.
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 |
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.
TODO: test this case
Fixes #123 Fixes #101 Signed-off-by: Edward Z. Yang <[email protected]> [ghstack-poisoned]
Signed-off-by: Edward Z. Yang <[email protected]> ghstack-source-id: b8adce7587d5c0fb55a08b33dbfda7a2cf67855b Pull Request resolved: #200
Signed-off-by: Edward Z. Yang <[email protected]> ghstack-source-id: b8adce7587d5c0fb55a08b33dbfda7a2cf67855b Pull Request resolved: #200
Stack from ghstack (oldest at bottom):
Fixes #123
Fixes #101
Signed-off-by: Edward Z. Yang [email protected]