IRCloggy #git 2007-11-25

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

2007-11-25

anttih Mikachu: that is wrong?00:00
Ilari robinr: And there are lots of crap books about C++ that get things wrong...00:00
Randal it's what I told you earlier, I think00:01
robinr dsop: my guess is master is not initialied unless you import HEAD00:01
Randal never push to a non-bare repo00:01
robinr Ilari: plenty00:01
Randal oh - it's what I was supposing but someone else said your problem had already been answered00:01
but now I see that it was what I preduicted before. :)00:01
anttih Randal: I have many problems :-D00:01
this is a new issue00:01
I suck00:01
aroben_ left00:02
Randal no, you just don't blow enough. :)00:02
robinr I've been trying to tell C++ educators not to start with C. ... you're not supposed to do "C" programming in C++ unless you are and STL implementor00:02
anttih but you say never push to a non-bare repo00:02
Ilari Or if you really need to, force the push go to tracking branches via configuration (perferably to tracking branches of that repository).00:02
Randal don't confuse anttih... :)00:02
robinr i've even seen supposedly "good" c++ programmers do new char...00:03
anttih you bet00:03
Randal C++ is evil. OO should be taught with Smalltalk00:03
robinr or LISP :)00:03
anttih ok, I think I understood something00:03
Randal no - it should be a pure OO language00:03
to keep complications out of there.00:04
semi_ pure OO is hard to define00:04
Randal which rules out Java, C++, Python, and Perl.00:04
Not at all00:04
anttih have you tried D?00:04
Randal "everything is an object"00:04
"all classes can be subclassed"00:04
"all classes can be extended"00:04
that's pure00:04
anttih that's JS00:04
Randal No. JS has primitive data types00:04
vmiklos heh00:05
this is true for python, too i think ;)00:05
Randal No - python has primitive data types00:05
semi_ OO is overestimated00:05
Randal and so does java00:05
Smalltalk has no "primitive" types00:05
robinr Object?00:06
vmiklos if you say p = 1 then you have an int object00:06
that's not a primitive type00:06
robinr atoms00:06
vmiklos (like the java one)00:06
robinr can you subclass atoms?00:06
Ilari I say the language should also feature 'strong component isolation' as standard part. Those also tend also be 'cleaner' OO languages (excluding pathologies like capfuck)...00:06
tpope javascript doesn't have primitive datatypes does it?00:06
Randal what are you talking about?00:06
tpope String, Number, Function, these can all be extended00:07
anttih has someone tried D?00:07
vmiklos s = -1; then i can say s.__abs__()00:07
iabervon I thought python primitive data types weren't distinguishably not objects as far as you can tell within the language.00:07
Ilari One example of such language is E. I don't know how pure OO it is...00:07
Randal you can't subclass python primitive data types00:07
if I recall correctly00:08
Mikachu you can even say (-1).__abs__()00:08
robinr iabervon: maybe they use what java calls autoboxing?00:08
i.e. the compiler wraps primitives with things like new Integer() if an Object is required00:08
but that is not what Smalltalk does00:09
I think smalltalk internally tries top optimize using primitives if possible00:09
iabervon I've never tried subclassing them, but I'd be a bit surprised if you can't, given how much you can muck with everything in python.00:09
Randal robinr - not the smalltalks I've seen00:10
tongueroo joined00:10
Mikachu so if you say 1+1 it runs some hundred operations? :)00:10
robinr Randal: no wonder it's slow00:11
Randal it does a simple dispatch to the SmallInteger class00:11
looking for a + method, yes00:11
"slow"? when's the last time you played with smalltalk?00:11
robinr ....a while ago00:11
when 200 MHz was a fast processor00:11
Randal the web framework Seaside beats Ruby On Rails by a factor of 10-to-100:12
robinr and, Oh, I run a couple of swikis00:12
now00:12
Mikachu afaiu, ruby isn't really hard to beat in speed00:12
Randal java's relatively slow too00:12
some modern smalltalks do some JITting00:12
robinr the fastest cvs-git importer is largely written in ruby00:12
ths RCS parser is C though00:12
Randal: relatively slow compared to C yes, not not much else00:13
theCarpenter RoR is garbage for speed00:13
Randal anyway - the basic point is that Smalltalk is pure OO and should be used to teach OO00:13
I didn't make any claims for speed00:13
Mikachu but then everyone will just know smalltalk00:14
robinr It's fast enough for that purpose00:14
Randal they'll know real OO00:14
besonen_pidgi1 joined00:15
semi_ Randal: suggest some reading material for that?00:16
robinr semi_: OO or smalltalk?00:17
DrNick Ilari: you still shouldn't design your own crypto algorithms00:17
semi_ well, not for me, but for those that "should learn OO with smalltalk first"00:18
robinr I worked for a company that ran smalltalk courses for newcomers to OO00:19
semi_ that's pretty cool00:19
Ilari DrNick: Of course not.00:19
DrNick: But encrypting data is the easy part...00:19
yorgen15 joined00:20
robinr "we" (not me) did smalltalk implementations of systems. Unfortunately they had those smalltalkish GUI disease, which I think is the reason Smalltalk never got big.00:22
users didn't care about the implementation language, but they see the user interface00:23
nzkoz joined00:23
Randal there are a few books on squeak smalltalk at your local bookstore00:24
there's a few free books online as well00:24
jkimball4 left00:24
Randal the trouble is that I learned before those books were out, so I don't know which ones teach well00:24
what is a "smalltalkish GUI disease"00:25
robinr the user interfaces from hell that most smalltalks apps used to have00:25
Mikachu can't you make c-smalltalk bindings for any lib(toolkit) you want to use?00:26
robinr the look and fell from Xerox Palo Alto of 1980 is not that nice00:26
seanh theCarpenter -- yeah the XO's filesystem looks like the hammer that Randal was referring to. It'd be great if it's available for general use one day00:26
robinr Mikachu: sure, there were even a couple of smalltalk implementers that tries to make the platform compliant00:26
Randal everything in the XO is open source00:26
go get it and install it. :)00:27
seanh Randal -- yeah I know, so I guess it will be one day00:27
Mikachu open source doesn't mean you can use it with no effort :)00:27
bdiego joined00:27
seanh Well for now I don't think they've finished it, and I don't think it runs on anything but the xo operating system and sugar interface00:27
Randal smalltalk's UI works "well enough", which is why people focussed on more important things00:27
robinr Digital Smalltalk was one, but they dropped portability a lot, creating much more lock-in than one wants00:28
Randal it's also completely in smalltalk, which means it can be examined and customized as needed.00:28
robinr no, it did not work well enough,00:28
Randal "native" widgets raise lots of trouble00:28
robinr they tried to implemented the native look but forgot the feel00:29
Randal faulting ST for that is like immediately ruling out python because of the stupid indentation. :)00:30
robinr so standard things like TAB, shortcuts etc typically never appeared00:30
robewald|home left00:30
robinr maybe good enough for 3270 users, but other..00:30
Randal you really ought to look at modern Squeak00:30
robinr yes, my ST experience essentially stopped ten years ago00:31
I like strong typing though, so I think there's nothing that can make me switch to ST anyway00:32
I guess there are different kinds of people00:32
Randal Oh yeah, I think we had this conversation00:32
smalltalk is strong typing00:32
it's just that values are typed, not variables.00:33
robinr ok, stop it. I use the term as defined in a book by Horowitz "Fundamentals of programming languages"00:33
Randal I don't have that book, therefore I'm not bound by that. :)00:33
robinr where strong typing mean that the compiler know the type00:33
Randal well - if you want to reduce programmer productivity using compile-time bindings, go right ahead.00:34
"strong typing" using your definition is neither sufficient, nor necessary00:34
robinr it's one of the classics on programming languages00:34
Randal I wrote up an article on that somewhere.00:34
robinr yes, they didn't think of languages like java where the type is partially known00:35
Randal duck typing is so much more practical, but you have to be out in the field quite a long time to realize why00:36
robinr never heard that term00:36
ah00:36
Randal should I point out the book on my shelf that defines it? :)00:37
robinr no, I googled it00:37
Randal heh. I'm having a discussion about smalltalk on the git channel, and ubuntu on the smalltalk channel. :)00:37
damn channels, what are they for?00:37
robinr reducing the number of concurrent users00:38
jjore-m joined00:38
jjore-m peeks.00:38
robinr I like way strong typing (horowitz defn) simplifies massive refactoring (in the field)00:39
Randal I like the way the Squeak Refactoring Browser simplifies massive refactoring. :)00:39
and test driven development means I can sleep at night00:40
and since there are tests, there's no need for the compiler to "get the types right" because the tests would have failed00:40
robinr second that00:40
Randal that's the short version of "strong typing is neither sufficient nor necessary"00:40
robinr unfortunately a lot of code in the field is not equipped with unit tests...00:41
Randal that's the fault of management00:41
not the fault of a compiler00:41
robinr management have no clue00:41
Randal adding a compiler won't force the other half of the tests to be added00:41
hence, a compiler is deceptive00:41
robinr the programmers are lying to them00:41
Randal by compiler I mean "compile-time type checking"00:41
rhalff_ Randal: you have any examples of nice seaside sites online ?00:41
Randal dabbledb.com is all seaside00:41
seaside.st is seaside. :)00:41
seaside-hosting.st lets you host a smalltalk image for free!00:42
rhalff_ oh ok, yeah ever have been there00:42
robinr "I'm unit testing" = I'm desperately trying to make the program run one manual test case on production data00:42
Randal rhalff_? no comprende00:42
jjore-m hasn't really liked DabbleDb. It's pokey.00:43
robinr someone start doing unit tests, and the rest adopt the term00:43
Randal it's pokey because it's a money decision00:43
he throws more money at it, it gets faster.00:43
iabervon I personally think that explicit typing is most helpful as comments whose accuracy the compiler enforces.00:43
Randal but as long as it's "fast enough", no big deal00:43
the problem with explicit typing is that almost every program will want/need to break it at some point00:44
consider "generics"00:44
and while that should theoretically never be needed, in practice, it occurs a lot more often than theory says00:44
hence, duck typing works better than compiler-enforced typing *in practice*00:44
sadly, kids are coming out of school brainwashed into believing compile-time typing solves all.00:45
robinr if programmers write their unit tests00:45
Randal well, that's why we should teach OO with smalltalk, not Java00:46
or C++00:46
theCarpenter Randal: What schools are you talking about?00:46
Randal then unit testing becomes the norm, not the exception00:46
iabervon If there were a "Whatever" type, that did duck typing, but the rest of the type system were explicit, I think that would be ideal.00:46
theCarpenter Or is this just one of those "back in my day" rants? ;)00:46
Randal well, consider whatever school brainwashed robinr. :)00:46
jjore-m Randal, *shrug* I thought it was pokey so I stopped using it. It wasn't fast enough.00:46
robinr lol00:47
theCarpenter well robinr, what was this evil school? ;)00:47
robinr I don't want to give them a bad reputation00:47
theCarpenter haha00:47
robinr it's not their fault00:47
it's from my experience. the compiler's typing helps my memory00:48
theCarpenter Randal: I say "what schools are you talking about" because the very first "introductory programming" class you take here, the first thing they say when discussing typing is that "compile time type checking does not resolve every issue"00:48
robinr noone here said that00:49
theCarpenter thanks for that little duck typing mention, I've never heard of it before =]00:52
Hey cool, duck typing is used Python... 8-)00:52
Randal duck typing is what we've come to call the type of strong typing that "dynamic" languages use, like Perl, Python, Smalltalk, etc.00:53
where the value is typed, not the variable00:53
and any value that responds to whatever methods we happen to send is OK00:53
"if it walks like a duck, it's a duck"00:53
iabervon Are there Smalltalk IDEs that annotate variables with the methods they need to have? That's what I'd like to see.00:55
Randal "need to have"?00:55
robinr iabervon: you don't need that00:55
Randal you mean, show all uses of this variable?00:55
for a local variable, that'd be relatively easy to spot. :)00:56
for an instance variable, yeah, you can browse all accesses to an instance00:56
either in the class, or class and all subclasses00:56
robinr there are tools that do some static type checking, I've been told00:56
bdiego left00:56
iabervon Yeah, but for method arguments.00:56
nzkoz I personally like steve yegge's take on non inferring static type systems00:56
http://photos1.blogger.com/blogger2/1715/1669/1600/larson-oct-1987.gif00:56
Randal again, method arguments are all within a few lines of code00:56
if your method is longer than 20 lines, you've misfactored00:56
pedro_mg like in ruby 3.methods00:57
iabervon Well, the call site isn't going to be nearby.00:57
robinr pedro_mg: ?00:57
nzkoz robinr: in ruby you can ask an object what methods it has. by calling .methods00:57
iabervon If you see that foo gets used in bar.baz(foo), that has implications about what methods of foo will be used by that call that aren't easy to see locally.00:58
pedro_mg like 3.respond_to?"hash"00:58
robinr ok, I think all dynamic languages have that00:58
nzkoz robinr: don't believe 'all' of them can. but yeah, it's pretty common00:59
robinr nzkoz: just can't think of anyone that doesn't but then I don't know em all01:00
metadata comes natural in such environments01:01
tmokros joined01:03
robinr a problem with the "quacks like" analogy is that quack may mean entirely different things "foo :quack". Take a [ anScm :reset "Foo" ] as an example01:03
it's not just that different scm's implement reset differently, it's not even the same concept01:04
robinr was thinking of revert actually01:04
nzkoz sure, but similarly I could have public void reset() { doSomethingUnexpected();}01:05
iabervon Obviously, you need "foo :duck.quacks". Otherwise, it just quacks, not necessarily like a duck.01:05
robinr but in that case you are breaking the contract01:05
nzkoz I dunno, I'm always skeptical of attempts to solve code review problems with technology.... but I don't feel particularly religious about dynamic typing. It's just that anything else seems 'dumb' to me. but I don't claim to know everything01:07
robinr that's sensible01:08
iabervon In order for code review to work, you need the language to make it harder than not to write something that looks right and is wrong.01:09
jkimball4 joined01:09
seanh If I run git checkout when the working copy has been modified, it seems to print out a list of the modifications in the working copy. Is this just to tell me why I can't checkout right now?01:10
iabervon I wonder how much it would hurt to try to make a version of git-am that would search history for somewhere that a patch applies.01:10
seanh: if it didn't say it couldn't do the checkout, then it did it, and those changes are floated over to the branch you've checked out.01:11
robinr seanh: you can, but you need to tell git more about what you want to happen; like do you want to throw away your changes or merge them into branch you are switching to01:13
Mikachu if none of the changed files need to be touched by the checkout, it'll do the checkout, otherwise you have to say -m01:13
seanh Oh ... so it does the checkout and the prints a status report? I am now on the branch I checked out, but my working copy hasn't changed, and it now differs from the branch I'm on in the ways that git printed out01:14
iabervon Other parts of your working copy may have changed; other than that, yes.01:15
seanh what d'you mean other parts of my working copy?01:15
tongueroo left01:16
iabervon If there are files that you hadn't touched in your working copy, and those are different between the two branches, those will have changed to the new branch's versions.01:16
seanh Oh right, thanks01:16
So is checkout the right command to use if you want to throw away what's in your working copy and go back to some commit?01:17
(or is it reset?)01:18
KirinDave left01:18
Mikachu reset will change a branch tip, while checkout will just move HEAD around01:18
glommer joined01:18
iabervon Checkout is what you want if you want to make individual files in your working copy match a commit.01:18
seanh it seems that either git checkout -f or git reset --hard would do it01:18
consolers joined01:19
iabervon "git checkout HEAD file..." does those files. "git reset --hard HEAD" is the right thing for discarding all of your local changes.01:19
tongueroo joined01:20
iabervon Without filenames, "git checkout branch" retains your changes while moving to the other branch.01:20
consolers hmm, doesnt it fail if you had changes ?01:22
seanh Bug what about "git checkout -f branch"? That deletes your changes. right? Sounds the same as git reset --hard01:22
robinr reset --hard plus checkout branch01:22
iabervon Yeah, but it has some other issues; IIRC, if you have tracked files that aren't in the branch you're checking out, "git checkout -f branch" won't remove them.01:24
Mikachu seanh: and like i said, checkout doesn't move your branch tip01:24
seanh So if I want to move a git repository, but minimise the amount of data that has to be transferred, I could just move the .git file to the new location, an empty folder, then run "git reset --hard HEAD" in that folder and it'll checkout all the files01:24
Luniv joined01:26
seanh that seems to be what it did anyway01:26
iabervon Yeah, that should work.01:27
seanh I really like that about git, that if you want to move a repository around you just move the folder. You can burn it to a disc or something. That combined with every repository having a full signed history and git-fsck, is really good01:28
consolers can anyone recommend pointers to other fast-import scripts that i can read for my edification01:29
(i've seen git-import.sh and those in contrib/)01:30
bdiego joined01:35
robinr consolers: http://ww2.fs.ei.tum.de/~corecode/hg/fromcvs/01:37
consolers [any way to get the tip from hg as a tar.gz by http] ?01:41
(without hg, i.e)01:41
robinr doesn't clicking the links at the top work?01:41
Randal how many examples do you need? :)01:42
consolers sorry i was blind01:42
Randal well I mean even before that last link?01:43
were you looking for a particular importer01:43
or more ways to write the code?01:43
fred gets fedup with msysgit01:43
fred exports his directory on windows, mounts it with smbfs on the laptop next to the machine currently in windows, and uses a decent environment for it :)01:44
consolers just checking prior art01:46
mjc left01:46
anttih left01:51
Randal "art" used loosely. :)01:52
pd joined01:54
GyrosGeier joined01:55
dpc left01:58
tongueroo left02:04
seanh left02:05
theCarpenter Any Russians in here?02:07
tarrybon1 left02:16
glommer left02:16
samsarin joined02:18
jjore-m left02:27
spuk joined02:28
ekim|linux left02:38
iabervon -mm has a lot of patches that don't have subject lines.02:44
nzkoz Anyone around who knows how git-svn works with the git 'plumbing'? I have a few questions about why sharing is difficult with git-svn repositories02:47
rjent joined02:49
tarrybon1 joined02:53
elmex joined03:06
jkimball4 left03:10
mugwump nzkoz: its ref layout isn't great03:11
if you're sharing you have to write push: lines that look like refs/remotes/*:refs/heads/*03:11
nzkoz I'm just wondering (assuming) it's some fundamental problem that makes it hard to share git-svn repositories03:11
when you dcommit it rewrites the commits right?03:11
mugwump yes03:12
so that someone pulling via git-svn ends up with the same commit ids03:12
nzkoz but it means that someone pulling from my git svn repository will see my own commits, then get merge issues if they rebase again after I dcommit right?03:13
which is an artifact of the fact that commits are signed so you can't change them ? (obviously that's a feature ;))03:13
meandtheshell left03:13
consolers left03:13
eatnumber1 joined03:13
eatnumber1 hey, I used git reset HEAD^^^ to move back in the commits, but I realized I did something wrong... how do I get back to the original head03:14
?03:14
iabervon git reflog will show you.03:15
nashdj left03:15
eatnumber1 what do I do with reflog's output?03:15
mugwump nzkoz: essentially03:15
nzkoz mugwump: so without some kind of git core 'this changeset is equivalent to that changeset' you'll never be able to share the repositories?03:16
mugwump they won't get merge issues in many simple cases03:16
there is the patch ID03:16
iabervon If you find the point you want on the right side, look at the short hash on the left side, and do "git reset <hash>"03:16
dsaxena joined03:17
_spuk joined03:18
mugwump nzkoz: it would be possible in principle to store the extra information in svn properties when dcommitting, so that the git patch didn't have to be rebased03:19
eatnumber1 ok, I got that fixed, now I want to fix the Author of a change made three commits ago... how would I do that?03:19
mugwump but I think nobody cares enough03:19
iabervon You can only really do it if you haven't published the changes yet.03:20
eatnumber1 iabervon: darn, I published it03:20
mugwump eatnumber1: lots of ways, but to start off with, make a new branch before the commit you made, cherry pick it, fix it up with git commit --amend, and then cherry pick the later ones03:21
eatnumber1 mugwump: how do I make a new branch before the bad commit?03:21
iabervon In that case, people have the history with the author wrong and there's no way to make them forget it.03:21
mugwump eg, git checkout -b tmpbranch HEAD~303:21
eatnumber1 iabervon: can I fix it in the repo?03:22
mugwump rebasing public history is considered antisocial on many projects, but it is fine - people tracking your repo will have to rebase though03:22
nzkoz mugwump: cheers, I thought as much. it'd be a neat feature, but definitely can see how my perspective is a little niche here03:23
mugwump yeah03:23
eatnumber1 mugwump: how do I cherry pick the changes?03:23
mugwump Did you see the git-svnserver GSoC project?03:23
eatnumber1: in gitk, right-click and select "cherry-pick this commit"03:23
or run git-cherry-pick03:23
actually you can do everything I've said in git-gui and gitk03:24
nzkoz: http://utsl.gen.nz/git/git-svnserver.txt03:24
The student didn't get the funding and tailed off03:24
nzkoz mugwump: are you sam or pointing me at his stuff?03:24
samsarin left03:24
mugwump sam i am03:24
nzkoz hey03:25
iabervon The easy way to generate the new history is "git rebase -i HEAD^^^^", say you want to edit the one you want to edit.03:25
mugwump sunny day out huh? :)03:25
nzkoz yeah, got a server to migrate :/ dog to walk soon though03:25
exercise will be mine!03:25
eatnumber1 iabervon: is that directed at me?03:25
iabervon eatnumber1: yeah.03:25
tarrybon1 left03:26
iabervon There isn't really a central location in which you could change the history, and everything in git is checksummed such that you can't change it silently anyway, but if you can convince people to jump onto the new history from the old history, it's possible.03:27
eatnumber1 iabervon: eh, it's not really worth it... oh well, root is now a contributor to zen-sources =)03:28
iabervon IIRC, there's a file of "this address really belongs to this other person", if it's root@somewhere distinctive.03:29
eatnumber1 ah, ok03:30
that works then03:30
eatnumber1 left03:32
tongueroo joined03:35
winter-mute joined03:36
iabervon Stuff going into -mm gets kind of shredded, it seems.03:42
KirinDave joined03:45
tarrybon1 joined03:47
dsaxena_ joined03:47
dsaxena left03:47
bdiego left03:50
sgrimm left03:59
KirinDave left04:01
tarrybone left04:03
tarrybon1tarrybone04:03
tongueroo_ joined04:05
tongueroo left04:06
z3ro joined04:06
tongueroo_ left04:06
rjent left04:08
rjent joined04:08
rjent left04:32
tsc_ left04:37
tchan joined04:44
priidu_ joined04:52
pedro_mg left05:12
CIA-5 joined05:12
iabervon left05:23
kukks left05:24
rkaway joined05:29
tsc_ joined05:35
tsc_ left05:36
_spuk left05:38
Luniv left05:55
tongueroo joined06:03
tarrybon1 joined06:12
eatnumber1 joined06:23
tarrybone left06:23
eatnumber1 how do I find out what commits modify a particular file?06:23
DrNick git log -- path/to/file06:26
eatnumber1 thanks06:26
mithro joined06:33
orospakr_ joined06:34
orospakr_ left06:34
Ademan joined06:35
janm joined06:46
GyrosGeier left06:47
priidu_ left06:50
z3ro if a merge failed, and I don't want to resolve it right now, whats the correct way to "abort" the merge?07:00
I think last time I used git reset --hard HEAD~1 it messed up some other commits too07:00
and I lost some history.07:00
tchan left07:01
z3ro hmm nevermind; "git reset; git checkout -f" did it.07:03
theCarpenter left07:04
kahmalo joined07:04
tchan joined07:05
kahmalo With what precision does Git store commit times? Is it one second?07:05
and authorship times07:05
Just wondering as I got 9:00:00 exact and am curious of whether there is a nonzero milliseconds field.07:07
sgrimm joined07:09
sgrimm left07:31
kmap joined07:34
tarrybon1 left07:39
tarrybone joined07:42
shahid21st joined07:56
aroben joined07:59
tarrybone left08:01
jerbear joined08:10
tarrybone joined08:13
Ryback_ left08:14
tongueroo left08:20
tongueroo joined08:20
tongueroo left08:21
anttih joined08:22
shahid21st hi everybody....08:27
I am facing a silly problem..hope you people can help.....08:27
i have done some changes in two fiels......and then added by git add08:28
so the git status shows to modified files to commit....08:28
now I want to revert the changes of one file while keeping the changes of the other intact....08:28
How can I do it?08:28
gitster "git checkout HEAD the-file-with-unwanted-changes"08:30
kahmalo git gui also has a way to do this08:30
jerbear left08:31
shahid21st "git checkout HEAD the-file-with-unwanted-changes" - does it mean to revert the-file-with-unwanted-changes to HEAD?08:31
gitster "check out the-file-with-unwanted-changes from the HEAD", which means it lets you to discard the changes you made to the work tree and staged to the index with the previous "git add".08:34
If it is a new file, then "git rm the-file-I-did-not-want-to-have" will remove it from the work tree and the index.08:34
madewokherd left08:35
kmap left08:36
kahmalo man git-config says that branch.autosetupmerge defaults to false; but builtin-branch.c has branch_track = 1 by default. Bug?08:38
shahid21st <gister> i changed in my test repo: a file named b.txt then add it via git add. then running - "git checkout head b.txt" shows this error message:08:40
kahmalo I don't have that option in .git/config but git branch creates a [branch "foo"] section there even without --track. Not without --no-track though.08:40
shahid21st oh sorry ..its working08:40
kahmalo I mean, not with --no-track.08:40
shahid21st <gitster> thanks08:40
I typed head instead of HEAD....08:41
kmap joined08:42
kahmalo And actually I meant git checkout rather than git branch....08:42
shahid21st left08:44
kahmalo Although it works the same with git branch too.08:48
Ademan left08:49
kmap left08:57
kmap joined08:57
diacritical joined09:05
yorgen15 left09:06
mgrimes joined09:06
diacritical hg-to-git.py fails on corecode's fromcvs hg repo atm09:06
cmarcelo left09:14
nashdj joined09:16
nzkoz left09:18
yorgen15 joined09:20
xaiki joined09:38
diacritical left09:40
Leonidas joined09:42
robbat2 joined09:46
robbat2 if I have a repo that uses 'alternates', how can I convert it to one that doesn't use alternates (I want to get rid of the old one)09:47
Pieter perhaps just clone it?09:49
robbat2 cloneing preserves the alternate file, and it still references the old location09:49
kahmalo I suppose you could copy all the objects from the alternate repository and then prune the unneeded ones. If the file names match then the contents should match as well.09:50
Packing the alternate repository first might make this easier.09:51
Dodji joined10:01
Ademan joined10:04
alley_cat joined10:04
Luniv joined10:09
xaiki left10:10
xaiki_ joined10:10
ponch_ joined10:22
mgrimes left10:37
aroben_ joined10:39
aroben__ joined10:44
aroben left10:45
aroben__aroben10:45
aroben_ left10:46
Luniv left10:48
siprbaum joined10:55
Oejet joined10:57
Eludias joined10:59
Sho_ joined11:01
devogon joined11:03
iXce`iXce11:10
anttih left11:18
aroben_ joined11:20
Eludias_ joined11:20
Eludias left11:22
aroben left11:32
aroben joined11:35
Yuuhi joined11:36
Leonidas_ joined11:42
Leonidas left11:42
Leonidas_Leonidas11:42
aroben_ left11:50
anttih joined11:50
aroben left11:56
xTs joined11:58
xTs Hi11:58
I did a pull on a repo and i see that some files get downloaded but nothing gets updated11:58
i just get: foo/bar.c: needs update11:59
and 'foo/foobar.c' not uptodate. Cannot merge11:59
what am I doing wrong?11:59
capisce looks like you have modified files in your working directory12:01
either commit them before pulling, or revert them12:02
xTs oh, yes, forget that i had changed some things.12:02
thanks12:02
and how can i solve conflicts? git merge?12:03
aroben joined12:04
capisce pull alredy does a merge12:05
xTs yes, but i got a conflict12:05
capisce if you have a conflict you can reset to HEAD to undo the merge, or edit the conflicting files and add and commit them12:05
xTs ah, ok12:05
robbat2robbat2|na12:09
anttih left12:37
ferdy joined12:40
Mikachu joined12:45
ferdy left12:54
bentob0x joined12:54
ferdy joined12:55
yorgen15 left13:03
Phoop joined13:04
nessundorma joined13:15
robewald|home joined13:15
yann joined13:21
Phoop left13:29
nashdj left13:37
meandtheshell joined13:55
bobesponja joined14:00
spuk left14:01
ruphy left14:14
ricky joined14:18
kukks joined14:29
nashdj joined14:31
bdiego joined15:04
priidu joined15:05
aroben left15:06
chris2 joined15:10
heipei bc15:15
oops ;)15:15
xTs left15:17
nashdj left15:21
fobos left15:22
nud joined15:29
chris2 left15:30
chris2 joined15:31
ruphy joined15:34
_spuk joined15:59
chris2 left16:01
telmich joined16:02
telmich good evening16:02
Strogg you have a strange definition of 'good'16:03
heipei hi telmich16:03
bdiego__ joined16:15
kukks left16:16
madewokherd joined16:25
kukks joined16:25
bdiego left16:29
bdiego__bdiego16:29
ruskie joined16:42
sgbirch joined16:42
pcapriotti_ joined16:43
KillerFox joined16:43
KillerFox hello16:44
pcapriotti_pcapriotti16:44
Mikachu hi16:44
ruphy-lapdog joined16:44
KillerFox is there a way to merge two different git repositories together?16:45
i've to two projects which startet at it's own repos and now I like to merge them together with all commits16:45
s/startet/started/16:45
kahmalo I should think it's possible16:48
first you should fetch both series of commits to the same repository16:49
Strogg you know.. git-svn is pretty damn hot.16:49
KillerFox Strogg: well it still is, but it's a pain if you _must_ set Id fields (as a policy)16:50
Luniv joined16:50
Strogg I could understand that.16:50
KillerFox kahmalo: so I must start over a new repo and fetch all commits into that repo?16:51
corecode KillerFox: you can simply merge them and create a repo with two roots16:52
KillerFox: if that is what you want16:52
kahmalo git-merge seems happy to merge without a common parent, at least when there are no conflicting files16:52
KillerFox: do you have many branches in those two repositories?16:53
Ryback_ joined16:54
KillerFox kahmalo: no, they are all master branches, currently16:55
kahmalo KillerFox: I tried this here with two repositories16:56
fetched the head of one into another: git fetch ../joae HEAD16:56
then made a branch for that: git branch hips FETCH_HEAD16:56
and merged it in: git merge hips16:56
though it'd work without a branch as well, I suppose16:56
git fetch displayed "warning: no common commits"16:57
Mikachu KillerFox: ot, urxvt 8.7 is out :)16:57
KillerFox kahmalo: thank you, I'll try that.16:59
Mikachu: heh16:59
ruphy left17:01
priidu left17:05
chris2 joined17:06
yashi joined17:09
lu_zero joined17:28
cmarcelo joined17:30
kmap left17:39
kmap joined17:40
kmap left17:41
kmap joined17:41
ruphy-lapdoog joined17:43
pcapriotti_ joined17:44
nessundorma left17:45
robbat2|narobbat217:46
tango_ joined17:46
tango_ hello all. is there a git command to *copy* a file, so that git knows that the next commit of the file can delta from the other one? something like git mv, but actually a git cp17:47
Ilari tango_: Just copy the file and add the copy.17:47
albertito tango_: git doesn't record the cp, but uses heuristics to detect it. Just use cp and add, and then git log -p -C and you'll see git noticed the copy17:48
Ilari tango_: git mv is actually pretty much is 'git rm --cached', 'mv' and 'git add' combo...17:48
tango_ ah ok. even if the first checkin is a modified version?17:48
albertito tango_: it's an important design choice, you can find information about the rationale behind it on the wiki, if you're interested17:48
tango_ or should I cp, git add, commit, edit, commit again?17:49
I mean, can I do cp, edit, git add & commit, or should I do cp, git add & commit, edit, commit ?17:49
eatnumber1 left17:49
albertito tango_: if it's not completely modified, it will notice a close-to-100% similarity between the files, and notice it too17:49
tango_ ok17:50
albertito tango_: it actually tells you the "similarity index" of the file. Try doing it and see what git log -p -C shows you. If you're unhappy, you can always use git reset to go back as nothing happened =)17:50
tango_ ok thanks 8)17:51
doener tango_: git doesn't care at all _how_ the contents came to be. It just looks at the content itself.17:51
thus it doesn't have to record a cp/mv at all, but just figures it out from the content17:51
kmap left17:52
kmap joined17:52
yashi left17:53
kmap left17:54
kmap joined17:55
pombreda joined17:57
robbat2 left17:57
tango_ ah, seems to think it's a new file 8P17:57
ruphy-lapdog left17:59
pcapriotti left17:59
albertito tango_: use -C18:07
tango_: that enables the "cp detection"18:07
tango_: for mv, use -M, which enables "mv detection"18:07
tango_ I did use -C18:08
it still diffs affine_prepare.cpp against /dev/null instead of affine_knee.cpp as it should be18:08
Eludias_ left18:15
albertito tango_: using git diff or git log?18:16
tango_ git log -1 -p -C18:16
albertito tango_: because you're limiting it to show only one commit, git doesn't compare the files against the previous commit. Use -218:17
tango_ albertito, same thing18:17
albertito tango_: (btw, "git log -1 -p" is quite like "git show")18:18
tango_: ok, let me try18:18
tango_: sorry, it's my fault. It should have been "git log -p -C -C"18:20
tango_ ah18:20
bingo18:20
8)18:20
davi left18:20
tango_ why two?18:20
albertito tango_: see git-diff-tree --help: "For performance reasons, by default, -C option finds copies only if the original file of the copy was modified"18:20
tango_ 'try harder' ?18:20
ah ok18:21
fhobia joined18:21
albertito tango_: using two -Cs makes it try harder18:21
tango_ ok18:21
albertito (it's "was modified in the same commit", forgot to copy the last part)18:22
tango_ I see. -C only checks against other modified files, whereas -C -C checks against all other files in the tree, which is way more expensive. makes snese18:22
albertito tango_: exactly =)18:22
tango_ thanks 8)18:22
albertito tango_: it's not _that_ expensive to check for 100% similarity18:23
tango_ well depends how many files you have 8)18:23
albertito tango_: it's more expensive to check for cp+edit18:23
tango_: yes, but, as you said, it depends on that. As git already has sha1s, it's pretty much comparing the (already calculated) sha1 of the files in the tree18:24
tango_ ah right18:24
albertito tango_: which is not as expensive as doing a (tricky and very optimized, but expensive still) content compare to extract a similarity index18:25
jerbear joined18:28
jerbear left18:33
ferdy left18:33
jkimball4 joined18:44
dfa_ joined18:47
dfa_ left18:49
kmap left18:54
drizzd joined18:54
robinr joined19:04
drizzd_ left19:07
Helios- joined19:07
_spuk_ joined19:15
meandtheshell left19:20
sgrimm joined19:21
ponch_ left19:23
_spuk left19:29
ferdy joined19:30
aroben joined19:45
ruphy-lapdoog left20:04
janm left20:08
janm joined20:14
Ingmar joined20:15
FransE joined20:15
nessundorma joined20:16
Oejet left20:27
Randal Hmm. git.git's Makefile uses $(SCRIPT_PERL), but Documentation/Makefile uses just a PATH-based "perl"20:38
that's not good20:38
Randal submits a but report to the mailing list20:40
Randal or even a bug report :)20:41
pigeon joined20:46
FransE_ joined20:47
tango_ left20:48
jartz_ joined20:49
jartz__ joined20:50
jartz left20:56
csc` joined20:57
jartz_ left20:58
pigeon_ joined20:59
FransE left21:04
meandtheshell joined21:05
rtmfd joined21:06
sgbirch left21:08
pigeon__ joined21:09
pigeon left21:09
pigeon__pigeon21:09
ibid a but report seems to me an applicable term21:11
male joined21:16
pigeon__ joined21:19
Randal is the git.git maint branch generally safer?21:20
how does it differ from master?21:20
mithraic left21:21
pigeon_ left21:21
chrizz- Randal: check http://marc.info/?l=git&m=119569175608108&w=221:22
Randal [reading21:22
Hmm. so maybe I want to track maint on my more conservative machine21:23
pigeon left21:24
bdiego left21:24
pigeon joined21:29
ribas joined21:30
aroben left21:32
robewald|home left21:35
FransE_ left21:38
Leonidas left21:40
pigeon__ left21:41
redondos_ joined21:44
aroben joined21:45
redondos_redondos21:49
pigeon left21:54
pigeon joined21:57
ebel joined22:02
gitster I am not so sure about that --- I do not know of anybody who actively fixes bugs that follow 'maint', but they tend to be running something closer to 'master' (and their fix are more applicable to 'master').22:15
'maint' is more for people who for some unknown reason prefer to have named releases ;-)22:15
sdh left22:17
devogon left22:17
ndim $ git status22:19
fatal: Not a git repository22:19
$ git diff22:20
$ echo $?22:20
022:20
Mikachu is this a bug?22:20
cd git; touch v1.5.3.6; git-show v1.5.3.622:20
ndim Is this intentional?22:20
Mikachu fatal: ambiguous argument 'v1.5.3.6': both revision and filename22:20
Use '--' to separate filenames from revisions22:21
jkimball4 left22:21
Mikachu oh okay, you can just say -- after without any filenames and it'll know it's a tag22:21
that is sort of a crazy syntax though22:21
ndim Mikachu: Unusual.22:21
Mikachu you usually only need -- for the things that come after it22:21
mugwump -- denotes that all switches came before it22:25
pigeon left22:25
mugwump and arguments follow22:25
nessundorma left22:25
Mikachu i always thought of it as "only filenames follow"22:25
for example you can say ls file1 -l -- file2 -h22:25
and it will give you a detailed listing of file1 file2 and -h22:26
mugwump yeah. you're right, but I've also seen it used to denote the end of a list as well22:28
Mikachu i guess it doesn't happen very often that someone creates a tag with the name of a file22:28
mugwump there was a patch for that today actually :)22:29
Randal or a file with the name of a tag. :)22:29
Mikachu i like to put my list of configure options in a tag for some programs though22:29
Randal: i guess one advantage of using maint over next is that git-cherry-pick doesn't crash and git-tag -s works22:32
csc` left22:33
FransE_ joined22:34
FransE_ left22:35
kahmalo left22:38
gitster Huh?22:43
"--" denotes all revs came before it; pathspecs may follow but do not have to (i.e. can be empty).22:45
Mikachu still, it's weird that -- changes the meaning of what came before it, i've never seen that in any other app22:51
just saying it's a bit surprising22:52
gitster Well, get used to it and thank that Linus did not pick anything more esoteric, say "----" ;-)22:55
KillerFox left22:55
Mikachu heh22:55
Randal -[]- :)22:56
gitster Sounds good and much easier to type than "--" ;-)22:56
aroben left22:57
Ilari Maybe not on keyboard layout I have... That would be -, ALTGR+8, ALTGR+9, -...22:58
Mikachu in a way ---- would be better since then i wouldn't confuse it with the usual meaning of -- :)22:58
gitster Mikachu: about the "cherry-pick" thing, my understanding is that it happens only when you revert/cherry-pick an annotated tag. Is that correct?22:59
IOW, you would not see the issue if you did "git cherry-pick foo^0" instead of just "foo".22:59
Mikachu i'm not sure, i only saved the test case that crashed for me22:59
bentob0x left22:59
Mikachu i will compile the version without my patch and try23:00
is that what you're seeing?23:00
gitster I think a proper fix is to just remove the whole "if (needed_deref) { ... }" thing, and I vaguely recall suggesting that to you already.23:01
Mikachu well, i'm not so comfortable editing the code as i have no idea what most of it does23:01
gitster Will prepare a patch to 'master'.23:02
Mikachu btw does 'git-tag -s foobar' work for you? here it just creates an unannotated tag23:03
GyrosGeier joined23:03
Mikachu -a does pop up the editor though23:03
aha, -a -s works23:03
(but surely that's not intended?)23:04
alley_cat left23:04
gitster Gaah, thanks for telling me offline. This should have been brought up on the list much earlier.23:05
Mikachu i just cherry picked an annotated, unsigned tag and it didn't crash23:05
was that ironic or not? :)23:05
gitster It is not ironic nor non-ironic because I do not know what you are talking about, sorry.23:06
The "crashing" example you had, what was the command line?23:06
Mikachu okay, we are probably equally confused then23:06
gitster "git cherry-pick XXXX" what was XXXX?23:06
Mikachu override_events_223:06
gitster which is? A tag? The name of a working tree file? A branch?23:07
mugwump gitk frequently gives me an apparently harmess dialogue when I cherry pick23:09
Mikachu sigh, i'm so stupid23:09
i forgot the ./ when i ran git-tag23:09
i mean cherry pick23:09
gitster The parse-options conversion surely look wrong.23:10
It lost that "-s implies -a" bit. The fix should be trivial.23:10
I wonder why our testsuite did not catch it.23:10
Mikachu git cherry-pick indeed crashes on my test created annotated tag23:10
gitster I know. That's what I've been saying.23:10
Mikachu yes, i just wanted to confirm it23:11
because i mistakenly said 5 minutes ago that it didn't :)23:11
pigeon joined23:11
gitster So override_events_2 is an annotated tag?23:11
Mikachu yes23:11
gitster ok, thanks. Then, with a vanilla git, "git cherry-pick override_events_2^0" would not crash.23:11
Mikachu also confirmed23:12
gitster Thanks. I am sending a fix to the list ;-)23:12
Mikachu for some reason i always start making silly mistakes when trying to report bugs, i don't know why, i usually don't :)23:12
aroben joined23:19
gitster Another patch for "git tag -s" sent. Thanks.23:22
janm_ joined23:24
Dodji left23:29
mithraic joined23:34
flaguy joined23:36
janm left23:36
kelvie are git-repacks supposed to be CPU heavy?23:36
it doesn't get really high on top23:36
so I'm assuming the fs syscalls are taking up the cpu23:37
mugwump you can increase --window if you want it to demonstrate its CPU swallowing capabilities23:38
Ilari kelvie: AFAIK, system time is included in process time...23:39
Mikachu i don't think CPU% includes iowait though23:39
kelvie oh hrm23:39
I just don't recall git-repack slowing down my computer at work23:39
this much23:40
so I want to see if I need to switch my filesystem :P23:40
Ilari Mikachu: It does not.23:40
cehteh not enough ram, swapping?23:40
kelvie 2g ram 8g swap?23:40
I think I'm OK :/23:40
mugwump yeah, it can be slow if you've got loads of loose objects and a FS which doesn't handle that23:40
cehteh bit much swap :)23:40
mugwump eg xfs23:40
kelvie hehe I don't wanna repartition in case23:40
Ilari Actually, if system is set up wrong, any kind of actual I/O makes the system really crawl...23:40
kelvie yes I just recently decided to try xfs23:41
mugwump turn on the auto-GC23:41
Mikachu speaking of git-repack, is there a way to exclude duplicated objects from packs in a shared clone? right now i mv the .pack file away, then run git-unpack-objects, and finally git-repack -d23:41
kelvie all my other boxes with reiser/ext3 are fine23:41
cehteh i have xfs too .. no problems with it23:41
kelvie but whenever I write/unlink/read with XFS my computer slows down :/23:41
mugwump cehteh: which kernel version? or on irix?23:41
cehteh x8623:41
priidu_ joined23:42
cehteh laptop dmcrypt partition23:42
not really fast but usually no big performance degrade either23:42
ferdy left23:42
mugwump strange23:42
Ilari kelvie: I have the same problem, but with ReiserFS...23:42
kelvie mm I've never seen this with reiserfs.. perhaps my problem is elsewhere23:42
mugwump Because as far as I've noticed, xfs performance has totally sucked for operations involving lots of files23:42
kelvie same :/23:43
cehteh i dont say that it is blazing fast .. but performance is far from being annoying slow23:43
kelvie well performance was OK23:43
but it slows down my computer :/23:43
Mikachu checking out linux takes some 5 minutes on xfs here23:43
aroben left23:43
cehteh tries23:43
Ilari When the system slows down, iowait is real high...23:43
mugwump yeah I think it must be silly directory locks or something like that23:44
priidu_ left23:44
cehteh mhm git clone --no-hardlinks /usr/src/linux-2.6 ... would a local clone suffice?23:44
kelvie arg next weekend I'll switch back to reiser and see how it goes I guess23:44
priidu_ joined23:44
gitster It was reported some time ago (and Linus was in the discussion) that xfs was slow.23:44
Mikachu my workaround is to have a bare clone of linux on xfs and the workingdir on tmpfs in /tmp23:45
where it takes 5 seconds to checkout all 35000 files23:45
cehteh outch23:45
Mikachu then when i'm done fiddling branches around and merging, i copy a tree back to disk to compile23:45
Bartman007 Mikachu: hooray for kludges!23:46
Mikachu not that i'll be doing that a lot, tried .23 for a month and am back on .19-ck2 now :)23:46
cehteh mhm ok cloning linux is not really fast on my laptop23:46
Mikachu cloning is okay, it's just the checking out bit that's slow23:47
kelvie because xfs is _really_ bad at unlinking?23:47
cehteh thats what i meant .. checkout is part of clone23:47
Mikachu that's true23:47
cehteh yes thats a bad spot of xfs23:47
nud left23:47
Mikachu kelvie: someone told me the other day xfs is slow at all metadata operations23:47
kelvie ugh23:47
I want to find the guy that told me xfs was mature and fast23:48
and choke him23:48
Mikachu essentially reiserfs for many small files and xfs for big files23:48
cehteh how about ext4?23:48
kelvie I can't even shrink it to switch23:48
Mikachu is what he told me23:48
telmich kelvie: xfs is quite mature and fast23:48
engla joined23:48
kelvie except you can't shrink it :/23:48
and unlinking is painfully slow23:48
telmich though it has some quota problems23:48
fhobia left23:48
Mikachu unlinking big files on xfs is much faster than on ext323:48
cehteh real 2m52.753s23:48
telmich kelvie: well, most fs cannot shrink, only grow23:48
compare it to reiser, jfs, ufs, ...23:49
kelvie looking at the gparted list.. most of them can except jfs and xfs23:49
not online of course23:49
telmich well, only ext3 and perhaps ext4 can do, afaik23:49
robinr ntfs, fat23:49
kelvie I'm pretty sure reiser can?23:50
telmich kelvie: well, ext3 is quite robust and is the only fs I would use when wanting to shrink23:50
cehteh heh .. how about reiser4? :) whenever i tried it, i manged to crash it .. but performance before that crash was impressive23:50
telmich kelvie: reiser cannot23:50
tongueroo joined23:50
telmich and ntfs and fat are no posix-fs; and I really wonder, how shrinking fat should work, though it's perhaps just defrag + rewrite partition table23:50
robinr always needs *more* disk space, never less23:50
tongueroo git status | grep 'deleted:' | sed 's/.*deleted:\s+//' , the \s+ regular expression in sed doesnt seem to work...?23:50
telmich I mean, in general all fs _could_ be shrinked, when doing it righn23:51
tongueroo git status | grep 'deleted:' | sed 's/.*deleted:\s//' , \s works though23:51
cehteh with concurrent load reiser4 was up to 2.5 times faster than any other fs ... but it chews lots of CPU too23:51
telmich is a big jfs fan - almost no cpu usage23:51
gitster "git ls-files -d" perhaps?23:51
cehteh maybe an alternative for laptops where cpu saving is good23:52
tongueroo gister: ahhh.. much easier23:52
thanks23:52
Mikachu tongueroo: -r or \+23:52
it defaults to basic rexe23:53
regex*23:53
rtmfd left23:53
robinr telmich: you just mean there is no *known* method of shrinking an XFS fs?23:53
gitster "dump; mkfs; restore"?23:53
flaguy left23:53
robinr no really the same23:54
gitster you get the defragmentation for free ;-)23:54
robinr xfs has a defragmenter23:54
cehteh .. and you should use it, because it fragments23:55
robinr works on mountes fs too23:55
well all file systems fragment their files23:55
kelvie telmich: man resize_reiserfs; you can shrink it :/23:55
geckosenator I would rather have a filesystem with compression23:55
cehteh well more than you would expect23:55
robinr xfs seems better than most at not doing it, but it does happen23:55
cehteh geckosenator: reiser4 \o/23:55
gitster and too slow to be usable to extract linux source? what good is it with bells-and-whistles?23:55
aroben joined23:55
geckosenator cehteh: heh yeah23:56
gitster admits he is not in his best mood.23:56
tongueroo Mikachu: thanks! have been wondering why my sed regex dont work23:56
cehteh anyone knows anything about the fate of Daniel Phillips tux2 (..3?)23:56
tongueroo: locale problem?23:57
Ilari came to conclusion that this system is severly misconfigured... And fixing those practically means reinstalling the whole thing... :-(23:57
cehteh eh .. posix/sed regex dont know \s iirc23:57
tongueroo cehteh: nah, im not to escaping the sed regex properly, 's/\s\+//' instead of 's/\s+//'23:57
telmich robinr: yes23:58
kelvie: uhh, that's new to me23:58
cehteh tongueroo: [::space::]+ (or was it [[:space:]]?)23:58
tongueroo the first one23:58

Logs Search ←Prev date Next date→ Channels Documentation