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

Landing all (appended) commits in PRs #48

Closed
yang opened this issue Mar 3, 2021 · 6 comments
Closed

Landing all (appended) commits in PRs #48

yang opened this issue Mar 3, 2021 · 6 comments
Labels

Comments

@yang
Copy link

yang commented Mar 3, 2021

If a reviewer appends commits to PRs (say, via the Github UI), is there a way to have ghstack land (and ghstack checkout) to not drop these? Thanks!

@ezyang
Copy link
Owner

ezyang commented Mar 3, 2021

It wouldn't be hard to add a sanity check for ghstack land to detect if this situation occurred and bailed out. A little more difficult is to actually incorporate these back into the orig commit, but it also seems doable; just take the tree from head and zonk it back into orig. Need a little coding to do it.

@yang
Copy link
Author

yang commented Mar 3, 2021

Yeah, I wasn't familiar enough with the overarching design to understand why it merges /orig rather than /head, but it sounds like it's possible to just merge /head instead? (Would potentially need to stop along the way to resolve any conflicts introduced with later PRs).

@ezyang
Copy link
Owner

ezyang commented Mar 3, 2021

It merges orig because it's easier to do, no other good reason :)

@yang
Copy link
Author

yang commented Mar 4, 2021

Out of curiosity, what's the reason for amending the commit messages to indicate 'poisoned'? I was initially hoping for a solution like the following in land.py, but it would merge the poisoned commit messages.

-sh.git("cherry-pick", remote_name + "/" + orig_ref)
+sh.git("cherry-pick", remote_name + "/" + base_ref, remote_name + "/" + head_ref)

@ezyang
Copy link
Owner

ezyang commented Mar 4, 2021

It's because sometimes people checkout the head branch, and then try to run ghstack (which is super bad, it'll create a new PR per amend, without poisoning)

@ezyang ezyang added the papercut label Dec 2, 2023
@ezyang
Copy link
Owner

ezyang commented Dec 3, 2023

Duping this as #169

@ezyang ezyang closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants