Live data from Hacker News

Git-blame-someone-else – Blame someone else for your bad code

github.com

11–20 of 68 posts

Re: Git-blame-someone-else – Blame someone else for your bad code

#11
post #9

And this is why I pgp sign all my commits. :-P

It's a bit worrying that GitHub will happily associate someone's face on a commit that they didn't write: https://github.com/jayphelps/git-blame-someone-else/commit/e... Perhaps GitHub should only do this for signed commits or commits to the author's own repository or something. GitHub also allows you to add anyone to a project without their consent (or has this changed?). This reminds me of the Facebook prank where…

Worrying and potentially libelous. Some countries (e.g. UK) have strict libel law, and by using this you could get Github in trouble for publishing libelous material.

Of course, this has always been possible with git.

Re: Git-blame-someone-else – Blame someone else for your bad code

#12
post #9

Earlier quoted context omitted.

It's a bit worrying that GitHub will happily associate someone's face on a commit that they didn't write: https://github.com/jayphelps/git-blame-someone-else/commit/e... Perhaps GitHub should only do this for signed commits or commits to the author's own repository or something. GitHub also allows you to add anyone to a project without their consent (or has this changed?). This reminds me of the Facebook prank where…

Agreed. It should be trivial for them to allow you to paste your pgp public key as you would your ssh public key, then place a nice little "verified" check mark next to commits that can be validated as having been signed with one of your associated private keys.

There are so many things that GitHub could easily do, but don't... Makes me wonder what they actually do.

Re: Git-blame-someone-else – Blame someone else for your bad code

#14
post #12

Earlier quoted context omitted.

Agreed. It should be trivial for them to allow you to paste your pgp public key as you would your ssh public key, then place a nice little "verified" check mark next to commits that can be validated as having been signed with one of your associated private keys.

There are so many things that GitHub could easily do, but don't... Makes me wonder what they actually do.

You mean besides developing and operating one of the best services on the web?

Re: Git-blame-someone-else – Blame someone else for your bad code

#16
post #14
post #12

Earlier quoted context omitted.

There are so many things that GitHub could easily do, but don't... Makes me wonder what they actually do.

You mean besides developing and operating one of the best services on the web?

Well maintaining software and infrastructure is one thing. But they also seem to lack features compared to the competition. They might want to quickly sort their management issues out and be more agressive feature-wise.

Re: Git-blame-someone-else – Blame someone else for your bad code

#18

This was also being discussed here [1] [1] https://news.ycombinator.com/item?id=11049993 Apparently it will be obvious to folks that this has occurred.

Um, mostly no. This can be trivially detected only when you are changing things already pushed.

Being a dvcs, you create atleast one commit on your local repo before pushing to a remote. That one (or more) commit can be changed to point at anyone and pushed.

Re: Git-blame-someone-else – Blame someone else for your bad code

#19
(When I saw the title, I was wondering if this does something beyond the basic rebase, like trying to brute force a commit such that all following commits are preserved (hash doesn't change), but that's essentially impossible.)

I'm tempted to make the observation that there's nothing here you can't already do with a git rebase -i and:

    GIT_COMMITTER_NAME=a GIT_COMMITTER_EMAIL=a@a.com GIT_COMMITTER_DATE=2006-01-02T15:04:05Z git commit --author='a ' --date 2006-01-02T15:04:05Z
But I realize this ability will be novel/surprising to some people, and this is meant to be a joke.

I don't do this not because I can't, but because I have no incentive to lie about who wrote/committed certain code.

Re: Git-blame-someone-else – Blame someone else for your bad code

#20

This was also being discussed here [1] [1] https://news.ycombinator.com/item?id=11049993 Apparently it will be obvious to folks that this has occurred.

Um, mostly no. This can be trivially detected only when you are changing things already pushed. Being a dvcs, you create atleast one commit on your local repo before pushing to a remote. That one (or more) commit can be changed to point at anyone and pushed.

Mostly yes. You rewrite the whole history from the commit you changed authors on and onwards so git will let you know that you have two conflicting histories that needs to be merged. This is why the author needs to force push to master.

The only exception to this is if someone else has not pulled into their private repo any changes at or before the commit you changed.

Post reply on HN