GitHub commits that aren't on any branch

I noticed today that there are some commits that get pushed upstream,
but not to master or any other branch either.

For example:

https://github.com/llvm/llvm-project/commit/d272d3a1885a82d6ccf5b3d5b6841f79d81e24e5
https://github.com/llvm/llvm-project/commit/6762d53b66d9de18825f09f43c3d6c2b3ea95913
https://github.com/llvm/llvm-project/commit/80f81325b8e8f0bed81a28dffb8eba526002f2b3
https://github.com/llvm/llvm-project/commit/24b81434a056825f4e9dd3ef06bad7a2ef34f813
https://github.com/llvm/llvm-project/commit/3191fa21be09d6e7352751f86626a2e8fb251555

This is confusing for everyone, because the Phabricator review gets
closed with "this was committed" and the commit can be found on
GitHub, but since it's not on any branch, it was really just pushed
into the void.

The reason I noticed is that the commit emails for those get sent to
the llvm-branch-commits list.

Is it possible to configure GitHub in some way that disallows pushing
commits that don't go to any of the upstream branches?

Thanks,
Hans

I noticed today that there are some commits that get pushed upstream,
but not to master or any other branch either.

For example:

https://github.com/llvm/llvm-project/commit/d272d3a1885a82d6ccf5b3d5b6841f79d81e24e5
https://github.com/llvm/llvm-project/commit/6762d53b66d9de18825f09f43c3d6c2b3ea95913
https://github.com/llvm/llvm-project/commit/80f81325b8e8f0bed81a28dffb8eba526002f2b3
https://github.com/llvm/llvm-project/commit/24b81434a056825f4e9dd3ef06bad7a2ef34f813
https://github.com/llvm/llvm-project/commit/3191fa21be09d6e7352751f86626a2e8fb251555

This is confusing for everyone, because the Phabricator review gets
closed with "this was committed" and the commit can be found on
GitHub, but since it's not on any branch, it was really just pushed
into the void.

The reason I noticed is that the commit emails for those get sent to
the llvm-branch-commits list.

Is it possible to configure GitHub in some way that disallows pushing
commits that don't go to any of the upstream branches?

No, we can't do anything to prevent this. If it's possible to
configure Phabricator to ignore these commits, then I think that's
the best solution for now.

-Tom

It is a phabricator bug (or, phabricator configuration bug) that it’s tracking these.

I haven’t looked, but I bet they’re on a github pull request branch – which is a real branch, but not in refs/heads or refs/tags, and therefore not fetched by default by git.

It is a phabricator bug (or, phabricator configuration bug) that it's tracking these.

I haven't looked, but I bet they're on a github pull request branch -- which is a real branch, but not in refs/heads or refs/tags, and therefore not fetched by default by git.

I think these specific commits came from someone accidentally pushing a branch:

http://lists.llvm.org/pipermail/all-commits/Week-of-Mon-20200113/005790.html

-Tom

Note that GitHub uses a common storage repo for the whole network of
project forks:

So if I push a branch to my own fork, my object hashes would also be
accessible through llvm/llvm-project. My action shouldn't trigger your
project hooks though.

Those commits also get sent to the llvm-branch-commits list. That
would be fine if the emails contained some hint about what branch the
commit went to, but they don't. I think that would be my main feature
request :slight_smile: