TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Pinned Pull Requests on GitHub

39 pointsby zacharyvoasealmost 13 years ago

6 comments

ajrossalmost 13 years ago
This is a metaphor bug in the UX. In git's original terminology a "pull request" (a request from a subsystem maintainer to pull new stuff -- usually from a branch named something like 3.5-staging-for-linus or whatever) is different from a "patch set" (a single submission of code from anyone, often via email with "PATCH n/m" subjects).<p>Github treats them essentially the same, which is just wrong. It's the patch set that is the unit of code review. It's just plain never correct to review a "branch", you review specific suggested changes in isolation. The idea of pulling branches is to merge already-reviewed code from different trees.
kwamenum86almost 13 years ago
This isn't really "pinning" a pull request. The problem is not that "GitHub Pull Requests are dynamic".<p>Any branch name is just an alias for the latest commit in that branch. For example master is just an alias for the latest commit in master so you can reference that commit without the SHA1 hash. When I submit a pull request for foo/master then push new commits for foo/master, I just changed what master points to so my pull request changes. By using the commit hash you avoid the commit alias problem because new commits won't change what a commit hash references.<p>In fact, virtually anywhere you use a branch name in git or github you can also use a commit hash.
评论 #4004931 未加载
评论 #4005019 未加载
ruxkoralmost 13 years ago
If I recall correctly, it is possible to modify a pull-request by deleting the "active" commit of the pull request on github and adding something else, i.e. if I do something like rebase -i and then a push -f (which I can, because, after all, it is my own repository I am pushing to.)
评论 #4004291 未加载
lucisferrealmost 13 years ago
Why wouldn't they just comment on the pull request to set a history point and review from there? This allows changes while still being able to see what may have changed and why. Honestly I can't see how slinging patches by email works better.
thecoffmanalmost 13 years ago
Any chance you have a post sharing your prompt string? It looks quite useful.
评论 #4004088 未加载
评论 #4004101 未加载
ortaalmost 13 years ago
I only found out that feature by accident, I agree that its a great way to ensure the code you're talking about is immutable in a pull request.