In the 'real' Git, one of the functions I use frequently is `git checkout -- .`, which discards any unstaged changes. Looking at Gitlet's implementation, it wouldn't handle that well as `checkout` can only take a ref. So I guess I'm wondering what the real `git checkout -- .` actually does behind the scenes?
Gitlet.js – Git implemented in 1k lines of JavaScript (2015)
11–20 of 78 posts
Re: Gitlet.js – Git implemented in 1k lines of JavaScript (2015)
#12this is cool! but I'm curious to see a git blame implementation.
You mean the most conflict driven and passive aggressive feature in any programming tooling?
git blame is extremely useful for knowing when something was added, and what the context was. It is not about "blaming" people for mistakes.
Re: Gitlet.js – Git implemented in 1k lines of JavaScript (2015)
#13this is cool! but I'm curious to see a git blame implementation.
You mean the most conflict driven and passive aggressive feature in any programming tooling?
(Of course, the utility of this depends on how well people write commit messages. There’s nothing more annoying than looking at a blame and seeing “update somefile.java.”)
If your organization is using blame to stir up conflict and point fingers, that sounds like a human problem rather than a technical problem, and a problem that you would still have even if `git blame` never existed.
Re: Gitlet.js – Git implemented in 1k lines of JavaScript (2015)
#14this is cool! but I'm curious to see a git blame implementation.
You mean the most conflict driven and passive aggressive feature in any programming tooling?
For you to call this feature "passive aggressive" must have been borne out of some traumatizing experience and for that, you have my sympathy.
Re: Gitlet.js – Git implemented in 1k lines of JavaScript (2015)
#15this is cool! but I'm curious to see a git blame implementation.
You mean the most conflict driven and passive aggressive feature in any programming tooling?
I dunno, I always found `git blame` really funny yet at the same time, I empathize with those who are a little taken aback by it (including... what's the company's name who makes IDEs who calls it "annotate"... ?).
I largely love it because most of the time when I `blame`, that's exactly what I want to do. I don't need software to give me a nicer verb so I can pretend that's not what I'm actually doing.
And most of the time, the author is exactly who I thought it was going to be (which can result in jovial convos) or, more commonly, ITS ME! Oh, the humility. I guess I can see it being a problem if you work on a toxic team (shit, sorry) and yes, I do understand desire for a sheen of positivity in the language of the software we use, but pretty much every of the time I go to call `git blame`, I mean `git BLAME`. While it certainly does happen, I rarely find myself thinking, "Who wrote this amazing code!?? I MUST KNOW!!!" and in those circumstances, it actually soothes my ego to "blame" them for it :D
edited for grammar/spelling
Re: Gitlet.js – Git implemented in 1k lines of JavaScript (2015)
#16this is cool! but I'm curious to see a git blame implementation.
You mean the most conflict driven and passive aggressive feature in any programming tooling?
Being able to answer that question is key for maintainers.
Re: Gitlet.js – Git implemented in 1k lines of JavaScript (2015)
#17Earlier quoted context omitted.
You mean the most conflict driven and passive aggressive feature in any programming tooling?
Something tells me I wouldn't want to work in whatever team you work with. git blame is extremely useful for knowing when something was added, and what the context was. It is not about "blaming" people for mistakes.
Re: Gitlet.js – Git implemented in 1k lines of JavaScript (2015)
#18Re: Gitlet.js – Git implemented in 1k lines of JavaScript (2015)
#19Earlier quoted context omitted.
I mean, it just tells you the commit that last changed a line...
it's not that simple. git is a snapshot, i.e. it saves an entire file. How to recover changed lines from it efficiently? And How to do it for the entire history? Basically, I want to understand this code https://github.com/git/git/blob/master/blame.c
How would you explain this UI? https://github.com/git/git/blame/master/blame.c
Ie, what does blame mean to you?
Re: Gitlet.js – Git implemented in 1k lines of JavaScript (2015)
#20Earlier quoted context omitted.
I mean, it just tells you the commit that last changed a line...
it's not that simple. git is a snapshot, i.e. it saves an entire file. How to recover changed lines from it efficiently? And How to do it for the entire history? Basically, I want to understand this code https://github.com/git/git/blob/master/blame.c
I totally agree the technical implementation would be cool to study :)