Re: [PATCH 00/86] replace prefixcmp() with has_prefix()

2013-11-11 Thread Andreas Ericsson
), whereas your function must return non-zero on match and thus can't be used as a qsort() callback. Granted, prefixcmp() lends itself poorly to that as well, but at least it's consistent with the other *cmp() functions. So -1 on this whole series. -- Andreas Ericsson and

Re: htonll, ntohll

2013-11-13 Thread Andreas Ericsson
() are those "encode" and "decode" functions. If you or the author of the post you linked think otherwise, you're misinformed and need to learn what encoding and decoding means. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB

Re: A few contributor's questions

2014-02-03 Thread Andreas Ericsson
e license that people agreed to relicense their contributions under. It can be found here: https://github.com/libgit2/libgit2/blob/development/.HEADER I'm mostly adding it here for the sake of clarity in case people find this in the future and wonder what all the fuzz was about. -- Andreas Ericss

Re: Understanding Git Under The Hood: Trees

2013-08-15 Thread Andreas Ericsson
ad-ahead works to our advantage. Btw, when I say "minimize disk I/O", I really mean "minimize user wait", although disk I/O is certainly (often) the largest part of that. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se T

Re: Understanding Git Under The Hood: Trees

2013-08-16 Thread Andreas Ericsson
lso do "git commit" after having done "git-add", we write out a commit object, pointing to its parent commit and the root tree we created in the "git-add" stage. "git cat-file -p HEAD" will give you an idea of how that looks. -- Andreas Ericsson

Re: Failure to extra sta...@vger.kernel.org addresses

2012-11-20 Thread Andreas Ericsson
$/$1/; >> + $recipient =~ s/^(.*?<$local_part_regexp\@$domain_regexp>).*/$1/; > > I don't think all that extra complexity is warranted, to me > s/(.*?>)(.*)$/$1/ is just fine. > It's intentionally left without the at-sign so one can

Re: Python extension commands in git - request for policy change

2012-11-26 Thread Andreas Ericsson
er, and you know as well as I do that it just won't happen unless there's at least a chance of some substantial technical benefits from doing so. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225

Re: Possible vulnerability to SHA-1 collisions

2012-11-28 Thread Andreas Ericsson
claimed 2^160. That means every attack involving SHA1 means Mr. Malicious creates both the involved files or does exceptional research without sharing it. I think git's job is to make sure that write access to only one of the repositories is insufficient to launch an attack. If the attacker mana

Re: Millisecond precision in timestamps?

2012-11-28 Thread Andreas Ericsson
ould be trivial to support museum style history viewing with a special flag that treats the timestamps as minutes since 1900-01-01 or some such, giving us plenty of time before even the first punch-card was invented. It wouldn't be much harder to let the user specify the timeunit and the st

Re: Millisecond precision in timestamps?

2012-11-28 Thread Andreas Ericsson
you try it in Sweden. Our oldest written law dates back to 1281. Quite fun reading. Apparently it was against the law to shoot your slaves with stone arrows back then. See my other proposal for how this could be done, which would only affect the output layer (and some care w

Re: [PATCH] fsck: warn about ".git" in trees

2012-12-04 Thread Andreas Ericsson
, > but we want to have this as a reserved name. > > Looking at bad directory names, which gives trouble when checking out: > > Should we check for "/" or "../blabla" as well? > Apart from the checks already in place, checking for gi

Re: git branch case insensitivity (Possible bug)

2013-01-09 Thread Andreas Ericsson
X? Are you using the HFS+ filesystem shipped with it? Did you use the filesystem's default settings rather than reinstall your system with sensible settings? If you said "yes" to all of the above, this is a filesystem "feature", courtesy of (cr)Apple, and

Re: Workflow Help

2013-05-21 Thread Andreas Ericsson
27;t done things horribly wrong at the design stage, this model should work reasonably well while avoiding the whole "where are the bugfixes and in which order do I need to apply them?" issue. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB w

Re: git status takes 30 seconds on Windows 7. Why?

2013-03-27 Thread Andreas Ericsson
it operations took forever. Could you try it on a disk you know is local? Preferrably a solid state drive. If it's still slow there, we know for sure something's broken inside git. If switching media causes git to become fast, you'll know it's a hardware

Re: cd

2013-04-03 Thread Andreas Ericsson
The only difference between 'git rm' and 'rm' is that git rm also removes the file from its index and prepares to commit a version without it. From git's point of view, it's not an error if the file doesn't exist. It *is* an error if the directory where the file shoul

Re: Git/Mac refuses to install on OS X 10.8 (Mountain Lion)

2013-04-07 Thread Andreas Ericsson
le workaround, and we probably won't even have to document it since google should provide it for git and a plethora of other useful packages. Otoh, if enough osx folks want git on the latest pussycat, I'm sure they'll provide a package themselves sooner or later, in which case you just

Re: [rfh] do I need to use something more complex to do this?

2013-04-10 Thread Andreas Ericsson
l for you to ask for help. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious

Re: git on HP NonStop

2012-08-23 Thread Andreas Ericsson
in tricking future programmers into thinking that the initialization actually means something, which some of them do. It's unlikely that you're the one to maintain that code forever, and the "var = var" idiom is used widely within git with a clear meaning as a hint to program

Re: libgit2 status

2012-08-25 Thread Andreas Ericsson
s time working on libgit2. Politically, I'm not sure how keen the git community is on handing over control to the core stuff of git to a commercial entity, but it doesn't seem to be a dying project, so I'd say go ahead and do it. -- Andreas Ericsson an

Re: [PATCH 4/4] Add a function string_list_longest_prefix()

2012-09-10 Thread Andreas Ericsson
easy markup format. For example, this: > >http://tomdoc.org/ > > Looks much nicer to me than most doxygen I've seen. But again, it's been > a while, so maybe doxygen is nicer than I remember. > Doxygen has a the very nifty feature of being able to generate c

Re: Using doxygen (or something similar) to generate API docs [was [PATCH 4/4] Add a function string_list_longest_prefix()]

2012-09-10 Thread Andreas Ericsson
me, but since you seem to have volunteered... ;) > I think I'll leave it for the moment, and next time I start to add some > api-level documentation I'll take a look at doxygen-ating them and see > how I like it. And I'd invite anyone else to do the same (in doxygen, o

