655 karma · joined Oct 22, 2012 (14y ago) · 80 submissions
comment 3y ago · link · parent
https://www.reddit.com/r/comicbookcollecting/comments/15vvfj...
comment 3y ago · link · parent
comment 5y ago · link · parent
git blame --line-porcelain "$1" -L "$2,"$2" |
perl -MPOSIX=strftime -lne '/^author-time (\d+)/ and print strftime("%Y", localtime($1))'
I suppose it would be a little more convenient if you could ask `git blame` to format the whole line itself, but that wouldn't be part of the `--porcelain` output.All that said, that pipeline is quite slow on something like linux.git, as it runs a series of blames which will walk over the same history many times. I think:
git log -STODO --format=%ad --date=short
would be much faster (it's not _quite_ the same thing, as it counts TODOs which went away, but is a reasonable variant).comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 7y ago · link · parent
However, if you're more comfortable using GitHub PRs, there's a gateway interface at https://gitgitgadget.github.io/.
comment 7y ago · link · parent
comment 8y ago · link · parent
This part implies that the index file is written via mmap, but that's not true. It is fully rewritten to a new tempfile/lockfile, and then atomically renamed into place.
Git does not ever mmap with anything but PROT_READ, because not all supported platforms can do writes (in particular, the compat fallback just pread()s into a heap buffer).
comment 8y ago · link · parent
comment 8y ago · link · parent
comment 8y ago · link · parent
I've always been very happy about how GitHub supported my participation in the community. Sometimes what I do is directly useful to GitHub, and sometimes it's a matter of keeping the project healthy for everyone. It's always been about contributing, and not trying to control.
Microsoft started contributing to Git about 2 years ago, and in the last six months, we've seen them increase their contributions. From what I've seen they've taken the same approach: give developers the resources and freedom to figure out what the project needs and improve it. I'm excited about some of the performance work they've been doing (e.g., fsmonitor integration, graph optimizations).
So I'm optimistic about this with respect to Git. I think it will mean continued support for the project. And I do feel like Microsoft "gets" open source in a way that most people never would have believed 5 or 10 years ago.
comment 8y ago · link · parent
- you have to tell git to use submodules for this to trigger (so `clone --recurse-submodules` or a manual `git submodule update --init`)
- credit for discovery goes to Etienne Stalmans, who reported it to GitHub's bug bounty program
- most major hosters should prevent malicious repositories from being pushed up. This is actually where most of the work went. The fix itself was pretty trivial, but detection during push required a lot of refactoring. And involved many projects: I wrote the patches for Git itself, but others worked on libgit2, JGit, and VSTS.
comment 8y ago · link · parent
https://github.com/git/git/tree/master/contrib/diff-highligh...
comment 8y ago · link · parent
comment 8y ago · link · parent
I've tried to make the Git vs GitHub distinction clear in the first paragraph without belaboring it, but I agree with the sentiment here that the title muddies things. For future iterations I'll look into something more like "A look at the new features in v2.17".
23.
Git 2.17 is now available(blog.github.com ↗)
3 points · by peff · 8y ago · discuss
comment 8y ago · link · parent
You can also drop `--abbrev-commit`, since `%h` abbreviates by default (use `%H` if you want the full hash).
comment 9y ago · link · parent
It also supports a few other diff algorithms: `--patience` and `--histogram`, but in my experience they produce the same output as Myers in most cases.