Live data from Hacker News

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

github.com

61–68 of 68 posts

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

#61
what's the point? you just rebased with a incompatible tree. nobody will be able to update that because their trees will say the commit differs.

and in the only case this would work, i.e. nobody has that commit yet, you could just have commited as that person. nothing new or interesting.

now, github being garbage and not accounting for PGP signatures, now this is something else.

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

#62
post #29

Earlier quoted context omitted.

Best in what sense? Bitbucket does everything Github does, plus gives free private repos. GitHub is just more widely used.

Bitbucket crashes minimal browsers like Surf and github doesn't. So, in that regard, Github is better.

It seems odd to blame BitBucket and not Surf for this.

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

#63
post #29
post #14

Earlier quoted context omitted.

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

Best in what sense? Bitbucket does everything Github does, plus gives free private repos. GitHub is just more widely used.

i don't use bitbucket so can't comment if they provide this. but github has a nice hack allowing you to svn checkout a portion of a tree

on a slow connection, this allows you to work on or inspect repos that are too large to git clone (one of the few major complaints i have with git itself)

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

#64

It's been my experience, especially in the startup scene where business requirements change often, that `git blame` rarely shows you what you want. Files get renamed, moved, re-indented, etc, frequently. I wrote a tutorial on a more effective (at least for me) solution to find the true author of a change: http://blog.andrewray.me/a-better-git-blame/

> It's been my experience, especially in the startup scene where business requirements change often, that `git blame` rarely shows you what you want. Files get renamed, moved, re-indented, etc, frequently.

Blame follows renames in most cases (unless you're doing something like creating a new file with the same name as the renamed one in the same commit), and you can use the -w flag to ignore whitespace changes.

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

#65
post #29
post #14

Earlier quoted context omitted.

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

Best in what sense? Bitbucket does everything Github does, plus gives free private repos. GitHub is just more widely used.

Is there anyway to search bitbucket? Can I link my profile to someone so they can see all my projects? I'm only dimly aware of bitbucket, but if these criteria are easily met then I might even consider changing over.

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

#66
post #21
post #11

Earlier quoted context omitted.

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.

Though since GitHub does not have an office in the UK and in the US is protected from foreign defamation judgements under the SPEECH Act, it probably doesn't have much to worry about.

Just wait until they want to take advantage of Ireland's favourable tax regime. Ireland also has strict libel/defamation laws.

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

#67
post #58

Earlier quoted context omitted.

Nice tutorial, but aren't you aware that "git blame -w" ignores whitespace changes? git blame also always follows renames. git's rename detection isn't foolproof (if I edit and rename A.cpp to A-star.cpp at the same time as adding a new A.cpp file it won't detect it), however there are two more blame options for that: -C to follow lines copied between files, and -M to follow lines moved within a file. Unfortunately,…

I would love to be able to use left and right to skip quickly through revisions when viewing a blame, do you know anything for that?

That's something I've wanted for a long time too.

tig (a curses-based git interface) fits the bill, though it can be quite confusing (too many keybindings). "tig blame -w " to view a blame (-w to ignore whitespace), and then you can press , on a line to recompute the blame using the parent of that commit, while moving to the ancestor of that line (but tracking the line frequently doesn't work). And I remember that tortoisesvn was fairly nice for viewing blames, IIRC you can move through history inside it with some clicking around, and the tortoisegit interface appears to be largely the same: https://tortoisegit.org/docs/tortoisegit/tgit-dug-blame.html Windows only however.

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

#68
post #38

Earlier quoted context omitted.

I'm actually surprised that git doesn't sign commits by default. (i.e. I had assumed that it did.) It already has the keys set up and such.

No it doesn't. Git works independently of SSH.

Oh.

Oops. Thanks for the correction.

Post reply on HN