Re: [PATCH] git-am: Handle "git show" output correctly

2012-09-12 Thread Andreas Ericsson
not a tty. I believe that would at least mitigate the problem, and it might educate the user as well. We already modify output format when stdout is not a tty (removing colors), so we're not giving guarantees about its format when it's piped somewhere. I believe that w

Re: inconsistent behavior on mac with case changes

2012-09-14 Thread Andreas Ericsson
p using HFS+ or do your development work inside a loopback fs mounted with proper case sensitivity, as there's really no sane way around the problem OSX causes. > Is this not the correct list for a question like this? If not, is > there another list that's more appropriate? It is, bu

Re: Can git pull from a mercurial repository?

2012-09-18 Thread Andreas Ericsson
On 09/18/2012 01:22 PM, Joachim Schmitz wrote: > Is there an easy way to get git to clone/pull from a Mercurial repository? > Yes. Google "git remote helpers" and you'll most likely find it. -- Andreas Ericsson andreas.e

Re: Is anyone working on a next-gen Git protocol?

2012-10-08 Thread Andreas Ericsson
avoid incurring insane amounts of roundtrip latency with lots of refs. github and other hosted services are quite popular, but with my 120ms ping rtt I'd be spending half a minute just telling the other side what I want when I fetch from a repo with 250 refs. It's a flagday and a hal

Re: libgit2 status

2012-10-20 Thread Andreas Ericsson
ll use lower- level stuff if it wants to. It's a good compromise when creating a library from application code and there were no opaque types from the start. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax:

Re: Who is the 'git' vendor?

2012-10-25 Thread Andreas Ericsson
r for git, as the whole vendor concept doesn't really fly with FOSS. There's noone to go to if it breaks your systems, and unless you purchase a support contract from somewhere there's noone to turn to except the (excellent) git community in case you

Re: Lack of netiquette, was Re: [PATCH v4 00/13] New remote-hg helper

2012-11-02 Thread Andreas Ericsson
ning is both poetic and democratic, and I firmly believe most people have the original meaning to the fore of their mind when using it. After all, very few people knowingly quote nazi concentration camp slogans. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB

Re: git am and the wrong chunk of ---

2012-08-10 Thread Andreas Ericsson
commit message, and "-- >8 --" scissors before). Is > there some machine-readable hint? Is it always the paragraph before the > "---"? Chopping that off unconditionally seems like a dangerous > heuristic. > End of SOB lines might be a good cutoff, if

Re: Is this a bug?

2013-02-19 Thread Andreas Ericsson
_clz() #ifndef __GNUC__ precisely to avoid this issue. It also puts the imperative first, which I find makes for smoother reading. Putting the condition first screams for a comma and a slight stagger in reading flow, like so: Unless built with gcc, use compat-layer __builtin_clz() -- Andreas Ericss

Re: Certificate validation vulnerability in Git

2013-02-24 Thread Andreas Ericsson
#x27;m not fussed. > We are not subscribed to this list, so we'd appreciate it if you could > CC us in the replies. > That's standard on this list. Please follow the same convention if/when you reply. Thanks. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB

Re: auto merge bug

2013-03-05 Thread Andreas Ericsson
i style files unless you're very, very careful with how you write them. -- Andreas Ericsson andreas.erics...@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and te