-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: "Commit & Push..." didn't work well, because it would not know the new commit hash to push. It would just use the head commit at modal creation time, which was wrong. I was back and forth about how to implement this. The trouble is that the commit we can look up the moment you click "commit & push..." can at best be the optimistic commit from the commit operation. But this will become a real commit shortly after opening the modal. In order for this not to disappear, we need to be able to use a reference that is maintained while the modal is open. I settled on passing a CommitInfo for the top of the stack, and looking up the stack in the Modal. This way, the stack can update if the underlying graph updates. Typically, this shouldn't change while the modal is open. But if it does, we should update the UI to show what clicking "push" would actually do—which is to act on the head commit. Reviewed By: quark-zju Differential Revision: D62669564 fbshipit-source-id: ef4ed11e9ba6bedd1ec8c160e02fcc4af6941191
- Loading branch information
1 parent
875fa78
commit fb0f33f
Showing
3 changed files
with
46 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters