IRCloggy #git 2008-10-19

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.

2008-10-19

doener johnw: so I'd drop the "to commits" part there, and just say that they're fancy refs00:00
jnareb actually, everything except heads detaches HEAD00:00
johnw doener: noted00:00
offby1 johnw: the diagram on page 11 has commits of different colors, but I can't tell what those colors signify00:00
doener offby1: maybe read the pastebin about HEAD that I made earlier ;-)00:00
Jacolyte joined00:00
jnareb I think when talking about tags (and tag objects are more than 'fancy refs', or 'refs in tags namespace) it is important to tell _why_ we need tags (to tag releases of course)00:00
offby1 doener: huh, ok00:01
jnareb see you later00:01
johnw that's true, the colors shouldn't be different there00:01
jnareb Can someone remove "| http://tinyurl.com/gitsurvey08" from channel description? TIA00:01
jnareb left00:01
vuf hm, which document are you discussing?00:01
Garoth Hey, how do I see what commit introduced some file, or possibly which commits have edited some file?00:01
doener offby1: that (in some way) explains why branches are advanced and tags are not (checking out a tag causes you to get a detached HEAD)00:01
Garoth: git log --diff-filter=A -- file00:02
johnw vuf: http://www.newartisans.com/blog_files/git.from.bottom.up.php00:02
Garoth doener: thanks, that'll do00:02
doener Garoth: --diff-filter=M for modifications, AM for both00:02
Garoth Oh, very cool00:02
doener see the manpage for the other available flags00:02
Garoth Will do.00:03
vuf johnw: okay, thanks ... I read that at one point :)00:03
doener offby1: paste was here http://git.pastebin.com/m6258402f00:03
offby1 yeah, I'm reading it, but I don't see how it relates to the colors in his diagram00:05
cryolab left00:05
doener offby1: uhm, I meant the "difference between branches and tags" thing00:05
offby1: the difference is not that the tag doesn't advance, but that you simply can't checkout the tag, but just the commit it references. And then the "detached HEAD" stuff kicks in00:06
offby1: didn't notice the graph question yet when I wrote that00:07
RaceCondition left00:10
johnw offby1: you're right that the colors don't add anything, they just represent "unmerged branches", hence yellow+blue=green00:10
offby1 <- color-blind00:12
johnw ahhh00:12
offby1 either explain 'em or nix 'em00:12
johnw then you missed the colored text that said "This diagram exists to haunt the comprehension of offby1"00:12
vintrepid joined00:13
offby1 yeah, it was in pink text which I can't see on a white background :)00:13
\ask-_ left00:13
drobbins left00:13
vintrepid left00:14
xenoterracide I do git log filename and it shows me the last log entry about how I moved the file... is there anyway to get all the log history of the file before I moved it?00:16
Garoth Heh.00:17
doener xenoterracide: --follow00:17
xenoterracide thanks00:17
seems I resolved this ones...00:17
ESC[33m but my git log shows a bunch of those00:18
doener probably you have the LESS environment variable set, but without the R flag00:18
reals left00:18
Garoth Is it possible to have a remote that is set up to push to one location, but pull from another?00:19
xenoterracide so it should be -MiR ? :P00:19
doener xenoterracide: if you want that ;-) IIRC FRSX is quite popular, if you care ;-)00:19
xenoterracide I should really spend time looking up what that does00:20
johnw also tree less -r00:21
try00:21
i often use -Mr00:21
doener yeah, -r if you don't want colors, regardless of the git settings00:21
oh wait, -r was "pass through all raw characters"00:22
so forget the color thing...00:22
yofel left00:22
yofel joined00:22
xenoterracide ok now one last question... is there any way to pull the entire history of just this one file into it's own repo? I want share it seperately as sort of it's own project00:22
rdavila joined00:23
doener xenoterracide: clone and filter-branch00:23
Garoth Magical filter-branch :)00:23
doener but it really becomes it's own project then. There won't be common commits between that repo and the original repo anymore00:23
xenoterracide that's fine...00:24
doener s/it's/its/00:24
Garoth Of course, you could then add it as a sub-module, right?00:24
Though I think that forces it to have a folder around it.00:24
kef joined00:25
xenoterracide in theory... might be the thing to do... not sure... I store all my dot files in git repos00:25
SRabbelier left00:25
\ask-_ joined00:25
xenoterracide but I've been making changes to some .vim scripts that appear unmaintained and I figure it's better not to propagate my whole dot_usr direoctory to people who want to know what I've done to 1 script00:26
Garoth Good idea.00:26
Submodules, when I used them, were a bit combersome, but worked well.00:26
If your vim scripts have folders, you could totally do that.00:26
Of course, you could get _really_ hacky and have them have folders and do symbolic links to them.00:27
Anyway, I could be wrong about the folders thing, but I'm pretty sure.00:28
nkallen joined00:28
Gitzilla left00:28
xenoterracide how do you think I make the repo work in the first case?00:28
Garoth Hmm?00:28
Lots of sym links?00:28
xenoterracide I'm sure not going to edit /etc/bashrc to look for .bashrc in .etc/bashrc00:28
nkallen left00:28
Gitzilla joined00:28
xenoterracide so I symlink it00:28
nkallen joined00:28
Garoth Well, idk, you could have put your home dir under git control00:29
And ignored all the non dot files00:29
kumbayo left00:29
Garoth But I think your way is cleaner.00:29
nkallen left00:29
xenoterracide yeah think I tried that... it was a pita00:29
Garoth I once put my home dir under git control... <300:30
It worked great, though I had to commit it in chunks due to memory constraints in with git add00:30
xenoterracide the problem is all those dot files I don't want to track00:30
Garoth Or maybe git commit.00:30
xenoterracide: more entries in .gitignore :)00:30
xenoterracide yeah... like I said... pita00:30
I did it00:30
but I like the .etc and .usr better00:31
Garoth Yeah, it's pretty nifty.00:31
Though... well...00:31
Garoth thinks about it00:31
Garoth ls | grep -v "files you don't want ignored" >> .gitignore00:31
toofishes joined00:32
xenoterracide I don't recall all the issues I had to be honest00:32
repressed memories00:32
Garoth :}00:32
xenoterracide and too many files I want to ignore00:32
Garoth Well, that's not really a problem, but I'm sure you had some legitimate problems00:33
xenoterracide well the problem is figureing out what I want to ignore00:33
it's not a technical issue it's a time/patience one00:33
Garoth "everything except these few files," right?00:33
It's the same as selecting a few files and moving them into an .etc00:33
xenoterracide in a sense00:34
Garoth Anyway, I'm arguing with you about something I shouldn't be arguing with you about ;)00:34
alb joined00:34
xenoterracide lol00:34
Garoth gotta be careful, or I'll become one of those annoying trolls that always tells you to do things better00:34
Yuuhi left00:35
Garoth Oh god, IRC client for Emacs.00:35
Garoth shudders00:35
tvw left00:36
xenoterracide heh00:36
xenoterracide tries to wrap head around filter-branch00:39
Garoth Emacs, like, totally breaks the Unix Way.00:39
j_engelh Emacs is not Unix.00:40
Garoth Which, I guess, is why it does that ;)00:40
JeFeDe left00:40
Garoth But what I'm referring to is the "do one thing and do it well" guideline that I'm rather fond of00:40
xenoterracide emacs seeks to replace unix ;)00:41
it IS the GNU operating system00:41
Garoth You know, rather than "Emacs is my OS and Linux is my device driver"00:41
Yeah.00:41
Eridius left00:41
xenoterracide emacs should only be run on the HURD :P00:41
Garoth GNU has done some good stuff, though.00:42
xenoterracide I hear duke nukem forever runs on the hurd and is written in perl 600:42
Garoth They're a little misguided, but I'm happy with them overall.00:42
;)00:42
Haha, Perl 6.00:42
For the sake of sanity, I pray that Perl 6 happens and is good.00:42
I have to write a lot of hardcore Perl5 code for work.00:42
It does a lot of things really awkwardly.00:43
But, well, most of those problems are solved with "moar evals"00:43
Garoth feels uncomfortable not talking about git00:43
xenoterracide so does anyone have any idea how I would remove all the stuff but this one file and it's history? (note file was moved)00:44
Garoth shuts up.00:44
toofishes xenoterracide: so you want *only* one file00:44
xenoterracide because filter-branch is confusing my brain00:44
yep00:44
just the one00:44
maestrolinux joined00:45
maestrolinux http://s2.ar.bitefight.org/c.php?uid=19732 hello --!!! hola alguien me ayuda con esto00:45
xenoterracide http://github.com/xenoterracide/dot_usr/tree/master/vim/ftplugin/sql/sql_iabbr.vim00:45
Garoth ... is that spam?00:45
xenoterracide that file :P00:45
kinda looks like it but you could redirect him to a spanish channel00:45
Garoth God, if there were spambots for IRC, I'd be up in arms.00:46
xenoterracide um....00:46
Garoth With all the admin possibilities at my disposal, and all the code I could think of.00:47
toofishes xenoterracide: filter-branch definitley takes work00:47
but it is easy to keep retrying until you get it right...00:47
xenoterracide heh00:47
maestrolinux left00:47
lirit left00:47
xenoterracide well --subdirectory would work... except wouldn't that cause problems because I've moved the file?00:48
on the other hand... I haven't had any commits since the move... so why do I care about that00:48
albertito left00:49
Eridius joined00:49
johnw left00:53
jmatthews-out left00:54
jmatthews-out joined00:54
pcapriotti left00:55
reallyidle left00:55
reallyidle joined00:55
xenoterracide %$#@!00:57
Garoth xenoterracide: ? :)00:57
albertito joined00:57
xenoterracide it's annoying me00:57
ok... so what I want to do to hopefully make my life easier is check out the checkout before the move...00:58
then rewrite it to make that directory the root00:58
that should work00:58
problem is when I check it out it tells me I'm on a remote branch00:59
so how do I make that remote branch the local master?01:00
Garoth git branch -M?01:01
offby1 check it out!01:01
offby1 dances to the Tom-Tom club01:01
offby1 git checkout -b master remotes/whatever01:01
's what I'd do01:01
Garoth I'm not entirely sure how you can be on a remote branch.01:01
xenoterracide me either01:01
Garoth I'm guessing it's the local version of a remote branch.01:01
In which case, you can just handle it like any local branch.01:02
and git branch -M it (for move)01:02
and offby1's answer will make sure that it's a local copy of a remote branch01:02
But... as far as I know, you can't _be_ on a remote branch.01:02
But, well, with git... it has so many options, I can never be sure.01:03
xenoterracide well maybe not so much as remote as not in a branch I guess01:05
Garoth are you on "(no branch)"?01:05
xenoterracide yeah01:05
Garoth I think you can still move that, but I haven't tried it.01:05
(git branch -M)01:06
xenoterracide tried git branch -M master and that doesn't work01:06
error: refname refs/heads/HEAD not found01:06
paltman joined01:06
Garoth Why not?01:06
Oh, I see.01:06
xenoterracide: and you got here by checking out some file or whatever?01:07
Do what offby1 said -- instead of whatever you did, use git checkout -b <branchname>01:07
xenoterracide I checked out the last commit before I moved that file01:07
Garoth That'll make a new branch out of whatever, and switch into that rather than (no branch)01:07
^^01:07
git checkout -b <branch> <commit-hash>01:08
if I recall correctly, that works great01:08
xenoterracide yeah got that far... and then I got the rewrite right01:08
but when I tried to move it back to master it screwed up01:08
Garoth say what?01:08
You made a branch, changed it, saved your changes, and then couldn't make it master01:08
p0w3r3d left01:09
paltman left01:09
xenoterracide at least I think I did... hmm... maybe I'm missing a step01:09
alb_ joined01:10
xenoterracide it seems it rewrote master not the branch I'm in01:11
wtf01:11
Garoth hasn't used filter-branch before01:11
Garoth Guess it's the destructive sort because after a filter-branch, the history now has little in common with the parent project01:12
Which I guess, is why you were told to clone first.01:12
But I don't really know.01:12
toofishes so who's knee-deep in git internals here? i know right now the only place pthreads are used is in pack-objects01:13
xenoterracide yeah... I figured that01:13
toofishes and i was curious if there was any other places that might give a big speedup01:13
Garoth Lol, a big speedup for git :D01:13
G_SabinoMullane joined01:13
xenoterracide now I'm getting this... Namespace refs/original/ not empty01:14
how do I fix that?01:14
it's preventing this...01:14
git filter-branch --subdirectory-filter vim/syntax/sql/ -- --all01:14
which should do what I want01:14
Garoth Well, again, no idea, but you could try deleting everthing in refs/original/ :P01:14
marze left01:15
Garoth Mind you, I'm not the right person to be trusting here ;)01:15
xenoterracide well that's not right...01:16
wtf01:16
somehow it took me back so the only history was of the file being added01:16
alb left01:17
toofishes Garoth: when that pthreads code went in a year ago, it was a 200% speedup when using multiple cores01:18
so i'd say it was worth it01:18
*when using 2 cores01:18
Garoth I'm just having a chuckle because Git's already so damn fast. I don't really know anything about anything, as usual :)01:19
alb joined01:20
lolage0 left01:21
xenoterracide I've seen times where it's not01:22
at least on certain functions01:22
I added an image once that really screwed up the performance of git gc01:22
doener xenoterracide: that might have been caused by unreferenced objects as well. It unpacks these, which isn't _that_ fast, and there was a memory leak in that code path, which could get quite bad (fix will be in 1.6.0.3 it seems)01:24
Zimm left01:24
paltman joined01:27
Garoth So, is there a way to set up a remote to pull from one place and push to another?01:28
xenoterracide how do I see more info about which files changed in git log?01:28
Garoth What constitutes "more info"?01:29
albertito left01:29
xenoterracide I just need to know which files were actually changed... in addition to what it shows now01:29
Garoth git log --stat01:29
doener --name-status01:29
--name-only, ...01:30
Garoth doener's ways are better, but, yay mine works too :)01:30
xenoterracide heh01:30
doener just giving additional possibilities ;-) maybe he even likes --stat better ;-)01:30
xenoterracide I was trying --verbose... and that doesn't work :P01:30
Garoth I think git's killer feature is --color :D01:30
git log --stat --color01:31
very pretty01:31
doener try "git log -p --color-words" ;-)01:31
Garoth How... strange01:32
Oh, i get it!01:32
Wow, that's crazy01:32
doener sometimes it's really useful, but sometimes it just sucks01:32
Garoth doener: 0_001:32
doener: can git generate one of those side-by-side diffs?01:33
If you know what I mean.01:34
j_engelh yeah01:34
doener not on its own (or I just don't know how), but there's eg. a script that feeds stuff to vimdiff. And I think someone had a similar script for meld01:34
(or some other tool, I actually don't even know if meld does side-by-side diffs *hides*)01:35
Garoth Yes, meld does.01:36
rmh3093 left01:37
Garoth I personally don't care, but I had a guy complain to me that git doesn't do that for its web interface01:37
(whereas svn does)01:37
parasti left01:37
rmh3093 joined01:37
j_engelh no one needed it so far :p01:39
xenoterracide vimdiff ftw01:39
doener I usually prefer unified diffs, side-by-side diffs just take up so much horizontal space and force more eye movement01:40
xenoterracide he could write it himself :P01:40
alb_ left01:40
xenoterracide ok so I think... that I've properly filtered the repository... how should I check? and the logs don't appear correct so what do I use to fix that?01:41
naoshige joined01:44
naoshige anybody annoyed by vim's .swp files?01:45
xenoterracide lol01:45
naoshige can i just add *.swp to .gitignore?01:45
xenoterracide I think that works01:45
naoshige word01:45
thanks man01:45
Garoth Yes, I add that all the time.01:46
xenoterracide is very annoyed01:51
xenoterracide I'm thinking of just copying the text of the log and say screw the history01:53
it would be easier than filter-branch01:53
jhelwig joined01:54
bwwww joined01:54
Garoth Well, yes, of course :)01:55
vintrepid joined01:56
xenoterracide doesn't help that I'm dead tired now01:57
although if you ask me this documentation could be better and the command could be much more user friendly01:58
jhelwig left01:58
rmh3093 left02:00
deskin joined02:00
jast naoshige, you can configure vim to store swapfiles in a dedicated directory02:00
('directory' setting)02:01
naoshige well02:01
nah02:01
or maybe some day02:02
i dunno, maybe tomorrow02:02
gimmulf joined02:05
selckin joined02:06
rmh3093 joined02:06
G_SabinoMullane left02:06
gimmulf left02:12
rmh3093 left02:12
rmh3093 joined02:13
naoshige left02:15
rmh3093 left02:16
rmh3093 joined02:17
neurodamage joined02:18
neurodamage so I was looking to make a branch again :)02:18
but take an exisiting branch and then upsh the new changes for that branch?02:19
albertito joined02:20
Arafangion joined02:21
Garoth neurodamage: please explain.02:22
Arafangion Looks like git-p4 doesn't use the p4 libraries at all, preferring instead to use the command line applications. (For both git, and p4) - which explains the nature of some of the issues it has.02:23
p0w3r3d joined02:26
alb left02:35
jmrodri-gone left02:36
alb joined02:36
limux left02:36
FunkeeMonk joined02:38
deskin left02:43
toofishes so please tell me i'm not crazy, and i've always found the git-format-patch rev specifiers odd, but how can i turn a single commit (that isn't the head revision) into a formatted patch?02:45
e.g. i know the sha1 sum02:45
is this really the easiest way? $ git format-patch 0344fc303204~1..0344fc30320402:46
doener git format-patch 0344fc3^!02:47
c^! means c but none of its parents02:50
eMBee left02:50
alb_ joined02:50
eMBee joined02:50
cedricv joined02:50
albertito left02:55
albertito joined02:56
alb left02:57
toofishes doener: well that makes sense.02:57
buried pretty deep in the rev-parse manpage, thats for sure.02:58
doener format-patch either takes a starting point or a range. So "format-patch foo" == "format-patch foo..HEAD", that's probably where most confusion about it comes from02:58
toofishes yeah, that wasn't the part i didn'tk now02:59
i just had no idea how to easily give a single-commit range02:59
elliottcable left02:59
jackdempsey joined02:59
toofishes 1 of 2 things would make sense here- either add some sort of '--single' option to format-patch (seems too much), or just note the '^!' syntax in the format-patch manpage03:00
you think the second idea makes sense?03:00
elmex left03:00
eternaleye left03:01
elmex joined03:02
madewokherd left03:02
madewokherd joined03:02
Marmouset joined03:12
rdavila left03:14
alb_ left03:15
alb joined03:22
jackdempsey left03:27
jackdempsey joined03:29
brendon joined03:30
deskin joined03:33
stouset joined03:35
stouset left03:36
albertito left03:39
deskin left03:39
vintrepid left03:40
bwwww left03:41
brendon left03:43
deskin joined03:43
jesselucas_ joined03:47
jackdempsey left03:47
jesselucas_ left03:48
elliottcable joined03:53
mankind_tweezer joined03:54
ereslibre left03:55
EiNZTEiN joined03:57
deskin left04:01
jesselucas_ joined04:05
EiNZTEiN left04:06
paltman_ joined04:06
jackdempsey joined04:08
tjafk2 joined04:10
MaddHatter I think I've used C~1..C to specify a single-commit range before04:10
j_engelh C^..C is shorter!04:10
(and C^! even more)04:10
paltman left04:13
MaddHatter I avoid ^ as much as possible because I use git sometimes on Winows04:15
j_engelh and? ^ is really inert on windows04:15
offby1 it's especially pointy there04:16
EiNZTEiN joined04:16
MaddHatter ^ is to Windows what \ is to *nix04:16
j_engelh orly04:16
no wai04:16
MaddHatter so you end up doing stuff like C^^^^ to get C^04:16
j_engelh why if you use bash it will be fine04:17
clairvy joined04:22
cedric_ joined04:25
tjafk1 left04:26
paltman joined04:31
tk81 joined04:31
jesselucas_ if I'm trying to setup a post-update hook to push to a mirrored remote. Would it just be exec git push NAME_OF_MIRROR_REPO ?04:32
tk81 hey all, i was wondering if revisions in git are treated more like SVN or CVS?04:32
is it by file, or by directory?04:32
err.. by repository*04:32
j_engelh tk81: neither.04:32
jesselucas_ I believe it's by content04:32
tk81 what is by content?04:33
j_engelh well, what's "by file"/"by directory"?04:33
cedricv left04:34
MaddHatter the commit id ("revision" if you like) is the sha1 of the commit itself04:34
kukks left04:34
MaddHatter git is not centralized like CVS and SVN, so you can't use a monotonically increasing serial number04:34
tk81 maddhatter: ok I understand. Im assuming though its easy to see the id's in a descending order in the master copy though, correct?04:35
MaddHatter I think you mean like "git log" or "git whatchanged" so try those04:36
offby1 define "descending" :)04:36
Arafangion MaddHatter: There was discussion on the mailing list about using one anyway, iff you centralise it, utilize various hooks, and otherwise restrict it, etc.04:36
offby1 seriously: I'm pretty sure you can sort 'em by date04:36
tk81 well by date in respect to when changes were made in the master copy. but i bet thats what git log or git whatechanged does04:37
MaddHatter ah. I sorta gave up on the mailing list. I just don't have enough time to read it all. But I'm surprised people like Linus wouldn't be strenously opposed to that idea.04:37
ned left04:38
MaddHatter tk81: git doesn't have a "master copy"04:38
paltman_ left04:38
tk81 eh. origin i think its called04:38
MaddHatter but you can see the changes in order for any repository04:38
origin is just where you cloned from04:38
tk81 first origin ?04:38
MaddHatter which could be a "central" repo, a coworker, etc.04:38
tk81 Dad?04:38
central. got it04:38
Arafangion MaddHatter: The issue is that having such numbering is actually a checkbox requirement in some environments.04:39
MaddHatter It would only be central because you made it that way though, not because git did04:39
offby1 silliness04:39
those environments deserve to fail04:39
tk81 yeah i understand that04:39
thanks guys04:39
MaddHatter You could use tags + a hook to achieve that functionality04:41
tk81 One more question. When you have, lets say, customer apps and company apps, would you be better off splitting that into two repositories or one repository?04:41
I am asking this because I would imagine you need to clone the entire repository in order to check something out on a customer server, giviing them the company data as well04:42
MaddHatter is one repository per app not possible?04:42
rajiv left04:42
tk81 it is possible since i havent started anything04:42
so yes04:42
ill do that04:42
MaddHatter that's sort of a shot in the dark. Naturally what's best in your environment depends on lots of details we don't know.04:43
Arafangion tk81: For git, I'd use one repo per application/library, unless you want to track movement of code from one project to another.04:43
tk81 and does git have some kind of 3rd party support for nicely colored diff emails?04:43
Arafangion tk81: ie, suppose you have three distinct repositories, for projects A, B, and libC, using separate repos doesn't really let you track movement of code from B into libC.04:44
tk81: But arguably having separate repos entirely would help clarify the project boundaries.04:44
madewokherd left04:44
tk81 Arafangion: I see what you are saying, and thats usaully why I like to use one repository, but the other features such as the branching and merging beat SVN in entirety so ill think ill have to make that sacrafice04:45
is their a way to export history in some way to move code into another repository?04:45
Arafangion tk81: I'm still very new to git, but I've noticed that it's much, much easier to create new repos compared to, eg, subversion.04:46
(Especially if you use svn-dav)04:46
tk81 nope, never got that working nicely so i stuck with svn+ssh. but thats off topic04:47
Arafangion tk81: I think you could make each repo contain remote tracking branches to the other repos, but I'm not sure.04:48
tk81 hmm.. i guess you cant lock files in git because of its distrubted nature04:48
Arafangion Why would you want to lock files, anyway?04:49
MaddHatter why would you need to lock files in git?04:49
tk81 but i guess you dont need to either because of its distrubuted nature.04:49
Arafangion Why would you even want to lock files in any other RCS system.04:49
tk81 eh. i never used it.. just knew it was there04:49
j_engelh see04:49
MaddHatter If you're storing, e.g. Word documents, in the repository, it can be nice to serialize the changes04:49
because it's so hard to merge them after-the-fact04:49
j_engelh well word is stupid04:50
use something, eh well, xml/tex based04:50
MaddHatter it's the same for any other binary type of file04:50
j_engelh well it is serialized actually.04:50
tk81 MaddHatter: is a serialized process flow supported in git?04:50
Arafangion So, you'd see that there is a conflict, so you send of an email to the conflictor to ask them what the heck they're doing?04:50
j_engelh no, you'd just resolve it04:50
tk81 is there*04:51
bobmcw left04:51
MaddHatter the idea would be to avoid doing a bunch of work (before you've already done the work) that will result in a conflict04:51
j_engelh the idea is not to keep the file open needlessy!04:51
because that's lost productivity for every one else...04:52
jackdempsey left04:52
MaddHatter it's lost productivity if you lock it; it's lost productivity if you don't04:52
toss a coin: which is worse04:52
tk81: no. But I don't think it's supported in any other VCS either (except RCS and CVS)04:53
Arafangion Files can be locked in VSS, P4, SVN...04:54
MaddHatter didn't realize svn supported that04:55
Arafangion It's a new feature, and allows people to force the lock open.04:55
I don't think anyone uses it, though.04:58
offby1 you'd be surprised05:04
I hear svn is big in Japan^W^W^W big in "corporate environments"05:04
Arafangion is surprised.05:04
Arafangion I thought perforce would've been preferred over svn.05:05
MaddHatter that doesn't surprise me... corporate environments are scared of stuff that's new (i.e. dvcs) and want centralization for backups and such05:05
tk81 isnt SVN big in corporate environments here? the git shift is the new thing05:05
MaddHatter and perforce costs money05:05
j_engelh perforce is also ridiculously fragile05:05
MaddHatter In my world, if you're gonna pay for a VCS, Clearcase seems to be the popular choice05:06
j_engelh the db needs to be rebuild every weekend to keep it in shape05:06
Arafangion j_engelh: I haven't found that.05:06
j_engelh well maybe you did not do as many commits05:06
Arafangion j_engelh: We're on commit 101000+ now, in one of the repos.05:07
bobesponja joined05:07
j_engelh i'm talking about 80 million.05:07
Arafangion Nice. :)05:07
j_engelh no, it really sucks05:07
Arafangion Yeah, that's what I meant (text really is low-bandwidth)05:08
j_engelh it's like it's battling SVN in being the slower one05:08
Arafangion From what I've seen it's damn fast, but maybe the performance does slow down as you get to high numbers of repos (and branches)05:08
j_engelh well, everything that is network-based, and P4 is like that, is slow by definition05:10
Arafangion p4 does like to have a very powerful server.05:10
tk81 when you push a repository, im assuming it still only sends diff's correct?05:10
Arafangion tk81: Perforce, or git?05:11
tk81 git05:11
hence this is git ;)05:11
Arafangion tk81: It only sends compressed changesets, I believe. :)05:12
j_engelh git sends packs05:13
tk81 compressed? nice05:13
j_engelh compressed and deltified05:13
the server only really needs to copy the received pack to disk and update the branch pointer05:14
eno__ joined05:20
eno left05:21
cedric_ j_engelh: deltified against what?05:33
jackdempsey joined05:33
j_engelh itself05:33
cedric_ uh?05:33
Arafangion cedric_: The previous version it applies against.05:33
j_engelh no no05:34
cedric_ Arafangion: that would be the plain changeset then05:34
j_engelh {the first tree is raw, further commits are deltified.} <- and the whole thing is compressed05:34
cedric_ so I wonder what the changeset is deltified ageinst?05:34
j_engelh a single changeset is not05:34
the pack which contains the changesets uses deltas05:34
cedric_ j_engelh: to rebuild the commits in the changeset? right05:35
j_engelh rebuild huh?05:35
commit=changeset, in case you use the BK term "changeset"05:35
git only knows commits and packs..05:35
jackdempsey left05:37
cedric_ hmm yeah, so if i understand correctly it does: <full diff between a and c>, then deltaitifation for a->b b->c, then conpression?05:37
j_engelh i do not think git uses diffs05:38
tonguero_ joined05:38
cedric_ when i say diff, i mean the changes between a and c, whatever the format used is05:39
toofishes cedric_: the changes are deltified against any other object available in the repository05:39
it really doesn't matter which object that is, whether it be one from the previous commit, or one from 5 years previous05:39
j_engelh usually this is all hidden behind the pack mechanism. period :P05:39
toofishes and then the "tree" or list of files that make up that commit is just another thing that can be deltified, and it would tend to be recorded as a delta from the previous tree.05:40
j_engelh well with normal packs, deltas are within a pack only05:40
only thin packs may have deltas that delta against an object from another pack05:40
toofishes j_engelh: baby steps here :)05:40
cedric_ toofishes: interesting :)05:41
statim left05:42
statim joined05:42
litage left05:45
cedric_ on a completely different subject, do you know how i can change tab width displayed by git diff/log -p ? i've found no related option in git config, nor google05:45
j_engelh cedric_: huh? that would be a feature of your pager05:46
or even your terminal05:46
tk81 left05:46
cedric_ oops, yay, so simple i did not think about it :p05:49
tongueroo left05:53
Jacolyte left05:55
Jacolyte joined05:56
timcharper joined06:00
bgerber left06:02
shweazel joined06:03
paltman left06:03
bgerber joined06:04
bgerber left06:04
shweazel left06:06
kef left06:09
kef joined06:11
malahal_ joined06:16
Arafangion Hey, is it possible to have multiple working directories sharing a single .git repo?06:17
rubydiamond joined06:17
MaddHatter yes... see there's a script for that in contrib, I think06:21
Arafangion Nice.06:23
GNUix joined06:23
malahal left06:32
rubydiamond left06:41
Arafangion Actually, would that mean that one could use a git repo without a local .git?06:43
rubydiamond joined06:45
MaddHatter well, the .git has to be accessible somehow06:46
and I hear weirdness happens if you check out the same branch in both working dirs06:46
Arafangion How so?06:47
Wierd.06:47
That doesn't make sense, I thought that what would happen is that git would get confused /which/ user is accessing it.06:47
Alternatively, how would one setup a git repo such that the 'master server' is /not/ cloned, but rather uses only the head revision.06:48
MaddHatter git doesn't care about users and I don't understand "uses only the head revision"06:49
Arafangion Well, where does git store user.name and user.email?06:49
MaddHatter under ~ somewhere usually06:50
Arafangion Nice.06:50
thiago_home use git-new-workdir06:50
Arafangion 'new is not a command'. Where is it?06:51
tk81 joined06:52
MaddHatter Arafangion: that's the thing under contrib I mentioned earlier06:52
Arafangion MaddHatter: By "only the head revision", I mean only the most recent repository.06:52
only the most recent version, I meant.06:53
thiago_home git new-workdir06:53
tk81 would a xen virutal machine image work well inside a repository?06:53
Arafangion tk81: You're kidding, right?06:53
tk81 or is it not going to diff well?06:53
thiago_home tk81: Git doesn't interfere or help Xen.06:53
but versioning a file that is bound to be gigabytes in size... not a good idea06:53
MaddHatter you can set up a commit hook to reset --hard HEAD so there's always an up-to-date working dir on the server if you wanted06:54
Arafangion MaddHatter: Say, a repo is 1TB, but a particular version of a particular branch is only 45GB if you just grab all of it's files. How would one just check that out, do work against it, and then commit changes back to the server.06:54
tk81 whats the best way to version an entire server06:55
rsync?06:55
thiago_home no06:55
you'd use git on the particular files you want to version06:55
you don't want to version /var/log, for instance06:55
tk81 ok thats doable06:55
MaddHatter Arafangion: you can't do a "shallow" checkout without any history and then commit from it06:55
tk81 thx06:56
MaddHatter or even "shallow" as in only one branch, I think06:56
Arafangion MaddHatter: So, the only possible way would be to have a fast-import tool that does it, sending commits to a staging server that would then make the real commit. Unrealistically complex.06:56
selckin left06:56
MaddHatter I think a 1TB repository is already unrealistically complex06:57
Arafangion MaddHatter: I'm just having a discussion with someone who works in game development, with a 2TB repo.06:57
thiago_home and I think my 900 MB is big06:58
Arafangion MaddHatter: Which to me does scream "Badly organised repo", but anyway. A large amount of that would be binary graphics and sounds, I would imagine.06:58
thiago_home: At work, that's already a single branch in my checkout. ;)06:58
MaddHatter No VCS is going to do "well" with binary files, especially large ones06:58
thiago_home the checkout is 300 MB06:59
the problem isn't the nature of binary06:59
Git will do well with binaries06:59
the problem is whether they are compressible or not06:59
Arafangion MaddHatter: Indeed, but VCS's other than git would at least allow you to only check out the branch you're interested in.06:59
thiago_home Arafangion: with Git you can check out only the branch you want06:59
and clone/pull only that branch too06:59
alreves joined06:59
MaddHatter thiago_home: no, the problem with binaries is that $vcs doesn't know what changed06:59
so a merge is impossible07:00
Arafangion thiago_home: Unlike git, you'd /also/ be able to commit changes, though.07:00
thiago_home MaddHatter: Git doesn't care about what changed, even in text files07:00
Arafangion: and you can commit changes too07:00
Arafangion thiago_home: How?07:00
thiago_home MaddHatter: well, you don't want to do a merge in binaries.07:00
Arafangion: the normal, usual way.07:00
Arafangion: nothing special.07:00
Arafangion thiago_home: Ahh, the way that requires a full clone of the repo?07:00
MaddHatter not being able to merge eliminates most of the usefulness of a vcs07:01
thiago_home Arafangion: no, you can git init, then fetch/pull the branch you want.07:01
MaddHatter this is why people hate CVS and to a lesser extent, SVN. The merging sucks.07:01
thiago_home MaddHatter: you can merge. But you need a tool to do merging.07:01
MaddHatter: Git and other VCS provide one for text files.07:01
MaddHatter: if you want to do it for other types of files, use another tool.07:01
Arafangion perforce (apparently) provides ones for images as well.07:01
MaddHatter so I guess I should say the problem with binaries is that $vcs doesn't provide a merge tool07:02
Arafangion thiago_home: And fetch/pull doesn't pull all the changes in the branches's history?07:02
thiago_home Arafangion: it does07:02
Arafangion thiago_home: Suppose for some reason you had .iso's versioned in the repo. (Yes, this is an EXAMPLE), and you had 100 versions in the repo in a single branch.07:03
thiago_home: How would you grab just hte latest ISO, and commit a new ISO as a change?07:03
MaddHatter the very nature of what you're asking requires a centralized VCS07:04
which git is not07:04
Arafangion MaddHatter: I realise that now, but thiago_home hasn't realised the nature of the question I'm asking.07:05
MaddHatter it is theoretically possible to commit from a no-history checkout when the commit would be a fast-forward on the remote, but I don't believe git offers any support for that07:05
but a merge is not possible without knowing history07:05
thiago_home Arafangion: you wouldn't07:05
you can use --depth when cloning, but that's for all branches07:06
so you want a one-branch repository for which you can clone with --depth=107:06
Arafangion And that wouldn't allow commits, then, would it?07:06
thiago_home it would07:06
I don't know about pushes07:06
Arafangion MaddHatter: Why couldn't it provide a merge? (Obviously, it wouldn't provide the most efficient delta, though).07:07
thiago_home you can use bundle for pushing, though07:07
MaddHatter if you only have two endpoints, you don't know what was changed along each pathway07:08
and so you don't know what was changed by one side or the other07:08
Arafangion So this is an algorithmic issue?07:09
MaddHatter as I understand it, yes07:09
vintrepid joined07:09
MaddHatter thiago_home: are you saying you can pull a branch out of a repository into a new repo, clone it with --depth=1, commit onto the new repo, then rejoin the new repo as a branch back into the old?07:10
thiago_home MaddHatter: I've just checked07:10
you can't push from a shallow clone07:11
but you may be able to use bundle07:11
MaddHatter interesting07:11
tk81 left07:14
cedricv joined07:16
cedric_ left07:19
jm left07:21
cko joined07:21
Jacolyte left07:23
Vortex35 git fsck reports several dangling commits and blobs. Is this critical? I suppose not because i've seen it regularly. But where does it come from?07:23
Arafangion Vortex35: Do you use rebase?07:25
Vortex35 Arafangion: yes, sometimes!07:25
thiago_home or amend?07:25
if so, it's normal by-product of the use of the repository07:26
Vortex35 thiago: i use amend also sometimes.07:26
thiago_home: ok, so it can be safely ignored?07:26
priidu joined07:26
thiago_home yes07:32
Ilari Vortex35: Dangling blobs tend to pop up very often. Dangling commits are sightly less common (but still quite common). And ocassionally one sees dangling trees or tags...07:33
Vortex35: Easiest way to get dangling blob is to stage the same file twice (with some modifications in between) in the same commit cycle...07:34
dramsay left07:35
Ilari Vortex35: 'Dangling object' means object that has no other object or ref pointing into it...07:36
Weaselweb joined07:38
doener Vortex35: if you use "stash" and pop entries or clear the stash, that's probably the fastest way to get dangling commits07:39
jaalto How do I cancel commit SHA1? I removed some files in SHA, and now I want the commit "undone".07:40
doener the other "common" way requires reflog entries to expire and that takes quite a while (90 days?). Though if you regularly rebase/amend, you'll regularly see dangling commits either way07:40
snitko joined07:40
Ilari jaalto: 'git revert <SHA1>' (record new commit which undoes effects of specified commit)?07:41
jaalto Ilari: thanks07:41
doener that adds a revert commit on top though (which is the right thing if you already published the original commit)07:42
other possibilities include commit --amend and reset07:42
quite frankly, your question made no sense to me :-/07:42
Ilari jaalto: If you haven't pushed that commit yet, and there are no merges after it, you could also try 'git rebase -i <SHA>^'.07:42
Weasel[DK] joined07:44
bgerber joined07:53
bobesponja left07:54
timcharper left07:55
advany joined08:00
ph^ joined08:00
robin left08:08
robin joined08:08
clairvy left08:08
tk8 joined08:18
tk8 left08:19
owen1 joined08:21
snitko left08:22
owen1 i started working with git. i commit localy. how do i create a public repository that will serve as backup and allow second dev to clone it?08:23
thiago_home clone08:24
doener either "git clone --bare" or "git init --bare". Then you can start to push stuff to the repo08:24
owen1 thiago_home: doener: don't i need to put my .git folder on a remote server?08:25
CodeOfficer left08:25
thiago_home no08:26
doener owen1: you just create a second, bare repo. That just consists of the .git directory08:26
pcapriotti joined08:26
doener well, the contents of it08:26
kumbayo joined08:26
doener with the "clone" approach, it will be, well, a clone, so there's already content in it. With "init" it will be empty and you need to push there to fill it08:27
"clone" is fine if the public box can connect to your local box and you want it to have all you local branches08:28
if you can't get a connection in that direction, or you want only some of your branches to be in the public repo (eg. just master, but none of your WIP topic branches), you'll need to init the bare repo and then push whatever you want08:29
owen1 doener: i'll try the init approach first. i assume i can also try it on my local machine instead of remote server.08:29
doener sure08:29
Weaselweb left08:30
priidu left08:30
Fullmoon joined08:31
priidu joined08:31
owen1 doener: git init --bare08:33
doener: usage: git-init [-q | --quiet] [--template=<template-directory>] [--shared]08:33
drizzd git --bare init08:33
doener which git version?08:33
owen1 doener: 1.5.4.308:33
doener: (ubuntu 8.04)08:34
doener ah, ok, the "init --bare" version only exists since 1.5.6-rc1. So do as drizzd said08:34
deb08 joined08:40
owen1 doener: git push ~/Desktop/git-test-server/ and i get this: No refs in common and none specified; doing nothing.08:41
deb08 hi, I'm trying to merge without commiting but I don't know how to do that08:41
drizzd git merge --no-commit maybe?08:42
deb08 drizzd: I found that in the doc, but in the last version (which I have) the option is not available08:42
doener owen1: without a refspec, push update only branches that have the same name in both repos08:42
owen1: your bare repo doesn't have any branches yet, so there are no matches08:43
owen1: try "git push <path> <branchname>"08:43
drizzd deb08: the latest version is 1.6.0.208:43
doener owen1: or if that fails, "git push <path> refs/heads/<branchname>:refs/heads/<branchname>", not sure when the "just a branchname" DWIM feature was added to push08:44
owen1 doener: looks good08:44
deb08 drizzd: indeed08:44
owen1 doener: now i am going to test pulling form my 'server'08:44
doener owen1: maybe start with trying to clone ;-)08:45
drizzd actually git merge --no-commit has been in git since version 1.008:45
doener owen1: there won't be anything to fetch/pull yet, as it's all in your "local" repo as well08:45
Fullmoon left08:45
Marmouset left08:45
owen1 doener: ok, i'll try to clone..08:46
deb08 drizzd: http://paste.debian.net/19545/08:47
doener deb08: well, that seems more like a CLI quick help inaccuracy08:47
deb08: did you actually just try to use --no-commit?08:47
deb08 doener: yes of course. I did git merge --no-commit mybranch08:48
and then did git log08:48
and all the commits of the other branch were in my master, commited08:48
doener then it was a fast-forward08:48
deb08 yes08:48
it displayed fast forward08:48
doener there simply is nothing to commit in that case08:48
deb08 oO08:48
doener fast-forward means that the branch head is simply updated to reference a newer commit08:49
drizzd there is --no-ff though08:49
owen1 doener: cool. worked. so first i clone, and than pull (a la check out)?08:49
doener say you have this history: A-B-C-D-E-F. "master" is at C, "foo" is at F08:49
drizzd not sure how that's useful though08:50
deb08 I don't really understant (I'm new to git) but what I needed, is to merge the branch into my master, no commit, because I need to do merge diff to see the difference AND THEN commit if all is ok08:50
doener then to integrate the changes from foo into master, you can simply say that master now points at F08:50
thiago_home deb08: you can look at the diff after the commit08:50
doener deb08: you could just do "git diff master...foo" beforehand08:50
thiago_home: fast-forward case08:51
thiago_home yep08:51
RaceCondition joined08:51
thiago_home git diff ORIG_HEAD08:51
drizzd git log -p foo should be more useful than the plain diff anyways08:51
deb08 doener: this is exactly my case08:51
so I do the diff before, then merge.08:52
doener thiago_home: does merge set that? Anyway, I just tripped over your "after the commit", as there is no commit happening ;-)08:52
charon joined08:52
doener owen1: pull is fetch+merge, has nothing to do with checkout08:52
deb08 there is no way to have the merge into my master without commit, as if I edited the files by hand ?08:52
it's the --no-ff ?08:52
thiago_home doener: it sets that, yes08:53
drizzd --no-ff --no-commit might do it08:53
thiago_home "after the marge"08:53
doener deb08: --no-ff will avoid the fast-forward and instead create a (in general) pretty useless merge commit08:53
arelius left08:53
deb08 ok08:53
thiago_home deb08: squash08:53
drizzd but a git diff then will show exactly the same as the commands already suggested08:53
deb08 yeah08:53
owen1 doener: so what is checkout in the git world?08:54
thiago_home what are you trying to do anyways?08:54
d0k joined08:54
deb08 I'm switching from svn to git, that's why I need those extra (unecessary) steps :)08:54
I'll try what you said guys, thanks for the tips08:54
gimmulf joined08:54
thiago_home forget your svn bad habits08:55
what is your goal? Your objective?08:55
doener owen1: with checkout you, well, checkout a branch (or a commit)08:55
reallyidle owen1: checking out a branch is, in essence, switching to that branch, it does _not_ involve any network08:56
reallyidleidletask08:56
doener owen1: "pull" is fetch+merge. It fetches new stuff from a repo and merges it into your current branch.08:56
owen1: so for "pull" to do anything, you need some new commits in the repo from which you pull, ie. some that aren't in your current branch already08:57
owen1: you can eg. add a new commit in your original repo, push that to the bare one, and then pull in your new clone08:57
deb08 owen1: drizzd: git merge --no-ff --no-commit did exactly what I need, thanks :)08:58
gimmulf left08:59
owen1 doener: got it. so pull is similar to checkout + merge in svn terminology.09:00
Ilari deb08: Except that it does likely unwanted stuff to history...09:00
deb08 Ilari: what do you mean ?09:01
doener owen1: no, "svn checkout" is like "git clone". pull is more like "svn update"09:02
Ilari deb08: It records next commit to have old master as direct parent (which is very likely unwanted).09:03
idletask And git clone will "svn checkout" ALL branches09:03
deb08 Ilari: I understand09:03
arelius joined09:04
Beket joined09:04
Ilari deb08: There should not be redundant parent links. That is, dropping any parent link should always cause commit past-future-elsewhere relationships to change.09:05
deb08 ok09:06
Ilari deb08: The --no-ff was introduced mainly for use with git-svn...09:06
deb08 hehe09:06
arelius left09:07
gimmulf joined09:07
thiago_home but you shouldn't use it09:07
Ilari deb08: Now, maybe examine the diff with 'git diff HEAD' and if it looks OK, do 'git reset <other branch>'. Or something like that.09:08
deb08 I'll try09:09
Ilari deb08: Usually if you want to inspect the changes, use something like 'git log -p master..foo' or 'git diff master...foo' (yes, one has two dots, the other three) and if it looks OK, try the merge.09:12
deb08 I see, I check BEFORE the merge and then do the merge09:12
gimmulf left09:12
gimmulf joined09:13
deb08 why 3 dots ?09:13
Ilari deb08: Compare base of master and foo to foo.09:14
deb08 ok09:14
Ilari master..foo would be "compare master to foo".09:14
deb08 ok09:14
thanks09:14
drizzd the two coincide in the ff case09:14
DrFrasierCrane joined09:14
doener "diff master..foo" would show the differences betwene master and foo as they currently are (thus including the removal of changes that happened only on master)09:15
"diff master...foo" shows a diff of the changes that happened on foo but not on master09:15
deb08 ok, so two dots are good for a global view09:17
Ilari deb08: Actually, when examining changes some branch does, two dots are better for commands like log, but for diff three dots are better. Diff is special as it can only compare two revisions.09:19
doener "cross branch" the two dot version is rarely useful. It's good for getting, for example, a diff between version 1.0 and 1.1 of a project or so09:19
deb08 yeah09:21
Ilari deb08: 'git log -p master...foo' would also be valid. It shows all changesets that are only on one of master and foo (but not both).09:22
deb08 I get it09:23
Ilari Yes, git merge really sets ORIG_HEAD if it moves current branch pointer.09:26
deb08 what is the difference between orig_head and head ?09:27
head is the last commit and orig_head is ?09:28
Ilari deb08: All the information git really stores about the branch is pointer to latest commit on branch (and likely past vaules of this pointer).09:28
deb08: HEAD (all caps!) is last commit on current branch, and ORIG_HEAD is previous value of HEAD. Nowadays, HEAD@{1} would likely be better way to refer to last value of HEAD before this one.09:29
deb08: See 'git reflog'.09:29
deb08 ok I'll take a look at reflog09:29
thanks09:29
pantsman joined09:29
Ilari deb08: ORIG_HEAD is very old thing. HEAD@{1} is much newer...09:30
deb08 ok, HEAD@{1} = last commit HEAD@{2} = commit -1, etc ?09:31
drizzd I have to admit that I still don't understand the rationale behind the two dot/three dot notation09:31
cko left09:31
drizzd two dots mean difference09:31
three dots mean symmetric difference09:31
for revisions09:31
but for diff it's the other way around, IMHO09:31
bentob0x joined09:33
Ilari drizzd: Its mostly random effect of rewriting those dot notations in terms of positive and negative commit notation...09:33
drizzd I'm happy to accept that there is no rationale behind it.09:34
But I remember a post by linus saying that it made sense in some way.09:34
deb08 left09:34
drizzd Ilari: how would I rewrite three dots? two dots I think is a..b == b not a09:35
ereslibre joined09:35
drizzd a...b == a b not merge-base(a, b) ?09:35
Ilari drizzd: Yup.09:35
drizzd okay, but for diff it's a..b == a b09:36
a...b == merge-base(a, b) b09:36
thiago_home git diff takes exactly two branches09:36
(if you give it less than two, it infers the missing ones)09:36
so it has technically abused the three-dot notation for the very-useful case of "what are the changes made to that branch that aren't in this"09:37
alexross joined09:37
drizzd I think for diff, the current two-dot notation is redundant, and the three dots should be two dots09:37
thiago_home uses the two-dot notation often09:38
Ilari Earliest mention of ORIG_HEAD I can find from git history is from April 2005 (and first commit is from the same month)...09:38
thiago_home to find out if there's anything in other branches that need merging09:38
drizzd thiago_home: but it's the same as having no dots09:38
thiago_home no, it's not09:38
git diff otherbranch..09:38
it's not the same as git diff otherbranch09:38
sorry, dots in the wrong side09:39
git diff ..otherbranch09:39
ToxicFrog left09:39
drizzd that's equivalent09:40
except for the fact that + and - are reversed09:40
thiago_home yep09:40
note that there's no way in the two-branch notation to say "the index" or "the working tree"09:40
drizzd well, it's probably too late to change it anyways09:40
thiago_home if there are no changes in the index and in the working tree, then git diff ..otherbranch is the same as git diff HEAD otherbranch09:41
advany left09:41
drizzd thiago_home: I still think that the notation is confusing because it clearly means something different than in the revisions case09:41
thiago_home but it is different from revisions anyways09:42
drizzd it would even make more sense to exchange the meaning of the two notations09:42
thiago_home you're getting a diff of many changes together09:42
not a diff of individual changes09:42
drizzd sure, but09:42
the two dots in the revisions case is very similar to the three dots in the diff case09:43
and vice versa09:43
Zimm joined09:43
rubydiamond left09:43
thiago_home I don't agree09:43
well, but that's because I know the technical reasons09:43
I agree that behaviour-wise, it is similar09:43
drizzd rev a..b == b not merge-base(a, b) [almost], diff a...b == merge-base(a, b) b09:45
Ilari Digging the history, HEAD@{1} notation appeared in v1.4.0, when the ORIG_HEAD was alredy in v0.99.09:46
drizzd but diff a..b == a b, which is completely unrelated09:46
and what are the technical reasons? rev-list shouldn't even be invoked in the diff a..b case09:47
so it's parsed differently anyways09:47
Ilari drizzd: The notation parsing was done using rev-parse...09:47
gimmulf left09:48
drizzd so git diff a..b actually results in git diff b ^a ?09:49
thiago_home git diff b ^a shows nothing here09:49
jaalto The "git push --tags" pushes all tags, but is is possible to push only specific tags?09:49
drizzd it does work here09:49
thiago_home jaalto: yes, name them09:50
jaalto thiago_home: Ah, tag push is like branch push?09:50
drizzd with sha1s, at least09:50
thiago_home weird09:50
$ git diff $(git rev-parse HEAD~..HEAD) | wc -l09:51
4309:51
$ git diff 6802a1dbf227d5e3835cfcc0f3017344455b4c05 ^651ebe808e5d750cf3d7a5fad17770c29d4db861 | wc -l09:51
009:51
drizzd I tried with current git.git master and next09:51
thiago_home oh, shell escaping09:52
$ git diff 6802a1dbf227d5e3835cfcc0f3017344455b4c05 \^651ebe808e5d750cf3d7a5fad17770c29d4db861 | wc -l09:52
4309:52
xenoterracide how can I use filter-branch to remove a commit by reference (sha1)?09:53
thiago_home xenoterracide: skip the committing of it09:54
_graham_ joined09:55
doener if there are no merges following that commit and it appears on only one branch, "git rebase --onto <commit>^ <commit>" is probably easier09:55
drizzd if there are not too many branches based on it and it's not too old, maybe you can also use rebase09:55
thiago_home note that there's a difference in behaviour between those two options09:56
you're probably looking for rebase's behaviour09:56
filter-branch will remove the commit, but not its effects09:56
xenoterracide no some of these commits are older than some of the history I need. I'm basically trying to strip the repo down to one file...09:56
thiago_home that means the next commit will probably include the changes09:56
xenoterracide and it's history09:56
I haven't had much luck09:57
thiago_home use --directory-filter09:57
idletask Argh09:59
The git-cvsserver won't allow the CVS clients to branch and tag :(09:59
xenoterracide you mean --subdirectory-filter?09:59
thiago_home yes10:01
sorry10:01
drizzd idletask: you have git and you still want to use CVS to branch?10:02
xenoterracide I did unfortunately other stuff in that directory... but10:02
ereslibre left10:02
idletask drizzd: that's not for me, that's for my work... And the devs use CVS at work10:02
drizzd I just cannot imagine anyone using CVS _with branching_ and not wanting to switch to git (or anything else that actually supports branching)10:03
idletask drizzd: oh yes you can10:04
Spell "transition"10:04
I do want them to use git, eventually10:05
thiago_home good10:05
let them use CVS for now, without branches10:05
once they need branches, they switch to Git10:05
trust me, switching is easy10:06
idletask thiago_home, the problem is, they create branches with CVS right now (they're Eclipse users, heh)10:06
I want the transition to be smooth10:06
thiago_home you get a hectic first week, but then things settle down10:06
idletask We cannot afford that :/10:06
thiago_home we could10:07
how big is your development team?10:07
idletask 5 people, plus me10:07
I already use CVS to git to CVS10:07
thiago_home we switched 50 people10:08
not-xjjk joined10:08
xenoterracide so I'm thinking I want to do something like... git filter-branch --commit-filter skip_commit <sha1> but I'm not sure that syntax is right10:08
thiago_home the transition from Perforce to Git was much better than the transition of CVS to Perforce 12 years ago10:08
when the company was the size of yours10:09
drizzd idletask: I think trying to _use_ both at the same time makes things more complicated10:09
setting up a git mirror to play with is a different matter10:10
thiago_home xenoterracide: you did read what I said about removing a commit not changing the contents, right?10:10
Weasel[DK] left10:10
drizzd but eventually I think you should make a hard switch10:10
xenoterracide maybe I missed that sorry...10:10
Sho_ joined10:12
ereslibre joined10:13
idletask drizzd: well, I'm looking at the source right now, I'll see if I can make up a patch10:15
Who knows10:15
Also, since we have 52 modules, I wonder whether I should set up a superproject...10:15
xenoterracide well then here's the problem if I use filter-branch to remove the files the commits are still in the log... (and maybe more survives?)10:17
Arafangion thiago_home: How did you do the transition?10:20
xjjk left10:20
MarcWeber left10:24
Juice10 joined10:27
JensB joined10:28
JensB Hi everybody10:28
Thumper_ left10:29
MadCoder vmiklos: you need to check that argc == 0 if --stdin was specified10:31
though like junio said, there is no need for it to be at the end anymore10:31
that's all10:31
JensB I have just started using Git for my Ruby on Rails project and for testing, I created a branch (thing_test) and within this branch, I pulled a plugin from a different Git repo which gets treated as a submodule. Now when I change to a different branch, the plugin dir is still there. -> Is this intentional? I would have expected the submodule only to exist in the branch it was added.10:31
MadCoder git submodules UI still needs polishing10:32
JensB hm10:32
MadCoder so what happens is not what you would like to happen10:32
but it's what is coded for now10:33
you must do a lot of things by hand with submodules for now10:33
JensB ok10:33
so basically the easiest thing would probably be to remove the ".git" in the subdirectories and have them treated like normal files for the time being?10:34
Ilari JensB: Existence of submodule repository doesn't imply existence of submodule reference...10:34
JensB I don't really need to stay current for the plugins10:34
MadCoder JensB: submodule are a PITA if you switch between branches that have them and have them not10:35
else it's bareable10:35
(IOW you need to git-submodule update way to often to my taste, but it works)10:35
*too often10:35
JensB Ilari: when I do something like git init; (add files); then mkdir -p vendor/plugins; cd vendor/plugins; git clone $url; doesn't this create a submodule?10:37
MadCoder no10:37
a submodule is git submodule add $url10:38
a submodule is git submodule add $url vendore/plugins10:38
JensB ok10:38
MadCoder actually10:38
and when you commit the super module, it remembers the exact sha1 at which vencor/plugins is10:38
owen1 left10:38
MadCoder it's not the same as svn:externals or recursive CVS update is10:38
JensB strange (ok, I'm a total greenhorn here ... my bad)10:38
MadCoder np10:38
JensB the problem is that when I 'git checkout master' the vendor/plugins/*/* stays there - I don't want that10:39
MadCoder submodule is meant to track a specific version of the submodule, so that when you commit, you push something that is meant to work10:39
yes, that's still a problem with submodules as well10:39
like I said before, submodules are rough on the edges right now10:39
alexross left10:39
MadCoder what it does wrt versionning is exactly what it should, and it's perfect in that sense10:40
the UI to deal with it is a bit cumbersome10:40
CIA-15 left10:40
JensB so can/should I delete those files while working on the master branch? or ignore them? 'git diff' doesn't find them10:40
MadCoder yes you should delete them, though the issue is that if you had work in progress or not pushed stuff, you'll lose them10:41
that's why git checkout doesn't remove them atm, because no proper solution has been decided for that10:41
JensB ah ok10:42
alexross joined10:43
JensB work is only lost if it was in the submodules, right? I don't push them back anyway10:44
ToxicFrog joined10:46
Arafangion reckons that having submodules are a bad solution to crap build systems.10:46
charon left10:47
MadCoder JensB: yes10:48
woeye joined10:48
CIA-15 joined10:49
ereslibre is gitweb part of git ? (aka. can I ask about gitweb here ?)10:49
Pieter madcoder: did you think about packaging gitg for debian?10:49
MadCoder what is gitg ?10:49
ereslibre: yes10:49
and you can also ask any question related to git stuff you know10:49
ereslibre do you guys know where can I find extra css styles for gitweb ?10:49
MadCoder though on non core-git stuff you may have no answer that's all10:49
Pieter MadCoder: http://github.com/jessevdk/gitg/tree/master a gitk-clone for gtk10:49
MadCoder I don't know if that exists10:49
ereslibre MadCoder: hehe, ok, thanks =)10:50
MadCoder ereslibre: you may use google and have a look to gitwebs that are customized10:50
and steal theirs ;)10:50
ereslibre haha =) ok, thanks10:50
MadCoder but I know of no css repositories for gitweb10:50
ereslibre: is it fast ?10:50
ereslibre MadCoder: well... reasonably10:50
i have it on my own pc for my own projects...10:50
MadCoder err I meant Pieter actually10:50
ereslibre ah10:50
hehe10:50
MadCoder I know about gitweb10:51
I was asking about gitg10:51
Pieter MadCoder: I think it was made because giggle is so slow10:51
ereslibre yep... ;) thanks for the info anyway ! ;)10:51
MadCoder Pieter: hmm but it's a gitx clone not gitk10:51
and I dislike gitx a lot, it's only pretty, not functional ot me :P10:51
Pieter MadCoder: ok, well I just wanted to show it to you :)10:52
vmiklos MadCoder: ah, thanks.10:52
woeye left10:54
bentob0x there was a qgit update over the week-end (Kubuntu KDE 4), where can I find what got updated?10:57
thiago_home Arafangion: we were using git-p4 initially10:58
Arafangion thiago_home: I note the 'were'.10:58
thiago_home Arafangion: then, on Sep 26, we turned perforce read-only10:58
everyone had to install Git and clone from the new server10:58
Arafangion Ahh, cool. :)10:59
thiago_home: How big is your perforce repo?10:59
thiago_home 320k submits10:59
Arafangion With many branches?11:00
thiago_home yes, lots of them11:00
Arafangion How'd you manage those?11:00
thiago_home they were all imported11:00
Arafangion I'm guessing, from your success, that you must've converted the repo from the beginning.11:01
Rather than at commit number 320k?11:01
thiago_home yes, we converted all the history11:01
Sigma joined11:01
Arafangion And you left all the perforce branches in the single git branch?11:02
thiago_home no11:02
each perforce branch is a git branch11:02
but most of them are old branches no longer used, so they are in a repository people don't usually clone11:02
Arafangion Oh? I thought that git-p4 didn't really support branches?11:03
thiago_home it does, just fine11:03
ToxicFrog left11:03
Arafangion Nice.11:03
thiago_home git-p4 is like git-svn: it allows you to interact with a p4 repository11:04
but more than half of our developers had not even tried it before they had to switch to git11:04
Arafangion thiago_home: Yeah, I've been using it, but for various reasons, it didn't really work for me. I had ot modify it to get it to work at all.11:05
Pieter thiago_home: didn't they find that hard?11:05
Arafangion I didn't import the entire repo, mind you - just the head, and that was essentially the biggest issue.11:05
thiago_home Pieter: we made it very simple for them11:06
git clone at the beginning11:06
work is: git pull; work; git add file; git commit; git push11:06
if it fails to push, git pull again11:06
Arafangion thinks he should give git-p4 another go.11:07
thiago_home rebasing is considered an advanced feature11:08
we taught them git diff, git diff --cached, etc.11:08
and our Gitorious main repositories are single-branch repos11:08
CIA-15 left11:09
vintrepid left11:11
bcarlyon|laptopBarryCarlyon11:11
JeFeDe joined11:14
tmz_tmz11:16
CIA-15 joined11:17
imexil joined11:17
JensB_ joined11:19
AreliusFreeNode joined11:19
pgokeeffe_ joined11:20
Arafangion thiago_home: Did you have purged files in the perforce repo?11:23
robin left11:23
robin joined11:23
imexil I found a patch on the mailing list http://is.gd/4lUg that would allow git svn to set autoprops on upstream svn repos. Does anybody know if this is going to be included in git svn in the near future?11:23
Yuuhi joined11:25
kef left11:27
JensB left11:32
xenoterracide the top entry in git log would be ~1? or...11:34
Ilari xenoterracide: The top entry is one of postive refs specified...11:35
xenoterracide: Unless reverse output is in effect...11:35
xenoterracide huh11:35
zachinglis joined11:35
Ilari xenoterracide: So in 'git log', the top entry would be HEAD.11:36
xenoterracide somehow this isn't really helping me figure out what I'm trying to do...11:38
which is to remove the 5th commit down from history...11:40
MaddHatter have you published your history?11:41
dramsay joined11:42
vmiklos Pieter: am i right about you are a bzr fast-import contibutor? :)11:42
xenoterracide MaddHatter: irrelevant because I'm making a new repository. basically taking 1 file and making a new project11:43
p0w3r3d left11:43
Vortex35 Ilari: thanks for the info about dangling objects!11:43
bgerber left11:43
Arafangion Given that people seem to think that git-p4 works well, I have decided that perhaps there's something idiotic in how I'm using it, so I tried to use it again on my linux machine (At work I'm using vista), and use the perforce public repo as my test project, however I can't get git-p4 to even import that. :(11:43
http://rafb.net/p/nhyCdg13.html11:44
tokkee xenoterracide: git rebase --onto HEAD~6 HEAD~5 HEAD should do it.11:44
MaddHatter I think that means no, in which case do what tokkee said11:45
Pieter vmiklos: yes11:45
MaddHatter or git rebase -i works too11:45
vmiklos Pieter: is there a mailing list for it, to ask questions?11:45
MaddHatter ^git rebase -i HEAD~611:45
Pieter vmiklos: I think your best shot is the bazaar mailinglist11:46
vmiklos: or the #bazaar channel11:46
vmiklos https://lists.ubuntu.com/mailman/listinfo/bazaar this one?11:47
Pieter yes11:47
vmiklos ok, thx.11:47
Beket left11:48
robin left11:49
robin_ joined11:49
xenoterracide ok... think I got it... does rebasing like that actually remove everything about those commits from the repo?11:50
MaddHatter they will disappear eventually11:50
in the meantime, they hang around in the reflog11:50
xenoterracide should I clean that up before publishing?11:51
parasti joined11:51
MaddHatter no need11:52
the reflog isn't published, and unreachable commits aren't cloned11:52
xenoterracide ok11:53
ty11:53
zachinglis left11:53
Arafangion found the issue he had with the jam repo.12:00
Arafangion Nevermind.12:00
thiago_home Arafangion: no12:01
Arafangion thiago_home: The other complication I have is that there is very liberal use of spaces in directory names in the repo.12:03
thiago_home that should work without issues12:05
Arafangion Should, except that git-p4 doesn't use git or perforce libraries, but instead runs the respective binaries, and parses the results in a simplistic fashion.12:05
thiago_home well, for starters, there aren't any libraries12:06
Arafangion Yes, there are.12:06
thiago_home second, it uses the python interface of p4, so spaces shouldn't be an issue12:06
Arafangion Are you sure?12:06
thiago_home and git-fast-import doesn't have space issues either12:06
Arafangion I'm looking at the source for git-p4, it definetly uses popen, it does not use any p4 library.12:07
thiago_home because there aren't any12:08
but it uses the Python interface12:08
Arafangion There are two python libraries.12:09
There's also a C++ library, all available from perforce.12:09
thiago_home look at p4CmdList12:09
what's the first argument it passes to p4?12:09
Arafangion -G12:10
clairvy joined12:10
thiago_home and what does that do?12:10
Arafangion That explains why there was so little parsing code.12:12
thiago_home yep :-)12:12
Arafangion return read_pipe("git name-rev HEAD").split(" ")[1].strip()12:12
I'm not properly investigating the code yet, but wouldn't that incorrectly determine the branch name?12:13
thiago_home why would it?12:13
Arafangion What if a branch had a space in it?12:14
zachinglis joined12:14
thiago_home that would be a bad idea12:15
Arafangion Some branches in perforce have spaces in it. :(12:15
Beket joined12:15
thiago_home Git won't like that12:15
not that it isn't allowed, but it is a bad idea12:15
mithro left12:17
Arafangion I'll take another look into getting git-p4, and maybe I'll start contributing patches. I gotta start somewhere. :)12:18
Thanks. :)12:19
deskin joined12:21
jmd joined12:22
malahal__ joined12:23
jmd How can I make my working directory use a different repo?12:23
ben_h joined12:24
thiago_home set GIT_DIR and GIT_WORK_TREE12:24
Pieter or use the script in contrib12:25
alreves_ joined12:25
alreves left12:26
clairvy left12:31
malahal_ left12:36
CelticSoul left12:39
ToxicFrog joined12:39
d0k_ joined12:45
imexil left12:46
d0k left12:53
jm joined12:54
pantsman left12:54
d0k_ left12:57
bentob0x left12:58
cedric_ joined13:07
Arafangion left13:08
zachinglis left13:09
Pieter http://pastie.org/29569313:14
hmm13:14
JeFeDe left13:16
CelticSoul joined13:18
tango_ Pieter, maybe hardlinks to the local repo cause that effect?13:20
Pieter tango_: there are no hardlinks13:20
that's why I used the file:// protocol13:20
tango_ when you clone from a local repo you don't get hardlinks?13:20
Pieter not when you use the file:// protocol13:22
cedricv left13:25
priidu left13:25
BarryCarlyon left13:26
bcarlyon|laptop joined13:27
bcarlyon|laptopBarryCarlyon13:27
abbe joined13:29
nessundorma joined13:36
jmd left13:39
Sho_ left13:45
snitko joined13:46
advany joined13:49
priidu joined13:50
xenoterracidexenoterracide_13:52
xenoterracide_xenoterracide13:58
albalbertito14:01
rubydiamond joined14:05
jesselucas_ left14:08
Beket left14:11
jackdempsey joined14:11
jackdempsey left14:12
prophile joined14:15
zoke left14:15
vinnl joined14:19
Juice10 left14:20
vinnl Hi, I'm having a little trouble rewriting history with Git and I couldn't find out how to do this with the Git manual, so I hope somebody will be able to help me here...14:23
My problem is this: there's a file (an image) in my history that has incorrect license information that I thus cannot publish online. For this reason, I'd like to edit the respective commit to set the correct license before I push this repo online. However, the file is also edited in later commits. How could I go about doing this?14:23
Alternatively, if I could completely remove the file from the history and re-add it now that'd be fine with me as well.14:23
MadCoder Pieter: I had a look at gitg, okay it's decently fast, but it's mostly unusable right now14:24
I mean the UI it's promising, but it's not near being finished yet.14:24
I miss the affected files gitk thing, there is no way to set a fixed font for the source view widget (this is completely idiotic btw), it doesn't take args on the command like like gitk does, ...14:25
IOW it's a pretty poor gitk replacement yet14:25
so no I won't package it, I usually don't package things I won't use14:25
jesselucas_ joined14:29
ShadeHawk joined14:30
ShadeHawk pasky: Did you have time to check and test my "gitweb: Better processing format string in custom links in navbar" (including % -> %)?14:30
toofishes vinnl: git-format-branch14:32
deskin vinnl: have you taken a look at git filter-branch? That seems the easiest way to me; also, the second option (removing it from history, and adding a correct version on top) is probably the easier/safer way to go14:32
toofishes err14:32
git-filter-branch14:32
ShadeHawk tango_: what do you think about the way cgit does URL for snapshots?14:32
vinnl reads up on git-filter-branch, thanks toofishes and deskin14:32
deskin vinnl: the manpage has an example of exactly what you want, that is, removing a file from all history14:33
vinnl Great :)14:33
jackdempsey joined14:33
tango_ ShadeHawk, haven't the slightest idea, looking it up now. btw, I just sent a v2 for the snapshot patches14:33
ShadeHawk Ah14:33
rdavila joined14:34
jesselucas_ I'm trying to setup post-update to push to a mirror after it's updated. Here is my file: http://www.pastie.org/295720. This is a bare repo on server (B) being pushed to from local computer (A). I'd like server (B) to then push to server (C) the mirror. It doesn't seem to be working though.14:34
ShadeHawk tango_: well, the path/to/project/snapshot/next.tgz resulting in project-next.tgz looks a bit funny.14:34
tango_ ShadeHawk, I know, in fact I was thinking about having gitwbe support project-head.tgz as synonym for project/snapshot/head?sf=tgz too14:35
Flathead left14:35
tango_ btw I can't find how cgit does snapshots14:35
ShadeHawk tango_: the problem is with prject names like on kernel.org, with deep directory hierarchies14:36
tango_ well, there's only so much we can do about it, can we 8-P14:36
loiseau joined14:37
tango_ ShadeHawk, we could just go by trying to replace the first - with /snapshot/ and see if it works, then try the second -, then try the third, etc14:37
not really ideal, so I desisted14:37
rdavila left14:38
tango_ also, if you have branches that go like blah/branchname, the file WILL be named branchname14:38
ShadeHawk tango_: http://permalink.gmane.org/gmane.comp.version-control.git/9798514:38
This is a minor feature-release which adds support for extracting14:38
snapshot revision (i.e. tag name) from the snapshot name instead of14:38
relying on querystring parameters, i.e. the following urls will14:38
download the expected revisons:14:38
http://hjemli.net/git/cgit/snapshot/cgit-0.8.1.tar.gz14:38
http://hjemli.net/git/cgit/snapshot/cgit-0.8.tar.gz14:38
tango_ well, that would make snapshot behave VERY differently from the other actions14:39
also, I'm not sure how it does it, since the cgit project itself is tagged as 'v0.8.1' ... I don't want to impose conventions on the tagger 8-P14:40
ttt-- joined14:41
ShadeHawk well, one thing that can be done (and it is in my gitweb TODO list), is to use <project>-<tag>.<suffix> for snapshots of tags, and not <project>-<hash>.<suffix>14:41
tango_ ShadeHawk, yeah I was thinking about that too14:42
ShadeHawk tango_: that is certain DWIM-mery (the way cgit does it)14:42
tango_ (of course it's not easy in case multiple heads refer to the same commit)14:42
so what would cgit do with rbot, where tags are already named rbot-version and not just version?14:42
eh14:42
lines 139 and following: http://hjemli.net/git/cgit/tree/ui-snapshot.c14:43
ttt-- hi, how do checkout the latest commit? when i do "git checkout master" it just lists files with "D", but it load them. what am i doing wrong?14:43
bobmcw joined14:43
ttt-- do i*14:43
ShadeHawk tango_: the problem with <project>-<tag>.<suffix> is that I think we cannot use 'f' parameter (we could want to snapshot some subdirectory), and using 'fp' is abuse; new parameter? or just 'h' parameter?14:44
ttt-- it doesnt load them*14:44
deskin left14:44
tango_ oh snapshot works for files too?14:44
jesselucas_ ttt--: How you trying to switch branches or actually fetch the new content?14:44
tango_ uhm14:44
I'll have to reconsider my patches14:44
jesselucas_ *are you14:45
ttt-- jesselucas, i deleted files since the last commit. i'd like to go back to the last commit (when the files were still there)14:45
charon joined14:45
ttt-- there is only 1 branch14:45
tango_ btw ShadeHawk the cgit way of doing stuff looks really a little too guessy for me ... I suspect it'd fail on comples projects14:46
(projects with complex versioning)14:46
tokkee ttt--: Do you want to throw away _all_ local changes?14:46
ttt-- yes14:46
tokkee ttt--: git reset --hard14:46
alb joined14:46
jesselucas_ I think git-revert does that14:46
tango_ ShadeHawk, are you sure snapshots work with file_name too?14:46
ttt-- thanks, that did it14:47
ShadeHawk tango_: well, DWIMmery could look like this: try <ver>, try v<ver>, try <project><ver>, try <project>-<ver>, fail14:47
tokkee ttt--: To "reset" a single file, do git checkout HEAD -- <file>14:47
tango_ ShadeHawk, and what about generation?14:47
ShadeHawk tango_: I'm not sure, but I think they should... "$hash_base:$file_name" for $hash/<tree-ish>14:48
tokkee jesselucas_: git-revert reverts an existing commit by introducing a new one.14:48
tango_ ShadeHawk, git_snapshot only checks $hash, not $hash_base or $file_name14:48
jesselucas_ tokkee: gotcha, I guess I need to do some more research to see when the best time to use git-revert is.14:50
snitko left14:50
ShadeHawk tango_: hmmmm... that looks incorrect... but $file_name should be used only for "$hash_base:$file_name" (or get_hash_by_path($hash, $file_name)), and for --prefix=$project/$file_name/14:51
jesselucas_ tokkee: By chance, would you know why this post-update file isn't working: http://www.pastie.org/295720 ?14:52
jackdempsey left14:52
trochala joined14:52
GNUix left14:52
ShadeHawk jesselucas: on server? is git in PATH on server? what is configuration on server?14:54
tokkee jesselucas_: The first call to exec replaces the running shell with git, so you never reach the second exec.14:55
tango_ ShadeHawk, well, I'm only adding path_info stuff, not reworking the internals at the moment, so I guess you should mark that for a TODO 8-)14:55
tokkee jesselucas_: s/shell/shell process/14:56
jesselucas_ ShadeHawk: It's a ubuntu server. Using gitosis to manage the repos. Not sure about PATH (first time setting up everything)14:56
vinnl toofishes, excellent, git-filter-branch did it, thanks again :)14:56
jesselucas_ tokkee: Do you happen to know of a tutorial that explains this?14:56
tokkee jesselucas_: Explains what?14:57
jesselucas_ tokkee: I guess it's probably more of a linux admin thing. Basically what language is the post-update written in? So I can search for how to modify it?14:58
tokkee jesselucas_: That's plain shell script (in that case).15:00
jesselucas_ tokkee: awesome, thanks for the help. Now to figure out shell scripts :)15:01
albertito left15:05
deskin joined15:06
CodeOfficer joined15:08
diask joined15:10
Gitzilla left15:13
vinnl left15:13
JensB_ how do I commit only parts of the changes in one file using git?15:19
along with other files15:19
Pieter git add -p15:19
JensB_ thank15:20
s15:20
ShadeHawk tango_: I just had a weird ida, of having project/snapshot/ be a tree-like list of possible snapshots of tags in <project>-<tag>.<suffix> format (like for example real http://www.kernel.org/pub/software/scm/git/)15:20
JensB_: or git-gui15:20
s/ida/idea/15:20
tango_ ShadeHawk, that's a possibility, but it's not cheap to build15:21
woeye joined15:21
truebosko joined15:22
truebosko Hi there, I'm dealing with a remote repo and after pushing some changes to master I want to pull them all back to another server which has already cloned the repo. If I go into the root directory of the project and do `git pull` it seems to only grab the changes in that root dir and not the ones under it .. how can I grab all changes and apply them?15:23
drizzd it's impossible to get only a part of the changes with git15:24
truebosko I dont want just a part, I want all15:24
drizzd you are clearly mistaken somewhere15:24
truebosko Ok15:24
I have /dev/cake15:24
Cake is my project directory. I go into cake, git pull15:24
and only the files in that dir are updated, every subfolder has nothing updated15:24
diask left15:24
truebosko But when I look at my commits, all other files in sub dirs are being updated15:25
drizzd is it a public repo?15:25
truebosko No, it's a private repo on github15:25
If I clone it, it works fine but I dont want to constantly clone .. :)15:26
drizzd ok, how do you "look at your commits"?15:26
truebosko Either gitk or going on github.com15:26
drizzd so you can see the changes to the subdirectories in gitk15:26
truebosko To the files in the sub directories, yes15:26
drizzd in the branch you're on (the one shown with bold face font in gitk)15:26
or the one with the asterisk in front of it in `git branch`15:27
eno__ left15:27
truebosko oh you know what15:28
one of the files was edited on remote without any git-relation .. as I wasnt at my main pc15:28
bdiego joined15:28
truebosko Is it possible to ignore the not uptodate error on a file?15:28
shodges joined15:29
ShadeHawk tango_: well, not that much expensive than 'tags' view15:29
truebosko Because I dont want to really commit it to the repo anymore15:29
drizzd what's a "not uptodate error"?15:29
truebosko settings.py: needs update15:29
fatal: Entry 'settings.py' not uptodate. Cannot merge.15:29
madewokherd joined15:29
drizzd you don't have to commit changes15:29
you can undo changes15:30
you can ignore changes15:30
truebosko That's on my remote. . which I am pulling to15:30
drizzd you can remove files from git and not track them any more15:30
truebosko I edited it on remote, but I want to pull the latest from my master15:30
No no15:30
I know that15:30
bentob0x joined15:30
truebosko The process was like so:15:30
tango_ ShadeHawk, I guess that could be implemented, in the form http://gitweb.example.com/snapshot/somestuff15:31
ShadeHawk, however, that assumes no project named snapshot exists15:31
truebosko I got my working copy on HOME, I pushed it to my repo. Then I cloned that repo onto REMOTE. The next day I needed a quick change and modified settings.py on REMOTE. Then, I went back HOME and made more changes, blah blah the usual development cycle. Pushed those changes to repo, but now when I try to PULL the latest changes to REMOTE it crashes because I modified settings.py on REMOTE15:32
tango_ or were you suggestiong http://gitweb.example.com/project/snapshot/project-tag ?15:32
truebosko Seems just deleting settings.py on remote does the trick though :P15:32
ShadeHawk tango_: no, I thought about http://gitweb.example.com/project/snapshot/ (only wothout either hash or filename)15:32
stouset joined15:32
drizzd truebosko: first of all, you seem a little confused about push and pull15:33
tango_ ShadeHawk, and then have snapshot behave totally different from the other actions?15:33
ShadeHawk tango_: so the snapshow would be http://gitweb.example.com/project/snapshot/project-tag.tgz or something like that15:33
drizzd truebosko: push and pull has nothing to do with changes15:33
ShadeHawk tango_: that is just a wild idea15:33
drizzd those commands are simply used to download and upload data from one repository to another15:33
tango_ could be a fallback15:33
truebosko drizzd: I know, and that's what Im using them for :?15:34
Sorry just having a hard time explaining t he situation but no worries I figured it out15:34
ShadeHawk tango_: special case: snapshot without hash or hash-ish (hash_base + file_name) lists "available" snapshots15:34
mw joined15:34
drizzd truebosko: I'm just saying, your error has nothing to do with where or how you made your change.15:34
tango_ ShadeHawk, that's surely an interesting option. of course the next matter is what should the snapshots link to 8-D15:35
drizzd truebosko: everything is local with git15:35
bdiego left15:35
pehlert joined15:37
bobmcw left15:40
nessundorma left15:40
lack I've cloned a repository and set up my own branch, where I've deleted one of the directories in the original repository. Now every time I pull and upstream has changed the contents of that repository, my merge fails and I have to manually delete that directory again. Is there any way I can automate this procedure? Or tell git not to merge things in the deleted directory?15:40
tokkee lack: Did you have a look at git-rerere? That _might_ help ...15:42
Pieter I don't think it will15:42
deskin left15:45
nuncanada joined15:48
stouset left15:49
Ilari truebosko: "fatal: Entry 'settings.py' not uptodate. Cannot merge." means that 'settings.py' has local uncommitted modifications and it is also modified on remote side (and Git can't merge files in that state).15:51
zachinglis joined15:53
lack tokkee: Nope, I have rerere enabled, but it doesn't seem to do anything special.15:54
woeye left15:55
Weasel[DK] joined15:57
JensB_ newbie question #2934513: how do I remove a "git mv" from the current commit? git update-index --force-remove $file will mark as removed, not "undo" the "git mv".15:58
ciaran reset15:58
JensB_ reset seems also to mark as "deleted" (in the commit message comment).15:59
jesselucas_ left15:59
ph^ left16:00
Ilari JensB_: 'git mv' the file back?16:01
JensB_ will try16:01
ShadeHawk left16:01
JensB_ thanks16:02
JensB_ left16:02
ph^ joined16:02
elmex left16:04
elmex joined16:04
ndim left16:07
tonguero_tongueroo16:08
RaceCondition left16:11
bobesponja joined16:12
EmilMedve left16:19
idletask Grr16:23
I can't make the git eclipse plugin to work _at all_16:24
t_ joined16:24
kukks joined16:26
p0w3r3d joined16:27
alexross left16:28
alexross joined16:32
t_ left16:39
blacky joined16:40
shenie left16:41
ereslibre left16:43
ndim joined16:43
snitko joined16:43
spearce joined16:44
truebosko left16:44
bieneff joined16:47
prophile left16:47
diask joined16:52
KiBi left16:57
p0w3r3d left17:00
p0w3r3d joined17:02
koke joined17:03
vuf left17:05
alreves_ left17:12
doener left17:13
doener joined17:13
rubydiamond left17:14
rubydiam_ joined17:14
litage joined17:15
chris2 joined17:20
koke left17:20
Beket joined17:22
CIA-15 left17:29
toofishes left17:30
Vortex35 left17:32
Vortex35 joined17:32
Sigma left17:33
nano- left17:33
radarek joined17:37
mankind_tweezer left17:39
offby1plotz17:40
CIA-15 joined17:40
plotzfrotz`17:40
frotz`offby117:41
albalbertito17:41
statim left17:42
statim joined17:42
rubydiam_rubydiamond17:50
cko joined17:51
CIA-15 left17:52
harryjr joined17:52
Jacolyte joined17:52
harryjr is it possible to specify multiple remotes, so a git push will be done two multiple locations?17:52
drizzd I don't think so17:54
spb i don't know that 'git push' on its own can be made to push to two places17:58
but you can certainly configure two remotes and do git push remote1 ; git push remote217:59
ia left17:59
cko left17:59
ia joined17:59
ia left18:00
CIA-15 joined18:04
marze joined18:06
Sigma joined18:08
harryjr left18:09
not-xjjkxjjk18:09
kef joined18:10
bytefield joined18:16
tongueroo left18:17
bentob0x left18:18
ttt-- left18:20
lamont` joined18:20
iulian left18:26
pgokeeffe_ left18:28
bytefield left18:28
lamont left18:29
pantsman joined18:29
koke joined18:30
dotsintacks_ joined18:33
reallyidle joined18:33
ben_h left18:36
kef left18:38
FunkeeMonk left18:39
eternaleye joined18:42
dotsintacks left18:45
idletask left18:46
snitko left18:48
shodges left18:48
tiglionabbit_ joined18:49
tiglionabbit left18:49
zachinglis left18:52
pygi left18:56
offby1` joined19:00
bryanray left19:00
offby1 left19:06
offby1`offby119:06
bentob0x joined19:08
shenie joined19:08
dotsintacks_ left19:11
BarryCarlyon left19:12
dotsintacks joined19:12
rubydiamond How do I remove a tag19:15
cehteh trag -d19:16
s/r//19:16
dthomas left19:21
MadCoder rubydiamond: git tag -d to remove it locally19:21
git push <remote> refs/tag/<tag>:19:22
to remote it from the remote19:22
rubydiamond MadCoder: Can I use same tag name again and agan19:23
suppose I tag it now.19:23
MadCoder yes you can19:23
rubydiamond and later I tag my different commit again with same name again19:23
MadCoder git tag -f will allow you to reuse the same tag name19:23
though you should make it a lightweight tag and not push it19:23
rubydiamond okay..19:24
MadCoder (IOW do not use git tag -a for tag you intend to move)19:24
rubydiamond what is git tag -a19:24
MadCoder an annotated tag19:24
IOW a tag with a comment19:24
it's usually what you mean to use for releases and stuff like that19:25
you can sign that (with gpg) and a couple of such features19:25
it's frowned upon to move such tags as those are supposed to be what they are forever19:25
charon left19:28
rubydiamond okay19:29
Beowulf_ joined19:30
Beowulf_ for sure this is plain easy but, how do I copy a file in a branch to another?19:30
paltman joined19:31
jesselucas_ joined19:31
MadCoder Beowulf_: go in the branch where you want to "copy" the file19:33
CIA-15 left19:33
MadCoder git show otherbranch:path/to/file.c > path/to/file.c19:33
Beowulf_ uhm... interesting19:34
thanks! :D19:34
Ilari Beowulf_: Or 'git checkout otherbranch path/to/file.c' (or something like that).19:37
p0w3r3d left19:37
robin_ Gitster has to change his mind on those five (now four) years. We need a fix for non-ascii filenames in git.19:37
rtomayko joined19:38
MadCoder for what ?19:38
robin_ http://code.google.com/p/msysgit/issues/detail?id=159 for example19:39
there was another thread a day ago too19:39
MadCoder I hardly understand how this is a git problem19:40
or his file system uses latin1 file names encoding whereas git likes it utf819:41
I dunno, it looks like a file system issue though19:41
DrNick it's a Windows thing19:42
parasti does git even care about the encoding of file names? it just stores bytes19:42
DrNick you either use UTF-16, or you use the 8-bit locale charset19:42
\ask- left19:42
robin_ parasti: and that is the problem19:42
MadCoder robin_: I hardly see why.19:43
but oh well, my system is full utf-8, and systems that are not full unicode nowadays should die an horrible death19:43
sabooky joined19:43
DrNick git is writing UTF8 filenames using the locale APIs, which means they get converted to the native UTF-16 using the wrong conversion tables19:43
robin_ MadCoder: Windows is full unicode19:43
RaceCondition joined19:44
jesselucas_ left19:44
MadCoder robin_: it maintains legacy horrible code which does that many FS you create are not using full unicode file names19:44
d0k joined19:44
MadCoder and it's a pita19:44
sabooky Can someone point me to a tutorial or documentation explaining the "proper" workflow when using git. Like the whole cheap branches/rebasing and how that's supposed to be used.19:45
MadCoder there is no proper workflow19:45
reallyidleidletask19:45
MadCoder there are always a couple of bad things not to do with git19:45
fhobia joined19:45
robin_ MadCoder: but git really shouldn't use the legacy encoding. Only legacy programs should.19:46
MadCoder but there is not one single worflow, git is versatile enough19:46
paltman left19:46
MadCoder robin_: I dunno, I don't use windows, I only know git works for me here19:46
and I seldomly version files with 8bit chars in'em anyway19:46
robin_ so then nobody else should..19:46
sabooky MadCoder: fair enough.. can you point me to a good documentation on git in general? Been reading into "Git Internals" from peepcast, but trying to expand on that.19:46
ereslibre joined19:47
DrNick the problem is that windows has something like four different file access APIs, and none of them resemble the POSIX APIs that git is using19:47
MadCoder sabooky: git has documentation, with tutorials and lots of things in it19:47
like the everyday's git and docs like that19:47
paltman joined19:47
robin_ Nobody uses Windows posix API19:47
idletask sabooky: try the docs at git.or.cz19:47
DrNick which means if you were to do it right, you'd have to insert a filesystem abstraction layer, and nobody who cares has bothered19:47
MadCoder DrNick: maybe19:47
and nobody should19:48
bryanray joined19:48
KiBi joined19:48
robin_ yiises19:48
Ilari sabooky: Basically, you are supposed to fork a branch for each feature and then (assuming it isn't so large change that you need to publish it) keep them up to date by rebasing.19:48
DrNick MadCoder: maybe? there's the ANSI and Wide versions of the native functions, and then the different versions of the C library functions19:48
MadCoder I said maybe because I really don't care19:48
windows APIs are a mess19:49
Ilari sabooky: Finally, when the changes are ready, merge them back into master. Keep master free for quick and obivious changes.19:49
MadCoder and I'm glad I don't have to fiddle with'em19:49
proxie joined19:49
awarde joined19:49
sabooky Ilari: ah, thats what I read in "Git Internals" and was looking for more examples of this. Since its a very different approach than cvs/svn.19:49
DrNick although, I would have though that msysgit took care of this crap for you19:50
Ilari sabooky: Its different there for two reasons: 1) Merging in CVS/SVN is a pain. 2) CVS/SVN can't rebase...19:50
sabooky Ilari: Trying to see if git is a good tool for work or not. Still trying to wrap my head around the concept differences. Anyways, I'll check out the official documentation(s).19:51
Ilari: yea.. I've been using git wrong, or atleast not taking advantage of that at all (for personal use)19:51
carllerche joined19:52
robin_ DrNick: I tried setting the utf-8 codepage, but that didn't work out.19:52
Ilari sabooky: Alternatively, one could just update topic branches by merging, but this leads to "messier" history.19:52
Marmouset joined19:52
robin_ seems msys (and cygwin) lacks support for it19:52
Ilari sabooky: Update-by-merge is regarded lot less bad than not using branches at all...19:53
robin_ DrNick: It was actually solved a year ago, but junio didn't want it19:54
DrNick url?19:54
CIA-2 joined19:54
alb joined19:54
sabooky Ilari: I'm trying to figure out how my workplace layout would be converted to git. There's Trunk (bleeding edge, devel, not stable), then branches for each major version (7.x.x-branch, 8.x-branch, 8.x.x-branch, etc..)19:56
Ilari sabooky: CVS/SVN quickly convince developers to avoid branches... And then they fell lost when they come across systems where branching is important part of standard workflows...19:56
k776 joined19:57
DrNick Ilari: that's both true and largely irrelevant to his question, I think19:57
sabooky Ilari: Yea, branches are considered a "necessary evil" at my place. I'm actually very new to the field btw, but I'm the cvs admin currently (yes we use CVS :\)19:57
Ilari sabooky: The standard way to do changes is to make the change on most stable codebase it appiles to and then merge towards least stable one.19:58
robin_ DrNick: I'll see if I can find it19:58
Beket left19:59
robin_ DrNick: http://kerneltrap.org/mailarchive/git/2008/1/18/57893619:59
Ilari sabooky: Git.git does it that way. It has 3 main branches, maint (most stable), master and next (least stable). Additionally there is 'pu', but thats special case.20:00
albertito left20:02
tongueroo joined20:03
sabooky Ilari: Thanks for all the info so far, it was definitely helpful. Gonna start reading the official docs and see where that gets me.20:05
offby1 Ilari: you've just mentioned some good ideas for using git ... and I'd never heard them before :-| (1: fork a branch for each feature, keep it up to date by rebasing, when the changes are ready, merge them back into master; 2: make the change on most stable codebase then merge towards least stable one.)20:05
paltman left20:05
parasti hmm20:06
JensB joined20:10
JensB Hi everybody20:10
bryanray left20:10
bobesponja left20:11
JensB I'm using Git for a Ruby on Rails project (new user). Say I've made a couple commits (all local) in my master branch and now I see I *should* have branched off the master five commits ago, because my idea didn't work out. how would I do that?20:11
MadCoder say you're in branch bar and would have liked to branch off foo20:12
be in bar20:12
git branch foo bar20:12
git checkout bar20:12
git reset --hard HEAD~520:12
johnw joined20:12
MadCoder (provided you have no local modifications, and you never pushed bar, if you did you're screwed)20:13
JensB :)20:13
Ilari offby1: Those ideas have been known for long time (first is called "topic branches").20:13
JensB thanks!20:14
offby1 Ilari: perhaps, but I didn't know them :-|20:14
Ilari MadCoder: Eh... If you are on 'bar', is that checkout going to do anything?20:15
MadCoder no20:15
offby1 I'd certainly heard the phrase "topic branch", but didn't know that it implied that specific workflow (keep up to date by rebasing; merge when done)20:15
MadCoder unless you have a file named bar20:15
there it should error out if your git is recent enough20:15
else it will revert changes to that file20:15
blacky left20:15
wanders left20:15
Soliton left20:15
MadCoder (that's a bug that I fixed in 1.6.sth)20:15
abbe left20:15
bcarlyon|laptop joined20:22
radarek left20:22
pygi joined20:22
wanders joined20:23
bentob0x left20:23
johnw_ joined20:25
diask left20:25
loiseau left20:25
diask joined20:26
Gitzilla joined20:27
bcarlyon|laptopBarryCarlyon20:29
johnw left20:30
tongueroo left20:34
loiseau joined20:35
tongueroo joined20:35
proxiebryanray20:37
Soliton joined20:38
diiask joined20:40
diask left20:40
Sigma left20:42
nikolasco joined20:44
jesselucas_ joined20:45
rtomayko_ joined20:48
comp hi, I made some changes to my local repository (which is clone from somone else's repo) and then merged that remote, which resulted in conflict. That's common thing for me, but I always wondered if it's possible to determine which commit(s) changed my modified lines and thus threw my branch into conflict(s).20:49
drizzd you can find out which commit last modified a line using git blame20:51
That probably doesn't work on unmerged files directly though20:51
offby1 don't the conflict markers include a description of the commit that caused them?20:53
Ilari offby1: Nope, they only can refer to versions being merged...20:54
drizzd seems git blame outputs some funny stuff with unmerged files20:54
00000000 (Not Committed Yet 2008-10-19 22:54:47 +0200 10) <<<<<<< HEAD:file20:55
c3395968 (Clemens Buchacher 2008-10-19 22:53:25 +0200 11) 10 a20:55
^fe2c981 (Clemens Buchacher 2008-10-19 22:53:09 +0200 12) 1120:55
00000000 (Not Committed Yet 2008-10-19 22:54:47 +0200 13) =======20:55
00000000 (Not Committed Yet 2008-10-19 22:54:47 +0200 14) 1020:55
00000000 (Not Committed Yet 2008-10-19 22:54:47 +0200 15) 11 b20:55
00000000 (Not Committed Yet 2008-10-19 22:54:47 +0200 16) >>>>>>> b:file20:55
I'm not sure what the caret means here20:55
hmm, maybe because it's the root commit...20:57
comp so git pickaxe is now git blame?20:57
carllerche left20:57
lydgate joined20:57
comp I thought about some easier way, but that will work too20:58
Ilari comp: Pickaxe is something different.20:58
Tv comp: well the thing is, git doesn't merge your changes commit by commit, so the conflict isn't really "caused" by any single commit20:58
comp Tv: I know, just wanted to know if there's some "automated" tool which uses git-blame ..20:59
tool or way20:59
Tv comp: so what you want to ask is, what commits made these lines that end up being in conflict, and blame is pretty much that20:59
comp: you can give blame ranges etc20:59
something like -L '/^<<<</,/^====/'21:00
comp well in the end, I'd like to cherry-pick only those from the main repository so I don't have to merge like once a week ..21:00
Tv huh21:00
teolicy_ joined21:00
comp it's for single-feature branches21:01
Tv comp: don't cherry-pick unrelated commits into topic branches21:01
i don't see why you'd need to keep redoing any merges21:01
teolicy_ Hello. I'm new to git, and am wondering whether I should bother with gitosis (or another git server... is there?) for my 1-2 user home open-source project.21:02
I mean, would just using git from my two desktops using NFS be enough?21:02
(what would I miss out on)21:02
Ilari teolicy_: Git has shared flag you can set on repository so it overrides overly restrictive umasks...21:03
Tv teolicy_: what about the people who aren't on your home nfs setup?21:03
teolicy_ Tv: That's an excellent question and the reason I started with gitosis in the first place, I thought that would be the quickest way to share over SSH (my server is 'net accessible using SSH).21:04
Tv: What would you recommend?21:04
comp Tv: well how can I then stay in sync with the origin/master? It's a public "fork", so I can't afford rebases even if I wanted to ..21:04
Tv teolicy_: umm, please read the gitosis README.rst and think ;)21:04
rtomayko left21:04
mugwump you don't need to do anything to push via ssh etc21:04
just make sure git is installed on the remote end21:05
Tv comp: well if you merge, then you merge, and git remembers21:05
comp teolicy_: there are few gitosis tutorials on the google ..21:05
teolicy_ Tv: I tried going through two gitosis tutorials, but had trouble installing it on my server (it's a reasonably recent OpenSolaris).21:05
Tv mugwump: you're assuming 1) full shell users or 2) user is willing to set up and understand security implications of git-shell etc21:05
RaceCondition left21:05
mugwump Tv: right, but in a home situation that's21:06
teolicy_ I seem to have trouble authenticating SSH with RSA keys on the gitosis user.21:06
mugwump usually the case21:06
teolicy_ I'm not sure why, I humbly think I'm fairly proficient with SSH.21:06
Ilari teolicy_: But if you have multiple multi-user projects with differing access rules, then adminstering using standard unix tools and shared flag can get painful...21:06
teolicy_: What SSHD are you using?21:06
comp Tv: that's right, just wanted to keep the branch without things like 5 merges in a row ..21:06
deskin joined21:06
advany_ joined21:06
teolicy_ Ilari: OpenSSH_5.1p121:07
Tv comp: man git-rerere?21:07
Gitbot comp: the git-rerere manpage can be found at http://git.or.cz/man/git-rerere21:07
Tv comp: merges even to throwaway branches can remember their conflict resolution; that mechanism is just a cache, not a part of the full history21:07
mugwump teolicy_: if in doubt, use sshd -d -t21:07
er, or is it -d -v, I forget21:07
carllerche joined21:08
Tv teolicy_: something like AllowUsers set?21:08
mugwump the one that makes it tell you why the auth failed :)21:08
Ilari teolicy_: You don't happen to have AllowUsers in SSHD config by any chance? That caused problems for one user day or two ago...21:08
teolicy_ Just to zoom out of gitosis a bit, the reason I came to the channel was that I'd rather not focus on git, but rather focus on my project. Unless I have to use gitosis for SSH based remote access to my repositories, I'd rather not.21:08
Tv, Ilari: No.21:08
d0k left21:09
mugwump you don't. in fact if it's firewalled you can even make git:// push-able21:09
Ilari teolicy_: How do those problems show up anyway? It asks for password?21:09
teolicy_ mugwump: I tried keeping sshd in the foreground and seeing what's wrong, I couldn't discern something obvious in a quarter of an hour and decided before I dig deep into sshd to make gitosis run so I can use git so I can work on my project, maybe I should see if I /really/ need gitosis.21:09
Ilari: Yes.21:09
RaceCondition joined21:10
teolicy_ Ilari, Tv, mugwump: Give me a minute, I'll get it back to a state I can copy from sshd -d21:10
Tv teolicy_: gitosis is absolutely and fully a convenience + extra security wrapper21:10
Ilari teolicy_: Look at .ssh/id_rsa.pub. It should have long block of letters. Look at .ssh/authorized_keys of git user. It too should have long block of letters. Are those blocks the same?21:10
offby1 ssh-copy-id is a handy way to get one's public key into an .ssh/authorized_keys file21:11
Ilari teolicy_: Well, letters, numbers and some other characters...21:11
teolicy_ Ilari: Yes they are.21:11
Ilari teolicy_: Try 'ssh -vvv git@host git-upload-pack foobar'. Does it offer id_rsa for authentication (and then get rejected)?21:12
comp Tv: well I had in mind something little different, but this tool is perfect, thanks21:12
teolicy_ Ilari: Aye, sec. Though the line in my authorized_keys has the following options:21:13
blacky joined21:13
teolicy_ command="gitosis-serve [email@hidden.address] ssh-rsa <... key here ...>21:13
nuncanada left21:13
jesselucas_ If I'm using gitosis, and I setup a hooks/post-update hook to git push to a remote. Is git the user that's pushing it to the remote server. So I'd need to give the git@serverA access to serverB in order for the hook to work?21:13
teolicy_ I thought no command but 'gitosis-serve teo...' would work. No?21:13
Ilari teolicy_: What are permissions of that authorized_keys file and _ALL_ directories up to root directory (yes, SSHD really does check those) and it won't work if they are too lax...21:15
markelikalderon joined21:15
teolicy_ Ilari: On the client (ssh -vvv ...), I see "debug1: Offering public key: /Users/teolicy/.ssh/id_rsa", following which it /looks/ like the key is OK (for example, I can see the forced command the server dictates, etc, But the next thing that happens is my client gives up on that and continues to the next key and then keyboard auth.21:15
Ilari: All permissions are OK. I often use ssh keys for authentication, I humbly think I'm comfortable with it.21:16
Ilari teolicy_: The server sends the forced command back to client?21:17
teolicy_: What SSH client?21:18
teolicy_ OpenSSH_5.1p121:18
paltman joined21:18
dave_h_d joined21:18
teolicy_ This is from the client: "debug1: Remote: Forced command: gitosis-serve [email@hidden.address] I understand the server sent it, otherwise how the client knew.21:19
paltman left21:19
Ilari teolicy_: So the server accepts the key... But why doesn't the client proceed?21:19
teolicy_ This is from the server (when ran with sshd -D -d): "debug1: matching key found: file /home/git/.ssh/authorized_keys, line 2".21:19
Ilari: So it seems.21:20
ia joined21:21
teolicy_ Ilari: Check this out, this is from the server: http://pastebin.com/m66b9b29a21:22
markelikalderon left21:23
markelikalderon joined21:23
Ilari teolicy_: If you remove the commmand part (THIS BREAKS GITOSIS!), does the key allow getting shell? After test, put the command=... stuff back...21:24
advany left21:24
bdiego joined21:25
AreliusFreeNodeArelius21:26
dave_h_d left21:27
teolicy_ I tried that (I've done all steps we did so far including removing the command, and then turned to the channel). I admit this doesn't look very gitosis related, but I got frustrated and came here to hear if there are alternatives. Seems not, as for all I understood so far.21:28
carllerche left21:28
JensB left21:28
Innovia joined21:29
Ilari teolicy_: Create unix user group for developers, and set 'core.sharedrepo' to 'world'... Or something like that...21:29
jaalto left21:29
Innovia hi why my push doesnt update the code on the server?21:29
cehteh because you want to push to a bare repo21:30
teolicy_ Yes, that sounds sucky. I'll focus on fixing getting shell using the git user, then come back.21:30
I think I need gitosis.21:30
Innovia cehteh: what do you mean21:30
Ilari teolicy_: Are you really sure you don't have AllowUsers or any kind of simililar setting in SSHD config?21:30
cehteh repositories on a server where one only pushes to should be created as --bare21:31
that is no checked out sources21:31
read the docs about21:31
if you *really* need some checked out copy then you have to do some little advanced stunts21:31
teolicy_ Ilari: Yep.21:31
You know what, I'll do a magic trick.21:32
Innovia i got the peepcode screencast which explain to create the git repo on my local then scp it to the server then clone it back to my local21:32
teolicy_ I'll add a user and authenticate to /that user/. No gitosis at all.21:32
(again, once we removed command=..., I quit believing gitosis is to blame, this has to be me)21:32
Innovia i want to push and pull21:32
Weasel[DK] left21:32
cehteh Innovia: instead scp'ing you may rather git init --bare a empty repo there and right push to it21:33
Ilari teolicy_: These also sound potentially troublesome: AllowGroups, DenyUsers, DenyGroups...21:33
Innovia can i recreate the git init on the server now with --bare then clone it to my machine?21:34
will i then be able to push and pull freely?21:34
blacky left21:34
Ilari Innovia: Easier way to convert it is just to rename the foo/.git to foo.git...21:35
teolicy_ Ilari: cat /etc/ssh/sshd_config | gegrep -v \# | gegrep 'Allow|Deny' yields nothing but AllowTcpForwarding, which isn't related.21:35
Ilari teolicy_: What's gegrep. And is that search case-sensitive (it should perhaps be case-insensitive)?21:35
bryanray left21:35
charon joined21:36
drizzd_ joined21:36
bryanray joined21:36
Ilari teolicy_: Ah, GNU Grep.21:36
felipec left21:36
Ilari teolicy_: Does the same public key work for some other account on same server?21:38
Innovia Ilari: i rename the directory but how do i make my local changes push (since now the path is broken)21:39
do i need to rename it on both ends?21:39
Ilari Innovia: You can edit the URL in '.git/config'.21:40
Innovia ok21:40
do i need to rename the .git in my local as well?21:40
HopsNBarley joined21:40
Ilari Innovia: No. Doing that rename would in fact break stuff...21:41
Innovia ok21:41
thanks21:41
Ilari Innovia: You probably do want to keep working tree for local repository...21:42
Innovia yes21:42
teolicy_ Ilari: Yes.21:42
(same results with -i on the grep, btw)21:43
Ilari teolicy_: Do logs SSHD saves contain anything relevant?21:43
teolicy_ Anyway, let me try my suggested magic trick (creating another account, very similar to git).21:43
Innovia Ilari: i changed the url, but now when i do push it reply with "No refs in common and none specified; doing nothing.21:43
oops ignor21:45
its a permission denied thing now... i can find where...21:45
teolicy_ Ilari: I think I got it.21:46
Ilari Innovia: Permission denied errors come from standard Unix permissions...21:46
Innovia 755?21:46
Ilari teolicy_: What was the issue?21:46
Innovia: That's OK if users match, but not OK if they don't...21:46
Innovia i saw somewhere that git can only take 2 persmissions 755 64021:46
pantsman left21:46
teolicy_ I /think/ (still need to test) PAM is blocking this because the /etc/shadow entry has *LK* for a password for git (and not for the other user authenticating ok). The *LK* must mean Locked out in Solaris.21:47
I'm checking this now.21:47
Yep. Ugh, how sucky.21:47
Sorry about that. I'll keep going through the git tutorial now... :)21:47
s/:\)/:-\//21:48
Ilari Innovia: Huh... Git also uses (at least used to) 444 a lot...21:48
Innovia my user match but for somereason i get permission denied cant create temp file21:49
Ilari Innovia: Are you pusing over SSH://, GIT:// (yuck) or locally?21:49
Innovia Ilari: that's what i got drwxr-xr-x on mor.git21:49
ssh21:50
nadim_ why yuck?21:50
Tv teolicy_: yeah there's a difference between "no password will ever match" and "locked out", even on linux21:50
Ilari Innovia: Which user owns mor.git? What user are you trying to use on remote side?21:50
Innovia git21:51
git21:51
Ilari Innovia: Is the url something like ssh://git@host...?21:51
Innovia url = [email@hidden.address]21:51
teolicy_ Tv: Yes, I knew that, overlooked it when I copied an old entry from Solaris. They could have just used "locked-out" rather than "*LK*", but what the heck, I guess not everyone imported this.21:51
Innovia i guess i thought since i scp it, the push will remain ssh but i guess i'm way wrong there ha?21:52
Ilari Innovia: You could try 'chown -R git' that repo...21:52
Innovia i did chown -R git:git mor/21:53
is my url is ok? can you tell if its not using ssh?21:53
drizzd left21:54
Ilari Innovia: Perhaps some directory on path to root has no +x for git (through group or world access bits)?21:54
idletask left21:55
Ilari Innovia: Can you get shell as git user on remote side?21:56
Innovia Ilari: when im connected to the remote through ssh i can create files (when su git) inside mor21:56
Ilari Innovia: In practicular inside 'objects/' ?21:57
Innovia you mean connect ssh git@myserver...21:57
nadim_ Any mailing list administrators around?21:57
git has one of the best irc support around and the worst mailing list ever21:58
Ilari Innovia: Can you change directories to / and back inside mor as git user?21:58
nadim_ pasky: around?21:59
Innovia Ilari: i think i know what's the problem, I have mor directory sits in monqiboy user folder, git home folder is empty21:59
is this a problem>21:59
Ilari Innovia: Ah, that permissions-on-path probably can't be the issue as it recognizes git repo on remote side...22:00
Innovia the monqiboy user folder is where my public_html (my site is)22:00
Ilari Innovia: Invalid URLs get very different error message...22:00
kumbayo left22:00
Ilari Innovia: What 'ls -ld objects' shows (inside that repo)?22:01
Innovia yeah the url is absoulete path /home/monqiboy/public_html/mor22:01
let me check22:01
henux joined22:02
Innovia drwxr-xr-x 258 git git 4096 Oct 19 19:42 objects22:02
henux I accidentally committed a change to a local repo, how do I get that back?22:02
tango_ git reset HEAD^22:02
henux I run that command verbatim?22:02
tango_ yes22:03
Innovia Ilari: this is what i get drwxr-xr-x 258 git git 4096 Oct 19 19:42 objects22:03
Ilari Innovia: It should have writing permitted for git user...22:03
henux That didn't do anything22:04
Innovia Ilari: i just created a file inside mor.git from the remote side22:04
henux It just gave me a list of files with local changes22:05
No files were modified22:05
Ilari henux: But it uncommitted last change... See 'git diff HEAD'...22:05
Innovia Ilari: here's my git config file http://www.pastie.org/29591122:06
maybe you can spot something?22:06
henux git is very confusing22:06
Ilari Innovia: Can you paste what push attempt shows?22:07
Innovia yes22:07
check it now just refresh the page22:08
henux Okay how do I see the list of commit messages for the past N commits?22:09
Innovia henux: git log22:09
then just copy the commit # and do git reset --hard and the commit #22:09
@least that's how i do it22:10
Ilari: you can refresh the page i gave you22:10
Ilari Ouch... The error message in earlier versions was sightly more confusing looking, but more informative...22:11
Innovia i have 1.6 installed22:11
Ilari Innovia: Hmm and 'find /home/monqiboy/public_html/mor.git ! -user git' gives nothing?22:13
henux Okay thanks22:13
Innovia Ilari: it shows the content of the repo22:14
Ilari Innovia: Hmm... "pack-objects died with strange error"...22:14
Innovia: AFAIK, pack-objects is not invoked on remote side, it is invoked on LOCAL side.22:14
Innovia: On push anyway...22:14
Innovia should i try to git add . and commit again?22:15
Ilari Innovia: Maybe check permissions of repository you are trying to push from.22:16
Innovia: You should probably have write permissions there...22:16
Innovia i have innovia staff maybe thats my issue22:17
Ilari: drwxr-xr-x 14 Innovia staff 476 Oct 19 18:15 .git22:18
Ilari Innovia: Including stuff like .git/objects and .git/objects/pack?22:18
charon left22:18
Ilari Innovia: That seems correct...22:19
Innovia Ilari: check this http://www.pastie.org/29591122:19
lydgate left22:20
Innovia my packed ref has rw r r22:20
Ilari: if it would be easier i will ftp the mor directory and create the git --bare on the server then clone it back22:20
rubydiamond left22:21
Ilari Innovia: Try creating another repo locally (mkdir ../testrepo; cd ../testrepo; git init --bare) and pushing to it (git push ../testrepo master)... Does that work?22:22
Innovia yes22:23
tongueroo left22:23
Innovia Ilari: if that was a local push then yes i just did what you said and it worked22:24
Ilari Innovia: Well, that test repo is FTPable if you want to FTP it to server...22:24
Gitzilla left22:24
_graham_ left22:27
pehlert left22:28
comp does git-rerere remember multiple merge resolutions which can be applied in one merge from "topic" to "master" ?22:28
(I guess it works that way)22:29
Innovia Ilari: i am trying to create a new git init --bare inside my mor and it just dumps all the git folders in there and give me a out of memory error how do i create the --bare22:29
do i have to create a folder for it?22:30
mithro joined22:30
Ilari Innovia: Huh, 'git init --bare' gives out of memory error?22:31
Innovia yes22:31
Ilari: why does it have to be a bare repo?22:32
this bare is so complicated, i keep getting weird errors like: fatal: This operation must be run in a work tree22:33
mutex what ?22:33
that is pretty unusual22:33
Ilari Innovia: Well, strictly it doesn't, but pushing to checked out branch either errors out or screws the repository...22:33
Innovia all i need is to be able to update my code on the website so that my client can see the changes22:34
parasti what's unusual? that a bare repo doesn't have a working tree?22:34
Ilari parasti: Probably OOM from 'git init'...22:35
DrFrasierCrane left22:35
ereslibre left22:36
Innovia Ilari: i thought that this would be the best way to work with changes to a website22:36
Ilari Innovia: Well, don't you have that bare test repo. You could FTP that to initilize the repo on server...22:36
Innovia Ilari: o.k how do i go about this22:37
Ilari Innovia: Tar that testrepo directory, copy the tar to server and extract...22:38
chris2 left22:38
Innovia here's where i lost you, i have my code in the mor directory, should i just mkdir testrepo, git init --bare inisde that folder then ftp an empty repo to the server?22:39
Ilari:22:39
albertito joined22:39
Ilari Innovia: Nope, push to that repo as well (since that push works)...22:40
henux When I try to set my user.name by `git config --global user.name "My Name"` git gives me "warning: user.name has multiple values" and only my first name is shown in commit logs. How to fix this?22:40
Ilari Innovia: And then FTP the populated repo...22:40
Innovia: There are three pitfalls in copying git repos as files: 1) Doing so invalidates working tree cache data (it needs to be refreshed after copy) 2) Corruption is propagated 3) Copying stuff with remote tracking branches may give unexpected results (if repo is used for cloning)...22:43
Innovia Ilari: http://www.pastie.org/295911, i can google this if you are tired22:43
well i think im gonna use git only as a local thing, if it can push the changes and apply them to the files on the server (not just the ref)22:44
if it can not22:44
Ilari Innovia: You created bare repository inside another repository?22:45
Innovia ???22:45
no22:45
dantrell joined22:45
Innovia mor is not a repo22:45
mor is the code for the website22:45
dantrell Is there a way to change a name on a commit? Like from unknown to <actual name>?22:45
ph^ left22:46
Ilari Innovia: Ah, both the source and target of push must be valid repositories for it work...22:46
parasti dantrell: commits don't have names22:46
trochala left22:46
Innovia so i should create a regular repo inside more and the a bare inside of mor_repo22:46
dantrell parasti: But there's a name (of the person who made the commit) assoicated with every commit?22:47
parasti dantrell: ah, indeed :)22:47
dantrell parasti: How do I change that?22:47
parasti I believe you can use the environment variables documented in man git-commit-tree22:48
Gitbot parasti: the git-commit-tree manpage can be found at http://git.or.cz/man/git-commit-tree22:48
Ilari Innovia: Don't you have local git repo for mor already?22:48
Innovia wiped it out , i just recreated it and push that into mor_repo (bare)22:48
Ilari Careless and destructive recovery attempts are a major cause of data loss...22:49
parasti dantrell: if you don't have your name/e-mail set in config, have a look at man gittutorial as well22:50
Gitbot dantrell: the gittutorial manpage can be found at http://git.or.cz/man/gittutorial22:50
dantrell parasti: It isn't for me, working with a new dev who is using git.. on windows... So his commits say unknown. He has it set now but I'd like to change the previous ones.22:51
bdiego left22:51
dantrell So I'll at commit-tree. Thanks.22:51
look at*22:51
jackdempsey joined22:53
Vortex35 left22:54
Vortex35 joined22:54
parasti dantrell: if there's a lot of history, git filter-branch --env-filter might be preferable... but it's a bit complicated22:55
alb left22:55
robin_ left22:56
robin_ joined22:56
dgrazier joined22:56
WALoeIII joined22:57
abbe joined22:57
abbe hi all22:57
I'm getting an error, while doing 'git pull' or 'git fetch'22:58
fatal: cannot pread pack file: No such file or directory22:58
rtomayko_ left22:58
abbe I'm running git-1.6.0.2 on freebsd 8-current22:58
rtomayko joined22:58
offby1 sounds like the remote repository is messed up22:58
proxie joined22:59
Innovia Ilari: o.k i have the mor_repo(bare) up and extracted now i should just clone it?22:59
abbe offby1, thats gnulib22:59
bryanray left22:59
Ilari Innovia: You can try cloning it if you want to test cloning...22:59
Innovia i'd like to push to it22:59
abbe offby1, so no problem at my end, right ?23:00
offby1 doubt it, but I'm not sure23:00
abbe: why don't you gimme the URL and I'll try it23:00
unless it's an ssh:// URL, in which case I won't have a login23:00
Innovia Ilari: what about the code that is already in the server should i just do commit there23:00
Ilari Innovia: You can't commit to bare repo (using the standard methods anyway)...23:01
abbe offby1, git://git.savannah.gnu.org/gnulib.git23:01
koke left23:01
abbe offby1, thanks in advance :)23:01
Innovia how does it change the code on the server then?23:01
qrush left23:01
Ilari Innovia: Bare repos are usually updated by pushing...23:01
Beowulf_ left23:02
Ilari Innovia: There are other ways, like using bundles...23:02
Innovia hmm, a small missing peice for me here is that i still have files in my mor dir on the server23:02
how are those files knows of mor_repo (the bare one)23:03
offby1 abbe: seems to be working OK23:03
worked fine :-|23:03
teolicy_ I'm getting this ("hooks/post-update: gitosis-run-hook: not found") when using gitosis, after pushes. Is this necessarily an error message, or just a warning that no hooks are defined?23:03
quoin joined23:03
Yuuhi left23:04
Ilari teolicy_: Pushing to gitosis-admin.git?23:04
teolicy_ Yes.23:04
(uhm, to gitosis-admin, I don't know where the '.git$' is)23:05
abbe offby1, hmm..., okay23:05
Ilari teolicy_: Is gitosis-run-hook in the same place as gitosis-serve?23:05
abbe offby1, I'll try again23:05
teolicy_ Yep.23:06
Innovia Ilari: thanks for you help man but i i' giving up, this is not how i thought git works, so git is not for a maintaining live website with changes on it from your local machine I see now that git is just a collaboration tool23:06
bobmcw joined23:07
teolicy_ Though I know I have path issues on that gitosis installation, I had to edit my authorized_keys file to change 'gitosis-serve' into '/usr/bin/gitosis-serve'.23:07
Ilari Innovia: Git used for maintaining live website? Ugh....23:07
Innovia among local repo23:07
abbe any ideas anyone ?23:08
Innovia i thoought i can push my changes to the remote repo , and then the fles will be updated on the server as well23:08
it is just a repo, local or remote, i appreciate your help man23:09
Ilari Innovia: That's very nontrivial to do. It requires some tricky stuff in hook...23:09
teolicy_ Again, I'm not sure why git's shell has no path. When I 'sudo -i -u git' I have a proper PATH.23:09
Ilari teolicy_: What's '-i' to sudo? You probably do need login mode...23:10
Marmouset left23:10
Innovia but generally speaking i have a remote repo and i push from my local , cloning on a different machine (my desktop) would be in sync with what i had on the laptop ( untill the next commit and pull) right?23:10
abbe offby1, git index-pack -v --stdin <.git/objects/tmp_pack_&X8a3H23:11
Ilari teolicy_: Ah, -i is login mode...23:11
abbe offby1, resulted in fatal: pack is corrupted (SHA1 mismatch)23:11
Ilari teolicy_: But interactive logins don't execute .bash_profile!23:11
offby1 abbe: ?23:11
Ilari noninteractive, that is.23:11
offby1 abbe: so the remote had an evil file in objects ?23:11
xaiki left23:11
Ilari Its temporary pack, so it might not be complete...23:12
pygi left23:12
pygi joined23:12
abbe Ilari, okay so how to figure out if it is client side's problem or server side23:13
qrush joined23:13
dgrazier left23:15
bobmcw left23:15
abbe on my gentoo gnu/linux with git-1.5.6.4, I got fatal: Out of memory, malloc failed23:16
qrush left23:16
abbe I simpled 'rsync -a'ed gnulib repo from my FreeBSD 8-CURRENT installation to Gentoo GNU/Linux installation.23:17
WALoeIII left23:19
fujin left23:20
fujin joined23:20
abbe git index-pack -v .git/objects/pack/pack-ee521e12c9e959eab07e67db3d9629c5aa0dd21d.pack23:25
also didn't resulted in any error23:25
xaiki joined23:27
abbe oops, power cut, see you later23:27
abbe left23:27
kef joined23:28
Innovia left23:30
alexross left23:31
markelikalderon left23:32
qrush joined23:33
teolicy_ Ilari: I tried both with and without -i, both have proper paths. Never mind, I appreciate your help, but I think I should go to sleep and read more of gitosis' source.23:33
I don't like it sneaking up behind my back like this, I need to know what its doing.23:33
offby1 sneaks up behind teolicy_23:35
markelikalderon joined23:39
bryanray joined23:39
qrush left23:40
Tv hehe, go to sleep *and* read more source23:40
proxie left23:43
robbyonrails left23:47
henux left23:48
johnw_ left23:50
proxie joined23:54
bryanray left23:55
jesselucas_ left23:56

Logs Search ←Prev date Next date→ Channels Documentation