Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
peff
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
peff
11y ago
How does it compare to http://potrace.sourceforge.net/ ?
62.
▲
by
peff
12y ago
It's actually a little dangerous; what happens when you hit "^C" and the process dies before getting a chance to clean up? It's safer to do: some_cmd >foo.tmp && mv foo.tmp foo The mv will do an atomic
63.
▲
by
peff
12y ago
I think we are actually agreeing. I think it is important to have this Git fix, because it lets people be careful if they choose. But in practice most people are _not_ careful, and will happily clone and run code without inspecting it (or p
64.
▲
by
peff
12y ago
You were and are vulnerable to malicious projects by running: git clone git://... make or anything similar, since you are running arbitrary code out of the repository. This release fixes the problem of: git clon
65.
▲
by
peff
12y ago
We found 10 repositories which would have been blocked on push with the new restrictions. None of them were found to be malicious.
66.
▲
by
peff
12y ago
It's not exactly plaintext versus binary. Git "stores" a copy of every file, no matter the content. But it also does "delta compression" between objects when you run "git gc"; it tries to find binary diffs
67.
▲
by
peff
12y ago
Sort of. All of the test scripts are written in bourne shell. There are ~10K lines of bourne shell in git itself, and ~136K lines of test scripts. That may be nitpicking, but I think it also goes to show that sometimes seemingly simple numb
68.
▲
by
peff
12y ago
No, those are things that _usually_ happen in most C implementations. But reading from uninitialized memory provokes "undefined behavior" according to the standard. Which might mean returning an unspecified value, might mean whole
69.
▲
by
peff
12y ago
`git gc` will not remove objects mentioned in the reflog. The reflog entry for a commit that is not referenced from any refs (e.g., because you deleted the branch it was on) will last for `gc.reflogExpireUnreachable` time units. By default
70.
▲
by
peff
12y ago
Keep in mind that `git am` is not identical to pulling the commits. You might be applying the commits on a different base, and certainly your committer field will be different (not to mention any substantive changes you make). As a result,
71.
▲
by
peff
13y ago
No, GitHub primarily uses regular git on the backend. It powers all fetches and pushes, diffs, and most of the history traversals. Some functionality is provided by libgit2, and it's ever-increasing because libgit2/Rugged is often
72.
▲
by
peff
13y ago
Radix sort is one of those tricks that doesn't help often, but every once in a while can produce spectacular results. Here it is showing a 4x speedup on a particular operation in git: https://github.com/git/git
73.
▲
by
peff
13y ago
That is the fallback implementation in case a platform does not have an optimized version available. Try `sysdeps/x86_64/strcpy.S` to see an optimized version.
74.
▲
by
peff
13y ago
That prompt can be really slow, as it runs `__git_ps1` multiple times (through several branches of the conditional, and then for the final output). On my git.git repository, running `time __git_ps1` takes about .085s. If I hit the "cyan" co
75.
▲
by
peff
14y ago
I notice that he omits the full output of `git push`. A lot of the confusion is caused by the fact that the default push mode is `matching`. I don't know what git version he is running, so I can't say exactly what text was omitted, but I wo
76.
▲
by
peff
14y ago
For a fun application, this trick is used in a proposal to encode extra randomness into the 0x20 bit of each character of a DNS query (to increase resistence to poisoning attacks): https://tools.ietf.org/html/draft-vixie-dnsext-dns0x20-00
77.
▲
by
peff
14y ago
By the way, I'm assuming a taxi-like shared car fleet here, where you just get in some car that is available, it takes you where you want to go, and then goes to pick somebody else up afterwards. Without that, you would not have the reducti
78.
▲
by
peff
14y ago
Is utilization over time important? If we assume that people will still travel the same number of miles[1], then while there will be fewer cars on the road at any given moment, they will wear out more quickly as they are utilized more heavi
79.
▲
by
peff
14y ago
Writing it in the passive voice is slightly more awkward. E.g., "git cherry-pick" was enhanced with an "--allow-empty-message option". Similarly, writing it in the active voice but attributing the verb properly ends up with meaningless word