IRCloggy #git 2009-02-13

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.

2009-02-13

mattenoble_ joined00:00
LiamH left00:01
mattenoble_ left00:02
lu_zero left00:03
program247365 joined00:04
program247365 left00:04
manithree left00:04
brink If I use git-filter-branch to permanently remove a directory can I still pull from the original repository?00:05
DrNick you'll get that directory back00:05
and the merging will be unpleasant00:06
sporkmonger joined00:06
faithfulgeek joined00:07
icwiener joined00:07
brink I just notice that if I delete a directory with git-filter-branch I don't save any space even after git gc. Is there something else I need to do to remove all history of a directory?00:08
jackdempsey left00:08
plediii left00:09
gitte brink: it's all in the reflogs.00:09
brink: just make a (temporary) clone to see the size you'll get in due time.00:09
jstad left00:10
brink gitte: The clone seems to be the same size. Do I need to repack it or something?00:11
gitte brink: try it.00:12
brink gitte: I just did. No luck. All those binaries must be hidden somewhere.00:12
gitte brink: generally, I find that many people are most concerned with the size of the repository after filter-branch, but I'd rather try to make sure that all worked out as expected.00:13
scientes left00:13
shad left00:13
eddyp left00:14
eddyp joined00:14
brink gitte: The directories are gone, but the size remains.00:14
gitte brink: I was not talking about the working tree when I mentioned the desire for verification.00:15
shad joined00:15
brink gitte: Ok. what should I verify?00:16
gitte brink: you should know what you wanted to achieve with the filter-branch call yourself :-)00:17
dmlloyd_ joined00:17
radarek left00:17
brink I wanted it to delete all history of a directory. That way all the binary data that shouldn't have been checked in in first place would be removed.00:17
gitte: Do I misunderstand filter-branch?00:18
gitte brink: no, that's what it should be able to do.00:18
brink: now it is your job to find out if there are references left to those blobs, e.g. by calling "git rev-list --all --objects" and looking for the filenames.00:19
brink gitte: I see. It looks like they used to have different names. So they'll be difficult to chase down I assume.00:22
Sigma left00:22
dmlloyd left00:23
dmlloyd_dmlloyd00:23
gitte brink: See? Much more sense to verify what was achieved than to look at the size... :-)00:23
brink gitte: Yes. Unfortunately, it looks like it will be difficult to track down all the unecessary binaries because they've been moved all over the place.00:24
gitte brink: maybe you want to think about better ways to identify what blobs to remove than the absolute path?00:25
brink gitte: Can they be identified by some other id? They never change their contents.00:26
icwiener left00:27
gitte brink: if you know the exact contents, you might want to identify them by their hash.00:28
elg wonders why vimdiff is preferred over opendiff (osx) when vimdiff is so pitiful for 3-way merges00:28
gitte brink: other than that, you could make a tree-filter (expensive; you want to use a RAM disk for that) that searches for files larger than a certain threshold, and delete them.00:29
brink: you could try to find out what directory names they had, or extension, or if there is another tell tale.00:29
brink gitte: I suppose that wouldn't be hard for an individual file. There are a number of them though.00:30
gitte: Assuming I hashed them is there a way to remove all history of a file using its hash?00:30
gitte brink: I'd probably use an index filter for that.00:30
RoPP left00:33
ideogon_ joined00:33
sporkmonger left00:33
boto_ left00:34
Phlogi left00:34
ideogon__ joined00:36
dwmw2dwmw2_gone00:39
kennethlove joined00:40
stathis_ joined00:42
shawn-p left00:43
stathis_ left00:44
maali joined00:44
ideogon left00:47
cgardner left00:48
sporkmonger joined00:49
bradly left00:49
eean left00:49
sporkmonger left00:49
eean joined00:50
brink gitte: I suppose I could look up the commits and skip those. Does that make sense?00:50
bdiego left00:50
gitte brink: not really, as the commits are not the patches.00:50
brink: commits in Git are snapshots, so if you skip a few commits in filter-branch, but then take some later commit, the files come back almost magically.00:51
brink: IOW filter-branch != rebase --interactive00:51
ideogon_ left00:52
faithfulgeek left00:54
a-priori joined00:57
elg left00:58
a-priori left01:00
shruggar left01:00
mutex so if I want to do a test integration between branch A and B01:02
can I do it on a new branch C, that is a child of either A or B ?01:02
a-priori joined01:03
killerchicken joined01:03
killerchicken hey, I just used cherry-pick to pick a patch. It wouldn't apply cleanly. How can I undo everything to be the way before I picked a patch?01:04
parasti killerchicken: assuming you didn't have any uncommitted changes, git reset --hard should do01:05
killerchicken no, I didn't01:06
I was wondering if there was anything specific like rebase --abort or something01:06
gitte mutex: you can use a throwaway branch C, or you can detach the HEAD, or you can do it on branch A and reset --hard to the pre-merge state afterwards.01:06
mutex: a matter of taste, really.01:06
killerchicken: git reset --hard01:07
killerchicken gitte: :)01:07
jboyens left01:07
nomis is it possible to specify a fake date when committing stuff?01:08
gitte nomis: yep.01:09
nomis how?01:09
gitte nomis: set "GIT_AUTHOR_DATE" and/or "GIT_COMMITTER_DATE"01:09
nomis gitte: ah. Thanks.01:09
gitte nomis: or something similar... my memory could fail me...01:09
mutex gitte: then just merge my integrated branch C at the end to whatever parent I want ?01:10
nomis ponders adding ancient history to a project.01:10
ben_h joined01:11
chris2 left01:12
gitte mutex: maybe, depends what you really want (i.e. when you want to have your real merge, and between what)01:12
plediii_ left01:12
pointlessjon joined01:12
mutex maybe I'll just go for it01:12
see if it blows up01:12
mutex runs to go play with dynamite01:12
faithfulgeek joined01:13
gitte Boom01:14
calin left01:16
mutex well that was painless01:16
1 line merge conflict01:16
sporkmonger joined01:16
gitte mutex: and the best thing: if you activate rerere before you get the conflict, its resolution will be recorded for next time...01:17
mutex yeah I haven't played with rerere yet...01:17
gitte I have.01:17
mutex gasps01:18
mutex I just hear about how neat it is01:18
stories really01:18
toxx_ joined01:18
gitte The only thing that is not so brilliant is that you sometimes ask yourself "where are the conflicts?" until you realize that they have been resolved already by rerere.01:18
mutex I guess you just run it, and everything happens automagically01:18
benn_d fatal: failed to write object ... error: unpack failed: unpacker exited with error code01:19
crap I'm getting a weird error:01:19
gitte Well, you still have to add the "unmerged" files after checking that everything went fine.01:19
mutex ah01:19
gitte benn_d: disk full? lack of write permission?01:19
In any case, my body just threw an "OutOfEnergy" exception.01:20
git night!01:20
gitte left01:20
ekidd left01:20
benn_d yeah ,was a permissions error.. odd01:21
faithfulgeek left01:22
Yuuhi left01:23
mutex problem with exceptions is sometimes they go uncaught....01:24
schierbeck left01:25
toxx left01:26
noth left01:27
toxx_ left01:28
noth joined01:28
EmilMedve joined01:28
sdboyer-laptop left01:28
dwave left01:29
kennethlove left01:29
ajsharp joined01:29
noth left01:29
noth joined01:30
a-priori left01:35
hobodave_ joined01:37
mcella left01:37
hobodave left01:40
offcent joined01:42
hobodave_ left01:43
offcent left01:43
fynn git git git01:44
wallerdev joined01:47
wallerdev yo01:48
so i pushed a branch up to a server (C) from computer A, how do i pull that branch down from another computer (B)01:48
gotnone joined01:49
wallerdev i pushed it with [1,2,3,4].any?{ |e| puts e ; e }01:49
err01:49
i pushed it with git push origin beta:refs/head/beta01:50
elg joined01:50
gotnone I have been having a hard time searching for the commands which will revert my local git tree the remote server. Specifically, I want to remove any extra branches and files I may have inadvertently added. I must have poor searchfu.01:51
lu_zero joined01:53
PerlJam gotnone: git help branch01:53
Naib_ joined01:56
ajsharp left01:58
TML joined01:58
lois[pac] left01:58
priidu left01:59
joshdavey left01:59
faithfulgeek joined01:59
TML What can cause "! [remote rejected] master -> master (n/a (unpacker error))"? I've been Googling for a while now, and am not finding a lot of useful info.01:59
gotnone thanks PerlJam I think I figured out what I needed to do02:00
Naib left02:02
pointlessjon left02:03
hardcorelamer left02:04
a-priori joined02:04
gwoo TML: you are not updated?02:06
wallerdev oh god02:06
lol my git repo is probably so messy now, but i got it02:06
TML gwoo: git pull02:06
Already up-to-date.02:06
gwoo TML: maybe the remote is corrupted?02:07
eletuchy joined02:11
faithfulgeek left02:14
zeahok joined02:14
wallerdev left02:16
TML gwoo: It's a bare repo, this is the first time I've checked anything out of it. I made a one line change, and am now trying to push that change back to the bare repo.02:17
gwoo oh weird02:17
plediii joined02:18
edwardam left02:19
TML Just to check, I just nuked the repo and the clone, set them back up again, and get the same error02:19
gwoo try git-fsck --full02:20
TML http://pastebin.ca/133560402:20
gwoo: On the bare?02:20
gwoo yeah if you can02:21
TML Tried it on both ends, to no avail02:21
gwoo hmm02:21
TML There was no output 'git fsck'02:21
tjafk2 joined02:21
TML s/output/output from/02:21
gwoo http://kerneltrap.org/mailarchive/git/2007/11/9/39992902:22
i found this thread02:22
TML Thanks, I'll take a look at thsoe02:22
those, even02:22
gwoo git repack remote/origin/master02:23
that might help too02:23
loincloth joined02:27
TML Ah, damnit. PERMISSIONS!02:27
That's TWICE today.02:27
gwoo: Thanks. When I was deleting the repo, I was forgetting to chown the files over to the user running git-daemon.02:27
And I just can't seem to find anywhere that it logs an error on that02:27
theCarpenter joined02:28
faithfulgeek joined02:30
gaveen left02:34
faithfulgeek left02:34
tjafk1 left02:34
kapone joined02:36
awarrington__ left02:36
eddyp left02:36
awarrington__ joined02:37
_slacker__ left02:39
faithfulgeek joined02:39
amfwrk left02:40
loinclot_ joined02:40
amfwrk joined02:40
loinclo__ joined02:43
kapone left02:43
loincloth left02:44
hobodave joined02:44
Tv left02:45
ice799 left02:46
kapone_ left02:48
zeahok left02:48
gwoo TML: funny that was my first guess02:48
dj_ryan joined02:48
loinclo__ left02:48
gwoo but i did not say it, damn02:48
dj_ryan so i have a question02:49
gaveen joined02:49
dj_ryan is there a way to reset a github remote-branch02:49
i had a bunch of erronious commits due to ... learning exactly how git push works02:49
plediii_ joined02:52
zaius joined02:52
zaius is there a way to split line by line on an interactive add?02:52
i can only get it down to paragraph sized blocks02:53
loincloth joined02:53
EmilMedve left02:54
loinclot_ left02:57
EmilMedve joined02:58
Flathead left02:59
mugwump zaius: use git-gui03:02
loinclot_ joined03:02
mugwump it can add individual lines03:02
servilio left03:02
plediii_ what is better than using git to do backups with full history?03:03
tro joined03:04
loincloth left03:05
mugwump plediii_: tape? zfs?03:05
mugwump scrams &03:05
icwiener joined03:06
plediii_ mugwump: what software for doing tape backup?03:06
mugwump real sysadmins use dump03:07
Cacheaway left03:08
bdiego joined03:08
zaius mugwump: i'm only on a console03:09
plediii_ mugwump: can dump let me restore backup from any point in the history?03:09
zaius looks like i can use the editor mode if i upgrade to 1.603:09
anyone know an easy way to upgrade to 1.6 on ubuntu 8.10?03:09
plediii left03:11
spearce left03:11
plediii_ mugwump: the only problem I see with git is the pain involved if what you're backing up contains git repositories03:11
and rsync's style of renaming changed files is just lame03:12
jony joined03:15
plediii_ of course other people have already thought of it :-|03:17
loinclot_ left03:18
ideogon__ left03:20
cytrinox_ joined03:20
plediii_ here's what I'm using to to backup my home directory on a remote host. http://rafb.net/p/TX3E6k90.html03:22
Anyone want to tell me why this is stupid?03:23
AngryElf1 joined03:23
AngryElf1 left03:24
elg left03:24
AngryElf left03:24
AngryElf_ left03:25
AngryElf joined03:25
MarcWeber 1234475693 +0100 Is this a timestamp? (found in .git/logs/refs/heads/branch03:25
wallerdev joined03:25
offby1 plediii_: seems complex ... I can't tell by looking if it'll actually work03:25
plediii_ offby1: it seems to work03:26
although the business with find could be simplified somehow03:26
i'm sure03:26
offby1 plediii_: I've got a ton of backup links at http://delicious.com/tucumcari/backup03:26
plediii_ i feel like i must be missing something obvious though03:26
wallerdev okay i seem to have a problemo, i accidentally created a branch refs/head/beta instead of refs/heads/beta, and now i can't figure out how to remove it03:27
Kbyte left03:27
wallerdev i tried this but got: git push origin refs/head/beta03:27
error: src refspec refs/head/beta does not match any.03:27
offby1 I suspect it'd be ok to just delete that file03:28
offby1 glances around nervously.03:28
offby1 how'd you create it?03:28
plediii_ offby1: what do you actually use?03:29
offby1 "tarsnap" and "duplicity".03:29
ben_h strange - i just cloned linus' linux-2.6 tree to poke around, and straight after the clone there are about 20 changed-but-not-updated files.03:29
offby1 But people's backup needs vary greatly03:29
ben_h: are you using Windows?03:29
wallerdev git push origin refs/head/beta03:29
ben_h no, Mac OS X03:29
wallerdev err03:29
ben_h with nontrivial diffs in a bunch of files.03:29
sensible-looking diffs that is03:29
offby1 ben_h: weird.03:29
wallerdev git push --force origin origin:refs/head/beta is how i created it03:30
ben_h obvious code updates - spelling fixes, cleanups, etc03:30
gaveen left03:30
offby1 wallerdev: I think you can nuke it with something like "git push origin :refs/head/beta"03:30
i.e., if your refspec has nothing before the :, that means "nuke this branch"03:31
wallerdev thanks offby103:32
worked03:32
needed the colon i guess03:32
offby1 ha!03:32
I will soon earn my Yellow Belt in git-answering03:32
doener is my mentor03:32
dj_ryan sweet03:32
is there a way to reset a github remote-branch03:33
offby1 you mean, make it point someplace else?03:33
dj_ryan almost, iw ant it to point to a earlier time03:33
there is a pile of cruft commits that were accidently pushed there03:33
the commits also got pushed to a different branch03:33
offby1 I would bet that you could delete it (using the recipe I just gave above to wallerdev) and then recreate it. There's probably a better way, but ...03:33
dj_ryan the "theory" was to branch from a point, then later diff to produce a patch for upstream03:34
utnick joined03:34
plediii_ offby1: thank you03:34
ben_h here's a log of the unexpected local changes: http://gist.github.com/6302703:34
offby1 ben_h: might your "linux" directory not have been empty before you cloned?03:35
only explanation I can think of ...03:35
ben_h nah - if you look higher in the history, i created the directory just beforehand03:36
got me stumped03:36
Flathead joined03:36
ben_h and check the 'git clone' output - ~/projects/linux/linux-2.6 was definitely created by git like normal, so it should be clean03:37
cytrinox left03:37
offby1 crazy03:37
sounds like that's worth a post to the mailing list.03:37
fo' sho'03:37
ben_h mm good idea03:37
lobolife joined03:42
bronson joined03:43
elg joined03:44
kukks left03:45
lobolife left03:48
mlh joined03:48
mlh I have a number of file heirachies around that re mostly the same. Can I git init and add one of them then copy the .git to all the others to find the differences?03:49
It would beat gdiff (doesn't network) and rsync -nvv (doesn't show diffs)03:50
I know there is _some_ metadata specific to a particular clone, but how important or mangleable is that metadata03:51
MarcWeber yes you can. the .git folder contains everything you nded. Hwoeve ryou can also use diff -r $pathA $pathB then03:55
mlh diff doesn't network03:55
MarcWeber: what about the metadata03:55
MarcWeber mlh I don't get the problem. You mean copying the .git folder is faster then mounting and comparing using sshfs or such?03:56
Which metadata.03:56
a-priori left03:57
mlh .git/config will be different if you do a clone rather than do a copy (rsync)03:57
the url in particular03:58
drewr left03:58
MarcWeber mlh: But all you are interested in is git diff , aren't you?03:58
mlh well ...03:58
at first03:58
MarcWeber You an tweak the .git/config manually as well if you konw what you're doing.03:59
mlh but I'd like to use them as real git repos if I could. with commits and merges and whatever03:59
MarcWeber You cann still add remote location create branches etc03:59
mlh yeah it's the if you konw what you're doing" bit that worries me03:59
Is there any docs on that stuff?03:59
MarcWeber Maybe don't diff but jsut use git checkout -b 'new branch'; git commit -am 'initial diff' then03:59
mlh: What kind of stuff. That's normal git usage. Which knowledge are you lacking?04:00
mlh the unknown unknowns :-)04:00
e.g. I wasn't sure that I could do a commit and have it make sense to git.04:01
MarcWeber I think man git-clone does contain the info that you can just copy a git repo instead of using git clone. everything but .git is a working copy. Thus you it doesn' matter wether you move .git or modify the working copy files04:01
Gitbot MarcWeber: the git-clone manpage can be found at http://git.or.cz/man/git-clone04:01
mlh BUt from what you've written about it looks like I can04:01
"it doesn't matter"04:01
MarcWeber mlh: If you're still unsure you can make small test. Try your use case with 2 files in /tmp04:01
mlh so why is the url different.04:01
MarcWeber the url in .git/config ?04:01
mlh e.g. if I clone it and then do a git ftech in the clone I guess it pulls from the cloned from repo04:02
MarcWeber the remote url of origin?04:02
mlh whereas if I copied it, the fetch would pull from the common upstream04:02
aziz left04:02
MarcWeber Cause git clone always sets the remote url of default remote location called "origin" to teh repo you cloned from04:02
mlh yep. git clone does. and cp -a doesn't.04:02
so that's one difference.04:03
elg left04:03
MarcWeber mlh: Just rewrite the config so that it fits your needs. There are more minor differences. git clone might create hard hardlinkes (see man page). But they shouldn't affect the final behaviour04:03
mlh ok thanks.04:03
Bass10 left04:03
JohnFlux joined04:04
MarcWeber mlh: You can then just do git remote rm origin; git remote add origin $newurl and you're done. If you're really unsure start making a backup of those dirs. What can go wrong then?04:04
mlh I think it would be a nice enhancement to git so that it keeps such differing metadata outside of .git --- say in $HOME/.git-data or somesuch04:04
JohnFlux Are there any git developers in here?04:04
mlh (I know that would introduce other issues though)04:04
JohnFlux I want to try to persuade someone to make the error messages more helpful :)04:04
MarcWeber mlh: Which kind of meta data? If you have to put such kind of questions you've done above you should read more about git before putting such a request :-)04:05
JohnFlux: The mailinglist could be a good place to start. Which one is bothering you (I'm not a developer though)04:05
JohnFlux MarcWeber: pretty much all of them :-) I think it would help if they listed options to resolve the error that they give04:06
mlh MarcWeber: ok. I did look. But couldn't find a canonical categorical list with specificed semantics. Not that I was really expecting such.04:06
JUst a vague "should be ok" is good enough for now04:06
MarcWeber mlh: Thats what I was telling you all the time :-) I told you go on go on..04:07
cpgcpg|dinner|brb04:07
mlh yep. is good.04:07
MarcWeber mlh: semantics of the git config? Try man git-config04:07
Gitbot mlh: the git-config manpage can be found at http://git.or.cz/man/git-config04:07
JohnFlux MarcWeber: 'git checkout master' 'You have local changes so cannot switch branches. Maybe commit your changes: git commit -a or Delete your changes: git rebase --hard"04:07
MarcWeber: an error message like that would be good :) Listing the options that I have to resolve each problem04:08
MarcWeber JohnFlux s/rebase/reset :-)04:08
JohnFlux: Do you know how to use grep ? Then you could replace those messages by better once and send the suggestions to the mailinglist.04:08
JohnFlux MarcWeber: see, even more evidence that the error messages should be useful :)04:08
MarcWeber JohnFlux: In this use case you should mention git stash as well04:08
JohnFlux MarcWeber: what does that do? :)04:09
mlh looks like git-config is about ~/.git-config not somerepo/.git/config04:09
MarcWeber git stash = save changes to the git internal memory place "stash" (which is kind of special commit) which you can restore by git apply later on any other commit04:09
mlh er cancel that04:10
theCarpenter left04:10
MarcWeber mlh: Both are the same. you can set defaults int ~/.git-config and overwrite them in .git/config.04:10
done :)04:10
bdimcheff joined04:13
cemerick joined04:13
mlh MarcWeber: one thing I'd really like to know but can't really test for is whether .git/... would ever have a self-reference04:14
markelikalderon left04:14
MarcWeber What do you mean by self-reference?04:15
reprore__ left04:15
moconnor joined04:15
ekidd joined04:17
TML .git/hooks/post-update doesn't seem to execute when I do "git commit". I've checked that it has the execute bit set, what else do I need to do?04:18
jstad joined04:19
Tv joined04:19
MarcWeber TML try strace -o /tmp/out -f git commit ... Then you'll see that post-update isn't read at all. you should use the post-commit hook for that04:21
halfline TML: i once ran into a server where the public_html directory was on a home dir that was mounted noexec. the way I got around it was rm post-update; ln -s /usr/bin/git-update-server-info post-update04:21
bdiego left04:21
halfline grr didn't see the "git commit" part04:21
TML MarcWeber: hah..right04:21
post-update needs to be on the bare repo04:22
Got it exactly backwards. Thanks.04:22
wallerdev left04:25
faithfulgeek left04:28
johnw i want to sync up a directory with files from my index. I know that checkout-index can update the changed and new files, but how do I delete the files in this mirror which have only been removed via rm --cache?04:28
git clean?04:29
h0nk joined04:29
Tv johnw: reset --hard?04:29
johnw oh, no, that needs a .git dir in that directory04:29
Tv nothing needs .git in a specific directory, --git-dir is for that04:29
johnw i'm trying to maintain an external DIR as an "image" of my cache04:29
but I don't want to rm -fr and recreate it every time04:29
Tv why not just have a clone, then?04:30
johnw i'm doing this to make a better pre-commit hook04:30
Tv local clones are cheap04:30
johnw because I can't push an index04:30
checkout-index won't remove files04:31
i guess i can parse the output from git clean -n to find out what should be removed04:32
samsoffes joined04:33
softdrink left04:33
Hydrogen joined04:33
warthog9 left04:34
Tv johnw: umm, why isn't reset --hard what you want?04:34
johnw because I have no .git directory in this copy04:34
warthog9 joined04:34
Tv johnw: --git-dir=04:34
a-priori joined04:34
johnw you're not understanding what I want to do04:34
Tv johnw: just make sure you use a different index file04:34
johnw i need a directory B to be an updated copy of my index, nothing else04:35
girishr joined04:39
Tv johnw: rm -rf a tmp && mkdir a tmp && ( cd a && git init && echo foo >bar && git add bar && git commit -m first; ) && ( cd tmp && GIT_INDEX_FILE=.index git --git-dir=../a/.git reset --hard; ls; ) && ( cd a && git mv bar baz && git commit -m second; ) && ( cd tmp && GIT_INDEX_FILE=.index git --git-dir=../a/.git reset --hard; ls; )04:40
muthu_ joined04:40
johnw doesn't reset --hard reset to HEAD?04:41
Tv yes?04:41
johnw i need the *index*04:41
not HEAD04:41
Tv then you need plumbing, not porcelain..04:41
johnw yeah04:41
sporkmonger left04:41
johnw this is what I have so far: http://gist.github.com/6305004:42
Tv checkout-index04:42
not sure if that'll actually remove rules04:42
johnw rules?04:42
Tv sorry files04:43
brain fried04:43
johnw oh, oops04:43
it's going to remove them in my working tree!04:43
jstadjstad|away04:43
Tv johnw: your clean is misguided, at least04:43
johnw i just need to pipe to (cd $TMPDIR; xargs rm) instead04:44
Tv johnw: cd $TMPDIR && git --git-dir= might work better04:44
or --work-tree04:44
or just use ls-files | xargs04:44
don't pipe clean output04:44
johnw why not?04:44
Tv don't use porcelain programmatically, go for plumbing instead04:44
plumbing is api, porcelain is human-friendly04:44
ls-files gives you same in guaranteed output format, with \0 termination and all04:45
johnw so, how do I list files registered for deletion in the index only?04:46
ls-files -d isn't it04:46
jstad|awayjstad04:46
johnw oh, -t04:46
Tv there's no such thing as registered for deletion in index ;)04:46
johnw deleted in the index04:46
then04:46
Tv i think you want -o04:47
there's no deleted in index04:47
johnw -o shows all non-index files04:47
Tv that's just "no entry in index"04:47
johnw i did "git rm --cached foo"04:47
now I want a list that shows just "foo"04:47
cpg|dinner|brbcpg04:47
Tv rm --cached removes it from index, afaik04:47
johnw yeah04:47
how do I find out that that happened?04:47
Tv so you want a list of files that are in dir but not in index04:48
aka -o04:48
johnw i.e., that between HEAD and index, a file was deleted04:48
i don't want files in dir but not in index, but rather in HEAD but not in index04:48
Tv diff-index04:48
johnw ah, great04:48
Tv --name-status --diff-filter=..04:48
johnw what does diff-filter do?04:49
ahh04:49
Tv git-diff-index - Compares content and mode of blobs between the index and repository04:49
johnw you're a wonder04:49
git diff-index --cached HEAD --name-status --diff-filter=D04:49
greyface left04:49
psankar joined04:49
johnw if a file is renamed, does it show up only once as "R"04:49
?04:49
i'll try it out04:49
cemerick left04:50
johnw ah, it shows D and A, not R04:50
git diff-index --cached HEAD --name-only --diff-filter=D -z | xargs -0 rm is actually what I needed, thank you Tv!!04:51
Tv johnw: you need to ask to get rename detection04:51
rm -f --04:52
xargs --no-run-if-empty04:52
;)04:52
johnw ooh, good point04:52
you are a shell scripting yoda04:52
Tv been around that block a few times04:52
johnw xargs --no-run-if-empty -0 rm -f --04:52
perfect, i'll remember this04:52
parasti left04:53
ekidd left04:53
johnw http://gist.github.com/6305004:53
how's it look now?04:54
any other gotchas?04:54
ah, it doesn't exit 1 if myacprep fails04:55
Tv set -e04:55
johnw what does that do?04:56
Tv cd foo && ...04:56
set -e makes it fail if any command fails04:56
ekidd joined04:56
Tv anyway, i'm off to play Left 4 Dead ;)04:56
johnw ok, i edited the gist again04:57
have fun!04:57
i'd love to find 3 friends to play that with04:57
ah, xargs doesn't like rm -f --04:57
amitprakash joined05:01
amitprakash err.. can someone please tell me again how to ask git to ignore a file name Manifest in any folder in the repo?05:02
offby1 I think just put "Manifest" in .gitignore05:04
amitprakash offby1, and .gitignore is in .git folder ?05:04
jast no, .gitignore belongs somewhere in the working tree05:05
SRabbelier joined05:05
jast if you want an untracked list of ignored patterns, use .git/info/exclude05:05
girishr left05:05
tjafk1 joined05:10
ekidd left05:14
a-priori_ joined05:14
amitprakash left05:16
amitprakash joined05:17
sdboyer_ joined05:18
girishr joined05:18
sverrej left05:23
releod joined05:23
peritus joined05:24
ashleyw left05:24
h0nk left05:25
tjafk2 left05:27
sdboyer left05:27
a-priori left05:28
sverrej joined05:29
chalky joined05:30
sdboyer__ joined05:31
error404notfound joined05:32
ashleyw joined05:33
krawek_ left05:36
pigeon left05:37
pigeon joined05:37
plediii joined05:37
jstadjstad|away05:39
edwardam joined05:39
edwardam left05:40
a-priori_ left05:41
jstad|awayjstad05:42
jstad left05:42
sdboyer_ left05:43
Circuitsoft Is there a way to tell fetch to only get heads with a name beginning with "my_namespace/"?05:43
johnw yes05:43
in your .git/config file05:43
you'll see it now says refs/heads/*05:44
just change it05:44
Circuitsoft Any way to do it on the command line?05:44
nevermind. I guess that helps well enough.05:45
johnw you can use the "git config" command05:45
to manipulate the same variable :)05:45
i just thought editing it would be easier05:45
Circuitsoft Next Q: A submodule in a commit points to the sha1 of the tree in it's place when the top tree was committed.05:45
Hydrogen left05:45
johnw if I understand you, yes05:46
Circuitsoft Could that submodule point to a different head in my git repo?05:46
johnw sure05:46
i actually do that myself05:46
Circuitsoft Like a combination of submodule and git-new-workdir05:46
johnw the submodule's URL is just "."05:46
Circuitsoft cool.05:46
giallu left05:46
hobodave left05:46
plediii_ left05:47
peritus left05:47
Circuitsoft I'm working on a bug tracking system using git as a backing store.05:47
(Maybe backing store is the wrong phrase)05:47
johnw yeah, i've written one too05:48
karan joined05:48
Circuitsoft I planned on using one single git repo as the bug store for all projects in our company.05:48
Tuomas joined05:48
Circuitsoft First commit, in that repo, which is tagged, would be a template of an empty bug report.05:48
then refs/heads/projectname/<sha of original bug report> would point to each bug report.05:49
hobodave joined05:49
Circuitsoft Fetch refs/heads/projectname/* as a "bugs" remote on each workdir using it05:50
And I wanted a location where I could "check out" bugs so that they could have test cases in their subtrees, and those test cases could know exactly where, relative to the source, they are checked out to.05:50
amitprakash left05:51
mlh MarcWeber: re self-reference; e.g. the name of the directory in which the repo sits be mentioned somewhere within .git/config05:55
I wouldn't expect such a thing; just giving an example of seomthing that might bugger up an rsync/cp -a of a repo05:56
Hydrogen joined05:58
ben_h is there a git equivalent to 'svn export'? i googled and found 'git archive', but it doesn't look like that does the same thing.06:00
curvature left06:01
curvature joined06:01
Circuitsoft Is that basically "check out, using my working copy as a reference to speed it up"?06:01
hobodave left06:01
zeahok joined06:02
bdimcheff left06:03
zeahok With git, how can i modify without commit on more than one branches?06:04
Circuitsoft ben_h Exactly what result do you expect from this export-like-thing?06:04
zeahok - Easiest way is probably with stash.06:04
However, it's easy enough to amend a commit that you haven't pushed that you may as well commit, then come back later and reset the commit.06:04
hobodave_ joined06:05
zeahok oh, i see06:05
thx06:05
Circuitsoft There's also a git-new-workdir script, but it causes havok if both workdirs ever sit on the same branch.06:05
ben_h Circuitsoft: a checked out copy of just the given commit - i.e. without /.git and untracked files06:06
Circuitsoft Fastest probably would be to do "git archive <tree-ish> | (cd /where/to/put/them; tar xv)"06:07
coffee1 joined06:07
zeahok and if i commit before switch to another branch, and later, i switch back and reset the first branch, this temp commit is just as if never exists, right?06:07
ben_h Circuitsoft: ahh, git archive outputs a tar?06:07
nice06:07
Circuitsoft zeahok: As long as you don't push.06:07
ben_h - unless you say --format=zip06:07
git archive is a very lightweight operation.06:08
Probably close to, if not as fast as, checkout.06:08
coffee1 hi all.. new to git here, sort of stuck. doing git pull shows me You are in the middle of a conflicted merge.06:09
Circuitsoft coffee1: git mergetool06:09
Kind of a wizard - simple, but nice.06:09
ben_h Circuitsoft: that's good, thanks - i reckon i might wrap that up into a 'git-export' script06:10
Circuitsoft ben_h - you can also do06:10
GIT_DIR=/path/to/git/workdir/.git git checkout <tree-ish>06:10
johnw left06:11
Circuitsoft or, wait...06:11
That would change your HEAD.06:11
Nevermind.06:11
reithi joined06:11
coffee1 Circuitsoft: when im done wiht mergetool, and i chose left and rights.. do i just do "save merged"?06:14
Circuitsoft mergetool will add results that you confirm to the index for you.06:14
Then you just commit and you're done with the merge.06:14
coffee1 err06:14
this is the first time im using mergetool, fairly new to commandline git (coming from tortoise svn)06:15
Circuitsoft oh.06:15
coffee1 basically when im done choosing my left and rights...06:15
how do i close out of it06:15
Circuitsoft mergetool brought up some sort of graphical merge tool. It supports several. I likely haven't used the one you're using.06:15
Is it using tortoisemerge?06:15
coffee1 ok i'll just click buttons06:15
Circuitsoft What program is it?06:16
coffee1 filemerge06:16
launched when i ran git mergetool :)06:16
hagabaka left06:17
ben_h left06:17
nick_h[litage] left06:17
Circuitsoft Are you on a mac?06:17
peritus joined06:18
hagabaka joined06:18
coffee1 ya06:18
Circuitsoft You probably do want to do "save merged"06:18
that will return to mergetool, and it will continue with the rest of it's steps.06:18
karan left06:20
ijcd_ joined06:20
kanru joined06:21
ijcd_ left06:22
zeahok i accidently run <git reset HEAD^> more than once, when i want to cancel temp commit. is there anyway to cancel git reset?06:23
coffee1 ar06:23
now i do git pull, and i get this weird msg: error: Entry 'app/controllers/about_controller.rb' would be overwritten by merge. Cannot merge.06:23
peritus__ joined06:24
Circuitsoft coffee1: app/controllers/about_controller.rb is an untracked file.06:24
Either add it, or, my favorite, do a "git stash" to save it for later then pull.06:24
kevlarman zeahok: find the most recent commit you want to keep in git reflog06:24
moconnor left06:24
coffee1 untracked.. so i have to manually set every new file to be understood by git?06:24
kevlarman and reset to it06:24
Circuitsoft coffee1 - yes.06:25
johan-s left06:25
coffee1 isn't that a bit annoying though?06:25
what if i accidentally create a new file, and forget to track it06:25
Circuitsoft That way, in the case of compiled languages, it's easy to avoid committing object and other temp files.06:25
In that case, do a commit --amend.06:25
peritus left06:25
Circuitsoft Or, yet another option, use "git fetch" instead and manually merge the remotes in.06:25
gitk --all is quite handy.06:25
coffee1 hmm lots of options here lol06:26
so gitk --all then.. that will track all my new files?06:26
SLiMIT left06:26
Circuitsoft That will show you the entire history tree so you and browse around on it and merge with it more easily.06:27
I use it kinda like a GPS.06:27
or map.06:27
releod left06:27
moconnor joined06:27
zeahok so git will track each commit or reset that i did, and i can set the current state to any of them ?06:30
Tv zeahok: resets aren't part of permanent history..06:30
zeahok: this may or may not help: http://eagain.net/articles/git-for-computer-scientists/06:30
Circuitsoft zeahok - The reflog is really more of an emergency facility that's there when you need it than something to rely upon every day.06:31
zeahok thx, but i just tend to make mistakes all the time ^_^06:32
Circuitsoft That's okay.06:32
It's good for reverting a mistake you just made.06:32
If you did a reset a few months ago, you can't undo it.06:32
ZiGzAg_ left06:32
ZiGzAg__ joined06:32
Circuitsoft So, as long as you notice your mistakes quickly, you'll be fine.06:33
johnw joined06:33
zeahok so i should use reset when i want to forget it, and use revert when i want to remember it?06:33
coffee1 ugh06:34
i can't git push... " ! [rejected] master -> master (non-fast forward)"06:34
Circuitsoft Did you reset master?06:34
As long as no one else is pulling from that repo, do a "git push -f"06:35
(force)06:35
Beket left06:39
Eulex joined06:42
Hydrogen left06:43
sverrej left06:43
sverrej joined06:44
chalky left06:52
samsoffes left06:53
Bennid joined06:53
samsoffes joined06:54
samsoffes left06:54
j416_pod joined06:56
johnw left07:00
ludde joined07:01
elmarco left07:01
elmarco joined07:01
jmspeex left07:02
joshdavey joined07:02
Laibsch joined07:05
coffee1 left07:05
plediii left07:06
plediii joined07:07
icwiener left07:09
Laibsch "git mv A dir/;git commit dir/" treats the change as if dir/A was added instead of moved. If I consolidated a couple of files into that directory how can I correctly commit this as a move operation without specifying each and every single file on the command line?07:09
Circuitsoft Laibsch - there's no difference.07:10
doener "git commit dir/" means "commit only the changes for file matching the path spec dir/"07:10
Laibsch Circuitsoft: I am sorry, I don't think you understood my question.07:10
Let me try again07:10
RandalSchwartz most moves are irrelevant to git07:10
doener so the removal of A is not committed07:10
RandalSchwartz if it's intereting to git, it'll just be noticed07:10
Laibsch doener: OK, understood.07:10
RandalSchwartz interesting07:10
the "git mv" command is completely irrelevant07:10
Circuitsoft yup07:11
doener Laibsch: you can do "git add dir; git commit" or "git commit -i dir"07:11
RandalSchwartz it adds nothing to the commit07:11
commits are just "the new tree"07:11
Circuitsoft It will, however, detect the move later if you do a diff and pass the proper filters to gitdiff-core07:11
RandalSchwartz they contain no info of renames, deletes, or adds07:11
i know it's hard to imagine that the extra meta info isn't being used, but in fact, it isn't. it's derived from contents when needed.07:12
doener Circuitsoft: well, what Laibsch did would never end up in git detecting a rename, only a copy, and only when using --find-copies-harder07:12
Laibsch doener: Thank, -i seems to do what I want07:12
stephenlb left07:12
agenteo left07:13
j416_pod left07:13
Laibsch RandalSchwartz: I think you are mistaken (coming from an mtn background, so you are the expert). Think about git log07:13
RandalSchwartz git log is derived from commits07:13
Laibsch http://wiki.openembedded.net/index.php/Upgrading_Packages07:14
doener Laibsch: no, he's right in the fact that no rename meta data is stored07:14
RandalSchwartz and commits don't care about renames, or deletes, or adds.07:14
doener Laibsch: that's all derived from the content07:14
Laibsch OK, I'm still rather new to git07:14
RandalSchwartz a commit is a tree plus parents07:14
Circuitsoft Laibsch I just read a bunch about the git diff core today, and it was quite insightful on just this question.07:14
RandalSchwartz git log derives its data from comparing two commits07:14
Circuitsoft I'll see if I can find a link.07:14
RandalSchwartz nothing in there talks about rename07:14
doener Laibsch: he just missed the fact that your command sequence never committed the removal of A, so there's no way for git to detect a rename there07:14
bobesponja left07:14
Laibsch ic07:15
RandalSchwartz "ic"?07:15
Laibsch Let me see if I understand this properly07:15
RandalSchwartz 'ick'?07:15
Laibsch I see07:15
RandalSchwartz are you paying for IRC by the character?07:15
Laibsch No, I am not a Berliner ;-)07:15
RandalSchwartz if so, sucks to be "you"07:15
Laibsch ;-)07:15
RandalSchwartz or even "u"07:15
Laibsch I am lazy07:15
RandalSchwartz please don't be07:15
doener RandalSchwartz: nah, sux2bu07:15
RandalSchwartz some people here aren't english speakers07:16
when you abbreviate, they may not follow you as well07:16
Laibsch I'm not07:16
RandalSchwartz so there you go07:16
Laibsch alright07:16
RandalSchwartz don't be skimpy07:16
Laibsch btt ;-) back to topic07:16
Circuitsoft I really don't get why txting is popular.07:16
Laibsch Let me see if I understand this properly07:16
RandalSchwartz Circuitsoft - blame sms07:16
Circuitsoft When I send SMS messages (160 char limit) I still use full words and sentences.07:16
RandalSchwartz 140 char07:16
becuase twitter is the same07:16
Circuitsoft 160 on CDMA in the us...07:17
RandalSchwartz odd07:17
doener 160 over here (Germany), too07:17
RandalSchwartz sms is 140 in the us07:17
Circuitsoft AFAIK, SMS is always 160 chars07:17
Laibsch "cp a.txt b.txt ; git rm a.txt ; git add b.txt;git commit a.txt b.txt;git log b.txt" will show me the complete history of a.txt as well?07:17
Circuitsoft Twitter is 160 chars07:17
yes07:18
spooneybarger joined07:18
Laibsch Because if that is not the case a rename is not the same07:18
doener Laibsch: no, but "git log --follow b.txt" will07:18
Tv Circuitsoft: umm, twitter is 140 chars07:18
RandalSchwartz weird - why is twitter 140 chars then?07:18
doener Laibsch: but the same is true for "git mv a.txt b.txt"07:18
Tv they reserve some to say from who the tweet was, when they send SMS to your phone07:18
anyway, who uses sms anymore07:18
stop giving greedy telcos money07:18
Laibsch doener: OK, but then the "git mv;git commit -i" thing will automatically do the right thing and thus be "better"07:18
Circuitsoft Laibsch: git blame will also follow history back.07:18
Arjen SMS is 1120 bits, which is 160 or 140 characters, depending on 7 or 8 bit characters07:19
RandalSchwartz ahh07:19
Circuitsoft Okay.07:19
So SMS is 140 chars in languages that aren't 7-bit clean.07:19
doener Laibsch: hm? it's more convenient to use "git mv a b" than to use "mv a b; git add -u a; git add b", yes. But otherwise, there's no difference07:19
RandalSchwartz in fact... cp a /tmp/xx; git rm a; cp /tmp/xx b; git add b07:20
that'd do the same as "git mv a b"07:20
chalky joined07:20
comebo left07:21
thiago_home joined07:21
RandalSchwartz the actual "mv" isn't recorded in the mv07:21
er... commit07:21
giallu joined07:21
Tv Circuitsoft: that's not really true either because then there's the bastard version that repurposes {|}[\] for non-ascii characters ;)07:22
rphillips left07:22
topinupa joined07:22
Circuitsoft Tv: I'm not aware of that.07:23
Tv Circuitsoft: that was used heavily in the days of non 8-bit safe transports on usenet etc07:23
recently i've seen some spam with that encoding, which means somebody fed old usenet archives to a markov chain ;)07:24
rphillips joined07:24
ashleyw left07:25
Tv http://en.wikipedia.org/wiki/7-bit_ASCII#Incompatibility_vs_interoperability07:25
mikeando joined07:25
robinr left07:26
gaveen joined07:26
samsoffes joined07:27
Weaselweb joined07:29
ph^ joined07:29
samsoffes left07:32
tansell joined07:34
kate21de joined07:35
\ask- joined07:40
CardinalNumber joined07:41
dj_ryan hmm07:44
a question07:44
im trying git rebase07:44
dealing with the conflicts... once i hit 'git add file/been/resolved'07:45
it dissapears07:45
reprore joined07:45
dj_ryan and git rebase --continue dosnt work07:45
JohnFlux should I add the m4/ directory to git?07:45
in a c++ progarm07:45
scheng joined07:47
hdl2 joined07:48
fynn when I "git diff", it doesn't show the contents of added files.07:48
how can I get that?07:48
Circuitsoft fynn - do you want to diff the index against the working dir or against HEAD?07:49
ZiGzAg__ anyone who uses githooks?07:49
reprore left07:49
doener fynn: if you "git add" a file, it's added to the index, so the diff of the working tree against the index (that's what "git diff" does) is empty07:49
fynn: "git diff --cached" would show it, as that diffs the index against HEAD07:50
fynn: with recent git versions, you can do "git add -N file", that just records that you intent to add the file, so "git diff" will show it07:50
mikeando left07:51
fynn doener: OK, how do I see both --cached and vanilla?07:51
doener "git diff HEAD" ==> working tree against HEAD07:51
fynn doener: thanks :)07:52
bentob0x joined07:52
doener dj_ryan: and "git rebase --continue" says what?07:52
thiago_home left07:54
ProperNoun left07:55
ZiGzAg__ i cant find much documentation of the githooks, and creating a simple script like "touch /tmp/test" as commit-msg and chmod'ing to 755 doesnt do anything.. do i have to commit and push the files in the .git folder too?07:55
theCarpenter1 joined07:55
johnw joined07:56
doener ZiGzAg__: you can't even add those files.07:57
ZiGzAg__: how did you test that hook?07:57
ZiGzAg__ i manually moved the file in the main repos07:59
moconnor left07:59
doener "main repos"?07:59
ZiGzAg__ on the server08:00
doener hooks work locally... the commit-msg hook is triggered by "git commit", so of course you need that hook in a repo where you actually run "git commit"08:00
UnwashedMeme left08:00
ZiGzAg__ ah, damn ofc.. im still transitioning from cvs08:01
ceyusa joined08:05
melvinram joined08:05
morph__ joined08:06
morph_ left08:06
morph__morph08:06
ZiGzAg__ left08:06
morphmorph_08:06
theCarpenter1 left08:07
zobie joined08:07
UnwashedMeme joined08:08
zobie left08:09
girishr left08:09
tansell left08:10
ph^ left08:10
telmich moin moin08:12
what's the easiest way to find out, whether a commit was introduced before or after a specific commit or tag?08:13
UnwashedMeme1 joined08:13
johnw for the tag case, use git describe08:14
as in "git describe $commit"08:14
that will tell you which tag it's a part of08:14
for the general case, I would just say git log --pretty=oneline | grep $commit08:14
to see if it's in the list08:14
ph^ joined08:15
telmich hmm08:15
fynn left08:15
johnw ah, you wanted before or after08:17
one thing you can do is: git show-branch $commit1 $commit208:17
then you'll see the relative history between the two08:17
telmich johnw: git describe $commit is pretty near to what I searched08:17
ph^_ joined08:19
mcella joined08:19
telmich johnw: git show-branch 89c581b3fb2986e303f1299e6458e3e9b115fa3f 2.6.29-rc4-1-gd5b5623 and git show-branch 2.6.29-rc4-1-gd5b5623 89c581b3fb2986e303f1299e6458e3e9b115fa3f both show many commits08:21
johnw: but this does not make clear for me, whether 89c581b3fb2986e303f1299e6458e3e9b115fa3f is already part of 2.6.29-rc4-1-gd5b5623 or not08:22
johnw they show the relative histories08:22
ah08:22
telmich johnw: the problem I'm solving is: i got a patch, that should fix my wlan problem; but I think the kernel I built already contains the patch (with a seperate commit)08:23
now I'm searching for the easiest way to tell the developer that I'm already running a kernel using that patch08:23
ProperNoun joined08:24
Niamor7 joined08:24
johnw do you know the commit id of the patch?08:24
telmich yep, it's 89c581b3fb2986e303f1299e6458e3e9b115fa3f08:24
johnw and you want to know if your current branch includes this commit?08:24
telmich and 2.6.29-rc4-1-gd5b5623 is the "kernel version" I'm running08:25
[1]metaperl_work joined08:25
telmich johnw: no, I want to know whether 2.6.29-rc4-1-gd5b5623 includes this commit08:25
johnw ah, ok08:25
now I get you08:25
telmich because currently I'm building latest linux-2.6, so HEAD is different08:25
drizzd_ git rev-list d5b5623..89c581b3f08:26
dmlloyd_ joined08:26
drizzd_ 89c581b3f is included if the output of this command is empty08:26
johnw yes, drizzd_ is right08:27
was just getting the args right on the same command08:27
UnwashedMeme left08:27
ceyusa left08:27
CardinalNumber left08:27
gaveen left08:27
pigeon left08:27
Daniel_B left08:27
Niamor left08:27
Ratler left08:27
MarcWeber left08:27
schlort left08:27
metaperl_work left08:27
precision left08:27
PugMajere left08:27
johs left08:27
Bracki left08:27
jacobat left08:27
milli left08:27
Helios left08:27
andres left08:27
com4 left08:27
mpr left08:27
radii left08:27
kadoban left08:27
multani left08:27
mike_m left08:27
Pieter left08:27
lamont left08:27
KiBi left08:27
ruphy left08:27
cnu left08:27
dotwaffle left08:27
eMBee left08:27
jpeeler left08:27
[1]metaperl_workmetaperl_work08:27
telmich ok, in that case it's not (got some commit ids)08:27
jchris left08:27
ceyusa joined08:28
CardinalNumber joined08:28
gaveen joined08:28
pigeon joined08:28
Daniel_B joined08:28
Bracki joined08:28
Ratler joined08:28
MarcWeber joined08:28
schlort joined08:28
ruphy joined08:28
lamont joined08:28
mpr joined08:28
Helios joined08:28
jpeeler joined08:28
multani joined08:28
kadoban joined08:28
mike_m joined08:28
jacobat joined08:28
eMBee joined08:28
cnu joined08:28
precision joined08:28
johs joined08:28
milli joined08:28
radii joined08:28
com4 joined08:28
andres joined08:28
KiBi joined08:28
PugMajere joined08:28
dotwaffle joined08:28
Pieter joined08:28
pigeon left08:28
pigeon joined08:28
jpeeler left08:29
gaveen left08:30
gaveen joined08:31
galderz joined08:31
charon joined08:31
telmich hmm08:32
drizzd_: are you sure?08:32
I just did this test: took one commit _after_ 89c581b3fb2986e303f1299e6458e3e9b115fa3f, which is 17c9d12e126cb0de8d535dc1908c4819d712bc6808:33
and then did git rev-list 17c9d12e126cb0de8d535dc1908c4819d712bc68..89c581b3fb2986e303f1299e6458e3e9b115fa3f08:33
which is not empty08:33
by the way: I'm using linux-2.6, if you want to test it yourself08:34
drizzd_ telmich: git rev-list 89c581b3f..17c9d12e1208:34
|wc -l gives 42408:34
girishr joined08:35
telmich yep, and the other way round it's wc -l = 1108:35
Laibsch http://wiki.openembedded.net/index.php/GitPhraseBook#Setup documents one way for users to access git and another one for those with write access. I have already checked out as a normal user. Can I switch to the other access method or do I need to make a completely new checkout?08:36
checkout = git clone08:36
drizzd_ either way, the commit is clearly not "one commit after", or even "424 commits after"08:36
because 89c581b is not the only ancestor08:36
(otherwise one of the rev-lists would be empty)08:36
telmich drizzd_: I determined "after" by doing git log, /89c581b3fb2986e303f1299e6458e3e9b115fa3f, scrolled up to the next commit and selected its commit id08:37
doener left08:38
doener joined08:38
msanchez joined08:38
gaveen left08:38
thumper_laptopthumper08:39
dmlloyd left08:40
drizzd_ telmich: git log has to display a DAG in a linear manner. it's not surprising that the commits don't actually have that linear order.08:41
JohnFlux how do I revert the changes on a single file?08:41
drizzd_ telmich: see "Commit Ordering" in git-log(1)08:41
CardinalNumber left08:42
telmich drizzd_: will do, thanks08:42
drizzd_ JohnFlux: git checkout <revision> <file>08:42
JohnFlux drizzd_: thanks08:43
telmich drizzd_: I'm now using gitk for a better view08:46
j416 joined08:47
telmich dammit... I just got the commit, because the last commit is a merge of the branch containing it08:49
ph^ left08:50
jmesnil joined08:51
tvw joined08:51
benjo2 left08:54
temoto-wd joined08:56
dreiss left08:57
drizzd_ telmich: I don't know if there is a smarter way to do this, but to get the children of a commit you can do `git rev-list --children 89c581b3fb2986e303f1299e6458e3e9b115fa3f~..origin/master|grep ^89c581|cut -f2- -d' '`08:57
lordpil left08:58
lordpil joined08:58
exon joined08:58
exon Anyone seen dscho around lately?08:59
jpeeler joined08:59
theCarpenter1 joined08:59
doener left about 9 hours ago08:59
exon I'll try email then. Thanks09:00
killerchicken left09:03
deavid there is a standard way to add more apps to "git mergetool"; for example i want to add my own Qt3Designer for the .UI files.09:05
?09:05
giallu left09:05
ia left09:07
doener deavid: look for "mergetool" in git-config(1)09:07
un|ogic or see http://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html09:08
ia joined09:08
deavid <<Any other value is treated is custom merge tool and there must be a corresponding mergetool.<tool>.cmd option.>> good. Thanks!09:09
elmex left09:10
elmex joined09:10
tango_ left09:14
reprore joined09:15
giallu joined09:15
sitaram joined09:15
sitaram left09:18
sitaram joined09:19
UnwashedMeme joined09:19
bronson left09:20
anjovis left09:21
offby1` joined09:26
Naib_Naib09:27
jony_ joined09:27
jony left09:28
priidu joined09:29
ph^_ left09:29
orlando||lando left09:29
ph^ joined09:29
reprore left09:30
reprore joined09:30
rraasch joined09:31
rraasch left09:32
Circuitsoft Is there any file I can write to that will be prepended to the blank commit message when an editor is brought up for commit?09:32
solydzajs joined09:32
rraasch joined09:33
UnwashedMeme1 left09:33
doener Circuitsoft: commit.template09:34
Circuitsoft: set that to the template file09:34
meyering left09:35
LotR joined09:35
dato uhm09:37
I wish log --abbrev-commit would not append trailing dots to the abbreviated hash09:37
Circuitsoft How will git gui handle commit.template and the file it points to changing relatively often?09:38
gaveen joined09:39
kate21de left09:40
offby1 left09:40
iulian left09:41
moccuo joined09:42
naeu joined09:43
sitaram dato: try playing around with --format maybe?09:44
moccuo hi, so im trying to setup a remote git repo. i initialized a bare repo on the server, and then added a remote on my local repository adn then tries pushing to it and i get the whole "! [remote rejected] master -> master (n/a (unpacker error))" and "error: failed to push some refs" error.. any ideas?09:44
sitaram for my 1-line output, I've replaced the traditional 'log --abbrev-commit --pretty=oneline' with something using format that works very well09:44
dato sitaram: yeah, except that I'd like it for the default log output, and that's a bit more cumbersome09:45
and --abbrev=7 doesn't seem to work here09:45
JohnFlux how can I commit-and-merge-with-last-commit? :)09:45
I committed, but now realised that I made a mistake09:45
doener JohnFlux: --amend09:46
kadoban JohnFlux: commit --amend09:46
JohnFlux ah09:46
dato ah09:46
tvw left09:46
sitaram dato: true :-(09:46
JohnFlux awesome :)09:46
theCarpenter1 left09:47
meyering joined09:47
dato ah, --abbrev is only for diff --raw09:47
meyering left09:47
charon dato: --abbrev-commit09:47
meyering joined09:47
charon oh, sorry, i should've read the backlog.09:47
charon hides again09:47
tango_ joined09:50
drizzd_ left09:51
dwave joined09:54
lxsameer joined09:55
radarek joined09:56
sitaram dato: are you parsing it? meaning if you don't need the colors you *could* use a sed or something in between...?09:56
lxsameer if i clone from a big repository and in the middle of cloning i disconnct from internaet , the what's happend ? can i resume that later?09:57
dato sitaram: no, this is just for my consumption; I find the short version much more pleasing (particularly to copy&paste), even if it costs some computational power to calculate it09:58
sitaram dato: before I decided I like the one line summary a lot more for most day-to-day stuff, I used to use this: log --abbrev-commit --pretty=oneline10:01
charon dato: http://gist.github.com/6382810:01
i wonder if this could be turned into a patch without breaking too many things10:01
mithro joined10:02
yofel joined10:02
j416 left10:03
JensB joined10:04
JensB Hi everybody10:04
JohnFlux Hi Dr. Jens!10:05
\ask- left10:05
JensB ah. so that's where my thesis has been10:06
:)10:06
dato ah, at least now I understand why it adds dots10:06
JensB anyway .. I have a small problem with Git: heres what I did10:06
drizzd joined10:07
JensB situation: local Git repo connected to remove SVN repo, every now and then I do "git svn dcommit". Yesterday I dcommitted that way, today I discovered I wanted to --amend some files to the commit. Today, "git svn dcommit" tells me "Item already exists in filesystem: File already exists: filesystem '/srv/db', transaction '198-1', path '/dor/trunk/app/controllers/meeting_points_controller.rb' at /usr/local/git/libexec/git-core/git-svn line 469".10:08
How do I fix this?10:08
any way I can remove the --amended files from the commit and split the commit in two so it matches the SVN state again?10:09
charon JensB: find the old state in 'git log -g', then say 'git reset --soft $old_state' to undo the amending and 'git commit' to make a new commit for the second half10:09
and don't _ever_ rewrite (amend, rebase, filter-branch) commits that come from git-svn10:10
JensB ok, I'll tattoo that on my forehead10:10
thanks10:10
Phlogi joined10:13
_slacker_ joined10:14
johnw left10:17
Phlogi left10:19
warthog9 left10:19
warthog9 joined10:20
sverrej left10:25
girishr left10:25
girishr joined10:27
cemerick joined10:30
markelikalderon joined10:32
avtolfm left10:32
melvinrammelvinram|away10:33
drizzd left10:33
gaveen left10:34
Zaphodbee joined10:34
bram joined10:35
ndim left10:36
Zaphodbee left10:36
bram hey guys, I have a simple question: I have some unstanged changes in master, and I decided it's best to switch to a branch and work on these changes instead of doing them in master. so, how can I make a branch, and have the uncomitted/unstaged changes in my master "moved" to that branch ?10:36
doener uncommitted changes are not on any branch10:37
Circuitsoft bram "git branch new_branch_name"10:37
doener just "git checkout -b bla"10:37
snuxoll doener's is correct10:37
Circuitsoft Don't those actually do the same thing?10:37
snuxoll Circuitsoft: no, git branch won't create a new branch10:37
doener snuxoll: hm?10:37
Circuitsoft I've done it.10:37
lxsameer left10:37
doener "git branch" won't checkout10:37
bram well, tried that, but as doener says, the uncomitted changes aren't on a branch, so they aren't there in the branch10:37
ndim joined10:38
snuxoll doener: ah, yes10:38
Circuitsoft nothing is on a branch until you commit it10:38
"git branch new_branch" will make a new branch off the current head.10:38
bram so, my only option would be to create a patch from the diff, undo the changes in master, branch, apply the patch in the branch?10:38
snuxoll bram: when you checkout a new branch you'll fork a new branch based on head, any uncommited changes are corried between branches10:38
*carried10:38
doener bram: no, just checkout the other branch and commit10:39
bram snuxoll: umm, no, they aren't10:39
I just tried that10:39
alus bram: last name C.?10:39
snuxoll bram: if I modify a file and switch branches without commiting, the file won't be checked out from the switched branch10:39
bram alus: hehe, no, last name "de Jong"10:39
charon dato: i think this is cleaner: http://gist.github.com/6384310:39
alus bram: ok10:39
charon dato: running tests now, i'll send it out after lunch.10:39
doener bram: yes, uncommitted changes _are_ kept when you switch branches10:40
bram snuxoll: if I git checkout newbranch, the (non-comitted, nonstaged) changes are undone and a checkout is made from head10:40
snuxnull: git checkout geotag-refactor <- results in two modifications10:40
that reset my files to what they were before the changes10:41
snuxoll bram: no, it's stating that those files are modified10:41
doener bram: http://git.pastebin.com/m68453cb010:41
merlin83 joined10:41
bram er, oh, errrrrrrrrrrr10:41
damn10:41
dato charon: cool10:41
snuxoll bram: unstaged files are not modified when you switch branches, that's what it's telling you10:41
dato charon: I didn't realize you were Thomas Rast10:41
bram I'm a stubornheaded pig, I am!10:42
:_10:42
:)10:42
sorry guys, you are completely right10:42
dato charon: thanks a lot for ca6ac7f ("add -p: prompt for single characters")10:42
Gitbot [git ca6ac7f]: http://tinyurl.com/aur9xw -- add -p: prompt for single characters10:42
dato ah, ok10:42
snuxoll left10:44
snuxoll joined10:44
cemerick left10:47
exon left10:48
eean left10:49
drizzd joined10:49
eean joined10:49
yofel left10:50
yofel joined10:51
_Vi left10:52
_Vi joined10:54
peritus__ left10:55
j416 joined11:02
markelikalderon left11:03
j416 left11:06
warthog9 left11:06
Circuitsoft On git-fetch, I can limit what refs it pulls down with the remote.remotename.fetch config variable.11:06
Can I limit tags?11:06
warthog9 joined11:07
Circuitsoft Or will it only fetch tags associated with the pulled refs?11:07
scheng left11:10
drizzd --tags will download all tags11:10
Fissure left11:11
dirker left11:11
dirker joined11:11
Fissure joined11:11
drizzd tags "associated" with fetched refs are also fetched automatically (even without --tags)11:11
Circuitsoft ok11:11
cool. Thanks.11:11
kimrhh left11:12
rsd left11:13
\ask joined11:15
peritus joined11:18
Bennid left11:20
markelikalderon joined11:23
jony_ left11:25
ntoll joined11:26
zeahok left11:27
lorandi joined11:30
cemerick joined11:32
gzy joined11:34
gzy hi, after merging back to trunk, and deleting the branch i noticed that i have it merged wrongly (i'm missing some functionality that was in the branch)11:35
is there a way to get the branch back, or to be exact it's changes?11:35
peritus left11:35
johan-s joined11:37
Eridius gzy: yes there is, but I'm not in a mood to hold your hand through it. I'm only responding to let you know that your problem has a very simple solution, and hopefully someone else will step up and teach you11:38
muthu_ left11:39
porcnick_porcnick11:43
exon joined11:44
mfilipe joined11:51
chrisdone joined11:51
porcnick left11:52
sitaram gzy: if I understand you correctly, (and if I had to do this very simply), use gitk to point to the merge commit, look at the 2 parent SHA1, figure out which one was your old branch, and then 'git branch my_branch abcdef' (or whatever the sha1 was)11:52
Hendu joined11:52
sitaram other methods include doing stuff like trunk^2 (or trunk^; not sure which without experimenting)11:53
drizzd gzy: did you delete with -d or -D?11:53
eletuchy_ joined11:53
gzy hey, thanks, i deleted with -d, and i found the change removing my missing code in the log...11:54
becouse the individual logs from the branch dev show up in my log after merge right?11:54
anyways i fetched the changset for that commit and done the whole thing somewhat manually.. the important thing is the data was there.11:54
drizzd the "logs" being the commits, yes11:55
gzy is there a log parameter to output the branch they came from to? meaning is the commit - branch relation kept in history?11:55
drizzd no11:56
but it's in the merge message11:56
gzy ok, thanks11:59
gzy left11:59
yann left12:03
eletuchy left12:03
jmspeex joined12:06
mcella left12:07
moccuo left12:07
moore33 joined12:10
sitaram left12:11
moore33 How do I list the direct children of a commit?12:11
Laibsch left12:12
wanders left12:12
heipei children?12:12
you mean parents12:12
moore33 No...12:12
Those commits that have a given commit as a parent.12:12
heipei you mean "the commits that this commit is based on"12:12
Circuitsoft No.12:12
moore33 No! "the commits that are based on this commit."12:12
Circuitsoft He means the commits that are based on this commit.12:12
heivei: Assume "this commit" is not a head.12:13
charon dato: heh. you're welcome... and tbh the '...' bothered me too, otherwise i wouldn't have jumped at the opportunity to write a patch12:13
wanders joined12:13
moore33 gitk lists this directly for a commit, so I assume it's not too hard to dig out of git-log or something.12:13
jnl moore33: git rev-list --children?12:13
moore33 jnl: I thought so, but I can't seem to make it do what I want.12:15
heipei well, looking for children isn't really how git works, so i'd assume its very inefficient12:16
because it basically needs to check _every_ object and compare if the parent-entry matches12:16
jnl moore33: in what way?12:16
psankar left12:17
moore33 heipei: Does that imply that git-branch --contains is very inefficient?12:17
heipei no, it just checks the commits reachable by the branch12:18
ekidd joined12:18
moore33 jnl: In my (limited) screwing around with --children, it's not clear what it's doing.12:18
heipei moore33: im talking about all the objects in a repository12:18
moore33: well, that is an idea: you could do a "git branch --contains <parent>" for every branch, and get the branches containing children12:19
Sho_ joined12:19
jnl moore33: hm yes, not doing what i thought it would do ...12:19
moore33 heipei: OK. If I assume that the children I'm interested in exist on some branch, then it seems like a feasible problem.12:19
heipei moore33: yeah, if not, sure, you'd have to search the whole object database12:20
moore33 heipei: I guess I need to look at gitk and see how it gets that info. But gitk does look at the whole database :) hmm.12:20
Flathead left12:20
heipei moore33: yeah, probably it looks at all the refs12:21
azuk it might be illuminating to add --all to git rev-list --children?12:22
jnl ah, yes. so without the --all it wont traverse the children, so they wont show up...?12:24
so... --all | grep $sha :)12:24
peritus joined12:26
awx left12:26
sporkmonger joined12:26
Laibsch joined12:27
heipei ah, now i understood how to read the output of rev-list with --children12:27
moore33: git rev-list --children --max-count=2 <commit>12:29
try that12:29
azuk jnl, um no, there are no children that it could traverse, think that the history is represented using a single linked list where you can get to the parent but not the other way, and see the description of --all parameter12:29
boto joined12:29
countd left12:31
jnl azuk: why wouldnt it traverse the children with the --all? git rev-list --children --all |grep $sha seems to work (based on sample size of 1 :) )12:32
countd joined12:32
moore33 heipei: I see how it might work, but it's not actually finding the children of the commit I'm interested in...12:33
heipei moore33: it is for me. the commit is listed left, and right of it a child12:33
luis joined12:33
azuk jnl, actually, I misinterpreted what you said, forget it12:33
heipei i've only tried it with linear history12:33
luis Hello. What would be the most straight forward way to do checkout onto some temporary dir?12:34
moore33 I think the command that is closest to what I want is git rev-list --parents --all | grep $sha112:34
jnl yeah, the max-count might not work for all cases12:35
azuk moore33, as a fellow Common Lisper, you might find it helpful to think of git's history as a DAG represented using conses (even the need to have gc should be obvious then)12:35
luis I want to do two separate builds of my project.12:35
moore33 Then extract the parent/children info from that.12:35
jnl moore33: did you try --chlidren but without the max-count?12:36
rgr joined12:36
moore33 azuk: Yeah, I get that :) and I realize that the parent-child relationship might be expensive to derive, but it's still useful.12:36
rgr sorry to ask obvious but need quick help. Just pulled a program from guit and it wont compile. How do I list last know "good" stage and then retrieve it?12:37
moore33 Basically, I'm trying to answer the question: "What topic branches can be trivially merged to this branch?" Think maint in the git repo.12:37
kbingham_ left12:38
drewr joined12:39
azuk moore33, you might want ^$sha1 instead of just $sha112:39
jnl moore33: you mean fast-forward?12:39
peritus left12:39
moore33 jnl: Yes.12:39
jnl moore33: isnt it easier to do it the other way? check which other branches contain this branch?12:40
moore33: maybe merge-base is usefull12:42
r0bby left12:42
jnl moore33: just a guess is that it should return the commit itself if the other branch is a ff12:42
moore33 jnl: Yes, but they may contain other stuff too. To use the git repo example again, next merges frequently from maint. So a topic branch that was based from some commit in next may have the current maint head as an ancestor, but you can't merge it to maint without getting all the commits between maint and its ancestor on the next branch.12:42
jnl: Yes, that's a good idea.12:43
faithfulgeek joined12:43
gilimanjaro joined12:43
gilimanjaro hello folks...12:44
cannonball joined12:44
rgr How can I find an old compilable "label" in my git? Sorry if terminology is not correct. I need to try and rewind to a compilable code base as master does not compile.12:44
melvinram|awaymelvinram12:44
apassi joined12:45
gilimanjaro i was wondering if anyone here knows how to do a 'git pull' for a branch i have not got currently checked out12:45
ekidd rgr: checkout HEAD^, HEAD^^, etc.?12:45
apassi git pull origin branch ?12:45
gilimanjaro (for the purpose of updating my local version with any remote changes, in preparation for a merge)12:45
doesnt that pull it into my currently checked out branch?12:46
mcella joined12:46
apassi git pull origin remotebranch:localbranch12:46
moore33 rgr: You might want to look at git bisect12:46
biab12:46
gilimanjaro apassi: aha! excellent12:46
apassi gilimanjaro: i am not sure, i havent use that much but i pretty much think it should do it12:46
gilimanjaro it seems to work! in our case it would be 'git pull origin trunk:trunk' followed by 'git merge trunk' so i can incorporate the latest changes in our central repo in my branch development12:47
apassi my 'git svn rebase' didnt pass because conflict, i fixed it and committed, but now when i try to call 'git rebase --continue', it just response 'No changes - did you forget to use 'git add'?', and git svn rebase complains something it cannot create rebase-apply directory. how to solve git svn rebase conflict?12:49
kanru left12:50
levifig left12:50
apassi ok, git rebase --skip fixed it12:51
error404notfound left12:51
solydzajs left12:52
samsm joined12:58
sporkmonger left12:58
deskin apassi: you don't use commit to resolve conflicts while rebasing; you just git add after editing the conflicted files and then git rebase continue12:59
melvinrammelvinram|away13:00
deskin er --continue; at any rate, if you're happy how things turned out, you can rm the rebase directory (or rebase-apply) from .git; or, you can git rebase --abort and redo it properly13:00
apassi deskin: ah, great to know =) thankx13:01
deskin be sure you aren't on a detached head now, which is the usual result of walking away in the middle of a rebase13:01
error404notfound joined13:01
samsm left13:01
apassi it should be on head, i tried continue rebase after problems but there was no more left13:03
melvinram|awaymelvinram13:03
deskin ya, if you happened to be on the last commit, doing git commit and git rebase --skip is basically the same as doing git add && git rebase --continue13:03
brink left13:04
deskin it might work earlier in the chain too, but it's still not the 'right' way :)13:04
just do git branch and make sure your current branch (with a *) is an actual branch, not (no branch)13:05
apassi yeah it is master ;)13:06
hmm.. what is "not (no branch)" ? =)13:06
chrisdone hey, before I go looking around, is it possible to disable git's tty colour output? I'm using it inside emacs's shell-mode, y'see13:07
apassi yeah, git-config13:07
deskin if you do git branch and see '* (no branch)' it means your HEAD is detached from a local branch- e.g. if you do git checkout origin/master or some other remote branch, this will happen13:07
chrisdone cheers13:07
error404notfound left13:08
deskin you can still commit and do most things, but no branch head (like master) is getting updated to point to any new commits you make, so if you git checkout otherbranch, the commit has disappeared13:08
apassi chrisdone: there is lot's of properties for colors, i cant remember which you need, the manual specifies these.13:08
deskin you can still get it back via the HEAD reflog, but it's annoying13:08
rgr left13:09
cmarcelo joined13:09
apassi deskin: ok, thanks for the hint, never seen this no branch :)13:09
chrisdone apassi: yeah, I think under git-status is what I'm looking for13:09
muszek left13:09
chrisdone "color.status" :-)13:09
svanlund left13:09
deskin if you do git branch in the middle of a rebase conflict, you'll see it13:09
apassi i must try that next time13:10
mike_m left13:10
deskin which is why I was saying to make sure the rebase had finished, and your future dev work would go on an actual branch13:10
jackdempsey joined13:10
sosko joined13:10
mike_m joined13:10
apassi yeah, it would cause lots of gray for my hair.. =)13:12
sunoano what's the major difference in between 1.5 and 1.6? do have to read all the changelogs to figure that out ...13:13
error404notfound joined13:13
chrisdone hmm, nah colours isn't it. I really need to tell git to assume it's not in a tty at all. hrm13:14
charon sunoano: <HEAD:Documentation/RelNotes-1.6.0.txt> ?13:14
Gitbot [git RelNotes-1.6.0.txt]: http://tinyurl.com/6zwgca [blob]13:14
Gitzilla left13:14
sunoano charon: ok, will just do that :)13:15
jrmuizel joined13:15
deskin chrisdone: perhaps --no-pager will also do something about colours? I seem to recall a message on the mailing list about this, let me look13:15
'this' = 'git from within emacs being strange'13:15
luis left13:17
Ryback_ joined13:17
deskin hm, looks like that was about getting CR codes within emacs13:17
sosko hi all13:19
melvinrammelvinram|away13:19
deskin chrisdone: not sure how useful it is, long list of messages, but http://thread.gmane.org/gmane.comp.version-control.git/106487/focus=108057 is what I was referring to13:19
vals_ joined13:19
tango_ left13:20
awx joined13:20
joshdavey left13:20
ludde left13:24
sgronblo How do I interactively revert a file to only restore some of the modified sections?13:24
kbingham joined13:25
deskin sgronblo: git revert --no-commit && git reset HEAD && git add -p path/to/file13:25
Yuuhi joined13:25
deskin er, the revert needs a commit id to revert, but all the same13:26
sgronblo Ok I meant revert in the svn way13:26
I don't need to undo a commit13:27
doener "unstage" is the probably the right term then13:27
sgronblo Aha13:27
doener and IIRC there's no way to do that, except for using git gui13:27
vals_tango_13:27
sosko i'm about to start using git in production environment... i'm working on some php framework... and i'd like to be able to setup my repository in some sort of "layers".. first, i need to be able to update framework itself, which provides basic skeleton that i put my files in. next, i have my own modules that i'd like to maintain separately (i read that git submodules are useful for that), and those modules have to be placed in existing directory13:27
sgronblo Hmm, but isnt staging defining what will be included in the next commit?13:27
doener sgronblo: ah, oh, well, you meant changing the version in the working tree13:28
sgronblo: sorry, jumped to conclusions there13:28
sgronblo i did? :)13:28
i'm looking for something like git checkout --interactive filename13:29
eikke is there any way, next to git-status (which has no useful exit code) to figure out whether there are changes in a tree compared to index/last commit?13:29
kanru joined13:29
doener sgronblo: I guess so? There are only two things you could mean, the working tree and the index, and the index would be staging/unstaging ;-)13:29
sosko provided by framework.. then, i have my own code, that also goes "on top" of existing code, in some folders.. and on top of all that, i need to be able to mark some code state as "production" or "development" so i can deploy that code on dev/prod servers respectively...13:29
deskin sgronblo: a not-recommended-but-should-work way would be to git commit && git checkout HEAD~1 -- path/to/file && git reset HEAD && git add -p path/to/file, then git commit --amend (maybe?)13:29
doener sgronblo: you could do: git reset -- file; git add -i file; *stage what you want to keep* git checkout -- file13:29
sgronblo: the last checkout gets the version from the index into the working tree, so you keep exactly the stuff you staged13:30
sgronblo but... that looks so complicated for something that should be simple13:30
Niamor7Niamor13:31
sgronblo it should work similar to git add -p13:31
deskin ponders whether a switch-index-and-working-tree command would be useful13:32
doener sgronblo: hm, that add -p + checkout is easy enough for me, and for more complicated things, I have a script wrapping vimdiff13:32
sosko any hint about where to look for an answer to similar question?13:33
deskin actually I think something crazy could be done with stash --keep-index and reading some of the stash commits into the index, but it wouldn't be any less complicated; all it would give would be add -p in reverse13:34
sgronblo doener: so when you do the last git checkout -- file with the changes you want to keep staged, will that notice that you have staged changes for that file that are not in the file as it is in the working directory?13:35
boto left13:37
priidu left13:37
petaflot hello! I tried to nuke the master branch to "ignore" a few commits, and now I'm having a problem pulling from the repo. git's asking me to specify which branch it should merge13:37
gilimanjaro left13:37
doener sgronblo: hm? That command replaces the file in the working tree with the version from the index13:37
ekidd petaflot: git checkout -b master origin/master may help if you've deleted master.13:38
petaflot: For more complicated problems, you may need to edit .git/config directly.13:38
priidu joined13:38
ekidd It rather depends on exactly how you "nuked" the branch.13:39
sgronblo doener: ah and you already wrote that once. sorry.13:39
sporkmonger joined13:40
sgronblo then i guess i understand how that solution works and it doesnt seem that complicated. thanks for the advice.13:40
ndim Is it on purpose that "git svn clone" (git version 1.6.1.3) adds all SVN tags as remote branches instead of git tags? git-svn(1) does not say anything useful about it, apparently.13:41
cmarcelo left13:41
doener ndim: tags in svn are just by convention13:41
davisp joined13:41
EmilMedve left13:42
davisp Is there a way to make gitosis not require a config change for every repository?13:42
err, every *new* repository that is13:42
petaflot ekidd: thanks! it worked like a charm13:42
doener ndim: and I've probably seen more "not so much of a tag"-tags in svn repos than such tags that you could sanely and directly convert to git tags13:42
ndim doener: OK, that makes sense. I knew the SVN-tags-as-convention part, but not the horrible state of real world SVN tags. Makes sense though. :)13:44
cmarcelo joined13:44
jolelion joined13:45
jolelion hello13:45
cmarcelo left13:45
doener ndim: well, might be that I've just been exposed to the bad repos and got a wrong impression, but even a wrong "svn cp" invocation can cause svn to record metadata that makes it pratically impossible to figure out the right git commit to use for the tag13:46
ndim: because then svn doesn't record the whole directory as a copy of some other directory at revision X, but some mix of file A at revision foo and file B at revision bar and so on13:47
ndim Urgh.13:47
Sounds like something one does not really want to know. :)13:47
doener the most common reason probably being that the copy was done in a working copy or so, where files might be recorded as coming from different revisions, when you didn't do a "svn up" recently or whatever13:48
aisbaa joined13:48
doener and yeah, one really doesn't want to know that, makes you wanna scream if you think about it13:49
brough joined13:49
jolelion I'm going to use git for my development, me and my group of work are using openvpn to be connected together, as I can't use ssh for some reasons , is it possible to use NFS or SAMBA to access shared repositories ?13:49
both linux and windows clients13:50
Grum it seems i've stumbled onto a bug with git-svn; where the clone will not see a certain branch deleted; what to do now? :(13:50
girishr left13:50
doener Grum: hm? you mean in "git branch -r" the deleted branch is still there? That's expected13:51
eean left13:51
Grum how is that expected?13:51
brough is is necessary to compress very large text files before checking into git, if space is a problem? I understand git does have excellent compression...13:51
doener Grum: the branch is not gone from svn either. In fact, you can't easily really delete branches from svn13:51
Grum there is an entry in the svn history which purges the branch13:52
doener: svn rm branches/xxx13:52
doener Grum: and if you checkout the parent revision, the branch is still there13:52
Grum: it's still in the repo13:52
RaySl joined13:52
doener it's just no longer in the later revisions13:52
Grum euhhmz but shouldn't that be reflected in the import in some way?13:52
right now it just skips over the revision13:53
keystr0k joined13:53
Grum what if you would (in svn): make a mistake; delete the branch; recreate it and work on it13:53
it seems that right now you will have a mixed up history13:53
keystr0k Can you change the message in a previous commit? I forgot to mention something in my last commit.13:53
Grum commit --amend afaik13:53
kadoban keystr0k: git commit --amend13:53
doener Grum: branches are very different in git. SVN is just one large versioned directory, everything else is by convention13:53
keystr0k kadoban, dang!13:54
jolelion is it possible to use git over NFS or SAMBA?13:54
doener Grum: git has "real" branches13:54
Grum doener: yeah i know13:54
i want to get rid of svn asap13:54
a-priori joined13:54
Grum but while trying to migrate the data i stumbled onto this inconvenience13:54
doener Grum: if seeing that branch bothers you, you can just drop it, "git branch -r -d $whatever"13:54
ekidd left13:54
Grum what happens if you remove the branch in git?13:54
doener Grum: or -D instead of -d if it wasn't merged13:55
Grum it also gets purged from history?13:55
esparkman joined13:55
moore33 Is anybody here using git for a large tree of binary data e.g. art assets for a game?13:55
doener the reference is dropped, and once all reflog entries referencing the commits, and the purge delay has passed, git gc will kill the associated objects13:55
keystr0k kadoban, I amended my last commit message... tried a push and it failed... ?13:55
Grum doener: ah ok so in order to keep the branch alive in the history the delete gets skipped?13:56
scientes joined13:56
kadoban keystr0k: afaik you shouldn't change history (--amend, etc) on already pushed commits. there's a way to override it, but I don't know it13:56
doener Grum: yeah. Otherwise, you could argue that the import is incomplete, as some data that is in the svn repo is not in the git repo13:56
Grum yeah that makes sense :)13:56
keystr0k kadoban, I see... Mmmkay. thank you :)13:56
kadoban (someone smart here surely does, i'm not that great at git yet)13:57
Grum doener: would you happen to know a 'good way' to make a svn import a bit more 'git like' ?13:57
doener define "git like" ;-)13:57
Grum well erm ... branches end up in refs/remotes/xxx13:57
shouldn't they be in refs/xxx if you'd used git from the start?13:58
jolelion Does anybody tried to use git over NFS or SAMBA13:58
?13:58
doener in refs/heads. But git-svn is (also) intended as a bidirectional gateway to a svn repo, so it's treated as a remote13:58
Grum doener: yeah i understand that; but i want to use it as a one time import13:59
doener after a one-shot import there's usually quite a bunch of stuff you want to clean up13:59
Grum there dont seem to be flags to support that13:59
yeah indeed; that is what i am running into right now13:59
doener yeah, there's --no-metadata to avoid the git-svn-id crap, but that's about it13:59
Grum there are some config entries which need to be purged; git config --remove-section svn-remote.svn14:00
and the branches moved; tags to be looked at14:00
is there anything more i am forgetting ? :)14:01
ciskje joined14:01
doener unwanted branches deleted, eventually merges reconstructed (if you had any "real" merges in svn)14:01
Grum we actually used svk ..14:01
so yeah we had merges14:01
how do you mean 'reconstructed' ?14:01
doener so that you have actual merge commits in your git repo14:02
i.e. commits with more than one parent14:02
Grum commit with 2 parents14:02
ok that is something i need to test then how it is handled14:02
doener the easiest way to do that is probably to use grafts and then using filter-branch to make the changes permanent14:02
Grum grafts? (gitk?)14:03
doener grafts override the parents recorded in the commit object14:03
Grum mm14:03
doener let me get an example done real quick14:03
Grum git config --remove-section svn-remote.svn14:03
mmeh fail copy14:03
i found a page; http://community.livejournal.com/evan_tech/255341.html14:03
ph^ left14:04
beket joined14:05
Arjen Hey Grum14:05
Grum ey Arjen :)14:05
doener yeah, but that's so non-graphical :-)14:05
Grum doener: if you have a better way .. at least to visually verify =)14:06
planning to script it in either case14:06
welly joined14:07
JohnFlux Hey all. I made some commits locally, and now just did a 'git checkout <revision>' but now I want to go back to where I committed my revisions14:07
the trouble is, I can't find my revisions!14:07
git log | grep -i john shows nothing14:07
doener Grum: http://git.pastebin.com/m2a94a2fa14:07
Grum: that script creates a repo like one you might get from git-svn14:08
Grum: the last commit on master was actually a merge of side, but the commit doesn't represent that, as you can see in gitk14:08
dato charon: :)14:08
davisp left14:08
doener Grum: then a graft is added to override the parents of that commit to turn it into a merge commit, and get the correct history14:09
ekidd joined14:09
Grum indeed; gitk sees the merge with 1 parent14:09
ekidd Grum: git-svn can import some kinds of deleted and recreated branches, but not always.14:09
Grum i assume it can import deleted and completely merged branches14:10
ekidd Grum: I've occasionally needed to fix up the messier corner cases using grafts and filter-branch14:10
doener Grum: the nice thing about grafts is that they are immediately effective, so you can check the results before doing the time-consuming filter-branch stuff14:10
krh joined14:11
willb joined14:11
JohnFlux I've lost my commits :(14:11
Grum yeah14:11
ok; how can i make this change permanent now?14:11
JohnFlux I committed locally, then 'git checkout <revision>' and now I can't find my commits!14:11
Grum (i haven't used filter-branch yet)14:11
doener JohnFlux: if you do "git checkout <revision>" you get a detached HEAD14:12
JohnFlux: if you had a branch checked out before that, just do "git checkout <branch>"14:12
kadoban JohnFlux: probably because you're no longer on the branch you made the commits at14:12
JohnFlux doener: how do I reattached it?14:12
ekidd JohnFlux: Try looking at gitk to see what's going on.14:12
JohnFlux doener: whatever that means :)14:12
doener JohnFlux: or you can lookup earlier states of HEAD using "git reflog"14:12
ekidd JohnFlux: git checkout branchname will take you back to a specific branch.14:12
kadoban JohnFlux: look at git reflog, and see what branch you came from. then do git checkout <branchname>14:12
obeattie joined14:13
jolelion Does anybody tried to use git over NFS or SAMBA ?14:13
bremner jolelion: people do from time to time. they don't get too much sympathy when it breaks14:14
Grum jolelion: i imagine you might have problems with nfs lockfiles but otherwise should (theoretically) be working?14:14
error404notfound left14:14
JohnFlux doener: I can't find it in gitk, but I see it in git reflog14:15
0e26ef2... HEAD@{4}: My commit message14:15
obeattie Hi everyone, I have a question I hope will be fairly easy for someone. I have just merged from a branch to my master (successfully), but I now want to undo the merge. I imagine this is done with git rebase, but does anyone know how? :)14:15
jolelion Grum: thanks14:15
doener JohnFlux: just "gitk", or "gitk --all"?14:15
jolelion bremner: sorry but I don't understand what you say (my english is so bad)14:15
doener obeattie: not rebase, reset14:15
JohnFlux doener: I don't see it in gitk --all either14:16
doener obeattie: use "git reflog show master" to find the pre-merge state14:16
EmilMedve joined14:16
eean joined14:16
doener obeattie: the use "git reset --hard <entry_from_reflog>" to reset your branch back to that commit (you should have master checked out when you do that, of course)14:16
obeattie doener: Okay, thanks, so what do I look for in the reflog?14:17
doener obeattie: and the reset --hard drops uncommitted changes, so if you have any, you might want to stash them first14:17
ph^ joined14:17
kapone joined14:17
hobodave_ left14:17
obeattie doener: Just so we're clear, I want the changes to remain on the original branch (which I haven't deleted)14:17
doener: I'm going to merge them back in pretty much straight away14:17
doener obeattie: you want to find the entry for the pre-merge state, as I said14:18
obeattie doener: Okay14:18
doener obeattie: if that last thing you did was the merge, the master@{0} entry will say "master@{0}: commit (merge): ..."14:18
roger_padactor joined14:18
doener obeattie: so master@{1} is the state right before the merge14:18
mcella left14:19
doener if you did anything else in the meantime, the number might be different now14:19
Grum jipes; filter-branch needs more examples =)14:19
obeattie doener: Crap, the merge commit isn't on the branch (the one I called master) -- the branch I'm on is a remote (SVN) branch14:19
roger_padactor hello, i installed git on my shared hosting account. everythin installed fine. but when i try to run the git command it sais command not found. so where and how do i put it in the env vars so i can use git?14:19
doener obeattie: hm? I don't think I understand what you mean14:20
obeattie doener: The "master" branch is actually the remote SVN branch, and when I switch to it I'm in "no branch"14:21
doener obeattie: so you already dcommitted the merge?14:21
obeattie doener: I've switched to/from a local branch since I did the merge, so now my merge commit is... missing14:21
doener: No I haven't dcommitted it yet14:21
doener obeattie: ah, so you did the merge on a detached HEAD? Nothing to undo then...14:21
obeattie doener: Okay, so what would happen when I do dcommit?14:22
doener: Is the merge ignored since the head was detatched?14:22
doener: *detached14:22
doener: --dry-run *doh*14:22
ehamberg joined14:22
doener obeattie: dcommit looks at the history of HEAD to figure out what to push to svn14:22
obeattie doener: Oh, nice, yeah it's not doing anything14:22
doener: Wow that helps me a lot14:23
doener obeattie: doing that "git merge foo" on a detached HEAD doesn't affect any ref but HEAD14:23
obeattie: and checking out anything else of course changes HEAD again14:23
reprore left14:23
obeattie doener: yeah that's fantastic (in this case)14:23
doener obeattie: so the result of the merge is only kept in HEAD's reflog14:23
JohnFlux doener: I looked at git reflog, and found my last commit. I've now switched to that, and 'git branches -a' says that I'm now on '(no branch)' - I think that's why I was having problems14:23
doener yeah, it's great for integration testing14:23
plasticine left14:24
obeattie doener: So what happens to the detached head? Will it get "cleaned up" at some point?14:24
JohnFlux doener: should I move back into the 'master' branch or something?14:24
doener JohnFlux: depends on what you want to achieve14:24
Grum doener: what would the proper filter-branch syntax be to make the grafts permanent? i got it working with HEAD^2..HEAD but erm .. i doubt that is proper ^^14:24
doener Grum: for your case, probably just "git filter-branch -- --all", assuming that you have no (annotated) tags yet14:25
ekidd Grum: Usually something like 'git filter-branch --all'14:25
JohnFlux doener: at some point I want to push my changes back upstream14:25
ekidd Yeah, use the extra '--' in there.14:25
doener obeattie, JohnFlux: HEAD is a special reference that stores what you have checked out14:25
Grum and after that purging refs/original and info/grafts manually?14:25
ekidd JohnFlux: Once you've rewritten, your only real option is to nuke upstream, and all the existing checkouts.14:25
doener obeattie, JohnFlux: when you check out a branch head (i.e. one of the things that "git branch" shows), then HEAD will reference that branch head14:26
ekidd JohnFlux: Whoops, sorry. Got two people confused. :-/14:26
JohnFlux ekidd: I was wondering :)14:26
obeattie doener: Yeah I know that, sorry I'm not too good at explaining what I mean14:26
faithfulgeek left14:26
doener obeattie, JohnFlux: and doing "git commit" or "git merge" or whatever, will affect that branch head14:26
obeattie, JohnFlux: when you checkout anything else, HEAD will reference a commit, and "git commit" etc. will update HEAD itself to reference the new commit14:26
obeattie doener: Uuh I mean... what happens to the (then) head that I merged into in the first place? I can't see I have any way of making that my current head again14:27
doener: I don't want to, I'm just curious :)14:27
doener obeattie, JohnFlux: if you then checkout something else again, HEAD is changed, and so there's no ref left referencing that commit14:27
obeattie, JohnFlux: then, only the reflog is still referencing it, and once that expires, git gc may prune it14:27
jolelion left14:27
doener because the commits became unreachable14:27
ekidd Yay, reflog.14:27
obeattie doener: Right okay I see, that's what I meant :)14:28
rraasch left14:28
obeattie doener: Thanks so much for your help anyway14:28
doener JohnFlux: so in your case, you might want to create a branch head from that commit, using "git branch <name> <commit-id>"14:28
JohnFlux: or just merge the thing into one of your branches, using "git checkout <your_branch>; git merge <commit-id>"14:29
levifig joined14:29
Grum doener: seems the cleaning of the few files will indeed clean it up; thanks for the very nice script to display how it worked ^^14:29
doener JohnFlux: or both of those, or just cherry-pick some commits you made while you were on a detached HEAD, or whatever14:29
levifig_ joined14:29
JohnFlux doener: so, at the moment my commits are in 'no branch' can I just do 'git merge master' ?14:29
doener JohnFlux: that would merge master into what you have checked out, not affecting master at all14:30
cbrake_awaycbrake14:30
JohnFlux doener: I keep getting the feeling that I'm doing this wrong or something. This is so complicated compared to what I was doing with mercurial14:31
Hendu left14:31
JohnFlux doener: in mercurial, I could just check out, make commits, check out again to update, and so on14:31
but in git I seem to keep disconnecting from master.. but why?14:31
am i doing something wrong which causes me to disconnect from master?14:32
doener because you checkout a commit14:32
JohnFlux doener: right, but that commit is still on master14:32
so shouldn't I still be on master?14:32
kadoban JohnFlux: but you aren't anymore if you checkout a random commit14:32
doener "master" is just the branch head, it is a reference to a single commit14:32
levifig_ left14:32
jackdempsey left14:32
levifig left14:33
Grum what would be the proper way to let head point at whatever was in the trunk after a 'git svn clone'?14:33
obeattie left14:33
doener Grum: head == HEAD, or a the currently checked out branch head?14:33
UnwashedMeme left14:33
doener Grum: or even some other branch head?14:33
sosko left14:34
keystr0k left14:34
Grum i mean HEAD :)14:34
lorandi left14:34
doener git checkout svn/trunk # Or whatever the remote tracking branch is called14:35
but I suspect you actually mean the checked out branch head ;-)14:35
lorandi joined14:35
doener (though strictly, HEAD^0 ends up the same)14:35
Grum ... i just want to have a repository which looks like as it had been made with git all along14:35
but currently i'm stuck with svn ^^14:36
doener Grum: e.g. you can use "git reset --hard svn/trunk" to move the checked out branch head to the same commit as svn/trunk14:36
Grum: so after "git svn clone" you have a branch head "master", that will reference the latest commit on the branch that was last changed in svn14:36
Grum yeah14:36
and that happens to be a branch's head14:36
LiamH joined14:36
doener Grum: and then you can do "git reset --hard svn/trunk" to make master reference the same commit as svn/trunk14:37
priidu left14:37
doener Grum: because after the git svn clone, HEAD references refs/heads/master, and thus the reset changes refs/heads/master14:37
Grum k14:37
thanks once more :)14:37
doener Grum: changing HEAD to reference the latest commit from the trunk would mean "git checkout svn/trunk", and that detach HEAD and not affect refs/heads/master at all14:38
mncaudill joined14:38
Grum yeah that is the effect it had with my tries before14:39
kbingham left14:39
Grum after that i just need to do a bare-clone so i can put it on some central place others can clone from right?14:39
kbingham joined14:39
bdiego joined14:39
mattenoble_ joined14:39
mcella joined14:39
mattenoble_ left14:40
doener Grum: yeah, either that, or create a bare repo and push to it. For probably totally insane reasons, I prefer the latter ;-)14:41
kapone left14:41
tek0 left14:41
Grum well then i test the transport as well14:41
and i can impress my coworkers with the awesome speed14:42
doener Grum: oh, and you should do some purging/repacking14:42
nick_h[litage] joined14:42
tek0 joined14:42
Grum just call git gc; git repack ? or any more special stuff?14:42
doener http://n2.nabble.com/purging-unwanted-history-td1507638.html14:43
second posting14:43
filter-branch leaves backup references, for the case that anything goes wrong, so you need to get rid of them14:43
warthog9 left14:43
Arjen The reflog stuff and a gc --aggressive14:43
doener and the reflogs likely also keep the old stuff around, so that also needs cleaning14:44
aziz joined14:44
dmlloyd_dmlloyd14:44
Grum doener: yeah i saw the 'refs/original'14:44
doener Grum: of course the filter-branch invocation itself in that posting is uninteresting for you, just from the "git for-each-ref" onwards14:45
Grum yeah i gathered that :)14:45
doener Grum: and using -adf _might_ produce somewhat better results than -ad in some cases14:45
qrush_ joined14:45
gaveen joined14:45
jrmuizel left14:46
parasti joined14:46
boto joined14:47
roger_padactor so how do i get git the git command to work if it doesn't on install14:48
doener Arjen: using "git gc --aggressive" would do a "repack -Adf" there (unless you set gc.pruneexpire to "now") causing unreachable objects to be forced to be loose. That would cause quite some useless IO action14:48
priidu joined14:49
doener Arjen: as you'd want a "git prune" afterwards anyway, to get rid of the objects14:49
Arjen Ah, right14:49
Hink joined14:50
faithfulgeek joined14:50
reprore joined14:54
qrush_ roger_padactor: um, define not work...perhaps it's just not on your PATH14:54
reprore left14:55
roger_padactor when i type git , i get i get command not found14:56
what should my path look like and how do i set it?14:56
nerochiaro joined14:56
roger_padactor i added expost PATH=$PATH:/path/to/bin to my .bashrc file. didn't seem to do anything14:57
export*14:58
nerochiaro hi all, i have a newbie question: is there a way to run a git command from outside the git repo tree ? something like "git status --repo=/my/repo" ? apologies if this is the wrong place to ask14:59
Grum just chdir to the repo?15:00
warthog9 joined15:00
nerochiaro Grum: of course. but let's assume i can't do that, is there any other way ?15:00
Grum mmm you can set GIT_DIR i think (not sure what it is called)15:01
reithi left15:02
Grum so you could probably do: GIT_DIR=/my/repo git status15:02
or not ;(15:03
nerochiaro yeah, that works15:03
thanks15:03
dwmw2_gonedwmw215:04
xuhao joined15:04
Grum mm didnt work here; but i do see that my git has [--git-dir=GIT_DIR]15:04
prolly a version difference?15:04
seems i have to point it a the .git dir (not in a bare repo here)15:06
nerochiaro yes, i was about to say that15:07
awarde_ left15:07
nerochiaro and here --git-dir doesn't work15:07
Grum both work here; got 1.6.1.315:07
nerochiaro i'm on 1.5.6.3, that may be why15:08
doener nerochiaro: you need "git --git-dir=... <command>" not "git <command> --git-dir=..."15:08
nerochiaro: and for things like "status" you'll also want --work-tree15:08
nerochiaro doener: excellent, that work for me15:09
cmarcelo joined15:11
Grum man this migration from svn will be quite some work :D15:11
PerlJam Grum: but worth it!15:11
Arjen At least it's doable15:11
Grum i wonder what kind of nasties i will find from the cvs->svn migration :(15:12
spearce joined15:12
Grum Arjen: doable but a lot of manual work still15:12
awarde joined15:12
awarde left15:13
nerochiaro hmm, another question: is it possible for git-rev-list to list only the commits that touch a certain subdirectory ?15:14
that change files inside a certain subdirectory, i mean15:15
doener git rev-list ... -- directory15:15
levifig joined15:16
countd left15:17
WhatAHam how do i undo the changes to my working copy and go back to the last commit?!?15:18
nerochiaro doener: excellent, thanks15:18
hobodave joined15:19
hobodave left15:19
doener WhatAHam: "git reset --hard" if you want to drop all changes15:19
mikl joined15:19
hobodave joined15:19
doener WhatAHam: "git checkout -- file" to get the version from the index into the working tree15:19
WhatAHam ok so git checkout15:19
ok15:19
doener WhatAHam: "git checkout HEAD -- file" to get the version from HEAD into the index and working tree15:19
WhatAHam what's the index?15:20
haha15:20
WhatAHam ducks15:20
loincloth joined15:20
ekidd left15:21
charon left15:21
hpa left15:22
eventualbuddha joined15:22
roger_padactor so putting PATH=$PATH:$HOME/bin in my .bash_profile doesn't get git command to work. any other ideas?15:23
brink joined15:23
roger_padactor so i have to restart something for it to take effect?15:23
vmiklos logout and login15:23
un|ogic wait15:24
PerlJam re-run your .bash_profile15:24
vmiklos or just 'source ~/.bash_profile'15:24
un|ogic just source your bash_profile15:24
doener or put that into .bashrc instead of .bash_profile15:24
roger_padactor its in both15:24
un|ogic or do a setenv15:24
:P15:24
wait, bash.. export then15:24
roger_padactor its exported15:25
brink What's the best way to permanently remove a directory of large binaries so they don't take up space?15:25
doener then new bash processes should have that path... what does "echo $PATH" tell?15:25
un|ogic echo $PATH shows it's there?15:25
cilly joined15:25
beket left15:26
roger_padactor its not in the path15:26
so its not set15:26
damn thing15:27
um what is source ?15:28
beket joined15:28
jrmuizel joined15:30
roger_padactor ok that sourcing thing worked... so how do i get it to work on login15:30
cedricv left15:30
a-priori left15:31
charon joined15:33
merlin83 left15:34
jaalto brink asked interesting question: What's the best way to permanently remove a directory of large binaries so they don't take up space?15:36
E.g if you decide to split a repository in two and you don't care about the old history (pdf files, images ...)15:37
drizzd left15:37
ekidd joined15:38
brink jaalto: Yes, I have 8M of code and 84M of binaries. Splitting this into two repositories would be a good solution. I don't care about the binary history.15:38
jaalto: Of course, I don't know how to split it.15:39
charon jaalto, brink: man git-filter-branch15:39
Gitbot jaalto: the git-filter-branch manpage can be found at http://git.or.cz/man/git-filter-branch15:39
brink charon: Yes. I've tried that often. Maybe I'm missing something, but I've failed to find an incantation with git-filter branch that actually reduces the size of the repository.15:40
jaalto charon: Doesn't that also copy history? I'd like to remove the old binaries permanently from current repo15:41
JohnFlux left15:41
Sho_ left15:41
PerlJam brink: did you remember to remove the backup refs after you ran filter-branch ?15:42
charon you'll have to force-expire everything after the filtering, something like 'rm -rf .git/refs/original; git reflog expire --expire=now --all; git gc; git prune --expire=now'15:42
obviously that removes all safety nets so make sure you have a backup15:42
might be easier to just clone the repo however.15:42
brink charon: Not worried. I do this in a test clone.15:43
charon jaalto: all rewriting always copies; as Tv put it, you cannot change, only rewrite and forget. if you fail to forget, of course you'll have the old stuff around too15:43
error404notfound joined15:43
cedricv joined15:43
jaalto charon: so if you copy the binaries to complely fresh repo (no split; start at zero), and 'rm <files>' from old repo, is there any way to completely wipe the old history?15:46
brink charon: I just tried each of those incantation. After each du -h gave the same answer - a whopping 149M15:46
ntoll left15:47
charon brink: make sure you've really got rid of all refs pointing to the old history15:47
_Vi left15:47
girishr joined15:47
charon brink: for example say 'git log --all -- $some_large_file'; if that returns anything you still have some refs lying around15:47
brink charon: Is there method for doing that?15:47
charon after finding some sha1 you can use 'git branch --contains $sha1' and 'git tag --contains $sha1' to find the offenders (the latter is only in very recent git however)15:48
beket left15:48
brink charon: I have git 1.5.4. Is that recent enough?15:49
charon uh... i doubt you'll even have 'branch --contains' at 1.5.415:49
chalky left15:49
sitaram joined15:49
charon oh, you do. branch --contains is in since v1.5.4-rc0 and tag --contains since v1.6.2-rc0 (i.e. not released yet)15:50
brink charon: That's the latest on mac ports. On Ubuntu I have 1.5.2.5, which seems to be the latest in my current set of universes.15:50
charon but in any case, you can check if any tags still have the file with 'git log --tags -- $file' and if so, you probably forgot --tag-name-filter cat and they _all_ still point to the old history.15:51
johan-s left15:51
brink charon: I have no tags. It's all from a ghetto model SVN repository.15:51
girishr left15:51
charon brink: so did you filter the remotes? what does 'git branch -a --contains $sha1' say?15:52
error404notfoun1 joined15:53
HenryHuang joined15:54
brink charon: I just took a subdirectory of the trunk. Unfortunately, that included a sub-sub directory of binaries.15:54
rostedt joined15:54
brink charon: Is there a quick way to find the sha1 of a file?15:55
charon brink: umm, you need a commit sha1 for branch --contains. that's why i said to log --all -- $file earlier. (the real answer is git hash-object)15:55
aziz left15:56
brink charon: Ok. So I can just do git log filename to find the sha1. Is that correct?15:57
ashleyw joined15:57
charon you can use 'log -- filename' to find the sha1 of _some_ commit that touches the file, yes.15:57
rostedt hi all. I was wondering about a new little feature. I find that often after pushing to a public git repo, I receive acked-by and tested-by on a commit15:57
charon brink: as for your subdirectory, re-filter with '--index-filter "git rm -r --cached --ignore-unmatch $subsubdir"' if you want to remove it. the gfb manpage has more details.15:58
kadoban left15:58
rostedt is there some kind of "amendment" feature to add to a change log of a commit after it has been pushed?15:58
not actually changing the change log, but to just add a comment to it that can be seen by a 'git log'15:58
charon rostedt: currently not without rewriting history. man git-notes could help you but it's probably not going to make it into 1.6.215:59
Gitbot rostedt: the git-notes manpage can be found at http://git.or.cz/man/git-notes15:59
brink charon: Ok, the git branch -a --contains sha1 says it exists in origin/HEAD and origin/master, but in the original git repo it's also in master.16:01
RaySl left16:02
offby1`offby116:02
rostedt charon: thanks16:02
charon brink: you probably didn't filter the remotes. you could just delete the remote to get rid of its origin/* branches.16:02
error404notfound left16:02
drewr left16:04
krawek joined16:05
brink charon: I just did git remote rm origin. Still the same size though.16:05
charon it won't magically throw away objects, you'll have to repeat my "incantation"16:05
moore_ joined16:05
charon (or maybe i just forgot some part of the forget-everything-dance)16:05
brink charon: git prune says this: error: refs/remotes/origin/HEAD points nowhere!16:07
moore33 left16:07
greyface joined16:07
charon hrm. bug in git-remote? you can remove it manually with 'rm .git/refs/remotes/origin/HEAD'16:09
doener yeah, there was(?) a bug with deleting symbolic refs, the referenced ref was deleted instead16:10
brink charon: That fixed the error. After prune it's still all 149M.16:11
charon wonders what he forgot this time16:11
charon brink: can you check 'git log --all -- $file' for some big file again? it should come up empty if you got rid of all refs16:11
(refs pointing to the old history, that is)16:11
brink charon: Do I need the full path to the file?16:12
muthu_ joined16:12
charon yes.16:12
doener charon: which cleanup dance did you suggest?16:12
charon doener: [16:42] <charon> you'll have to force-expire everything after the filtering, something like 'rm -rf .git/refs/original; git reflog expire --expire=now --all; git gc; git prune --expire=now'16:12
doener should be fine, except that I use "git repack -ad" instead of "git gc" (stops the unreachable objects from being written as loose objects -> faster)16:13
charon ah, good idea16:13
i'm actually writing a section for man:gfb now. this comes up every week :(16:14
doener the most common reason for the repo still being big is that the files have been moved/renamed, and now you don't remember the old names16:14
brink charon: yes. That prints out the reference to the commit.16:14
doener *yawn* the irc log search is slow again :-/16:15
brink charon: It has a git-svn-id.16:16
charon brink: then go back to finding a ref that points to the commit. if 'git branch -a --contains $sha1' doesn't show any branch, it's probably a tag.16:16
tim_jenssen left16:16
brink charon: Yes git branch -a doesn't find it. How do I find a ref that points to the commit?16:17
mfilipe left16:17
doener hm, why bother with finding a ref? Just filtering with " -- --all" catches everything16:18
mfilipe joined16:18
doener brink: just in case that the files have been renamed or so:16:19
git rev-list --objects --all | cut -f1 -d' ' | git cat-file --batch-check | grep blob | sort -n -k 3 | tail -n10 | while read hash type size; do echo -n "$size "; git rev-list --all --objects | grep $hash | cut -d' ' -f2- ; done16:19
brink: that monstrosity tells you the filenames used for the ten biggest blobs in your repo16:19
reprore joined16:20
Grum how can i find the branchpoint of a branch that i just know the name off?16:20
brink doener: I'm getting this: usage: git-cat-file [-t|-s|-e|-p|<type>] <sha1>16:20
doener brink: old git? Might need 1.6 or so16:21
charon Grum: branches have no intrinsic branch point, they just have a merge-base w.r.t. some _other_ branch. you can find that with git merge-base $branch $other16:22
brink doener: On Mac I'm at 1.5.4 and on Ubuntu I'm at 1.5.2.5. Those are the latests via port install and apt-get. Should I bypass mac ports and Ubuntu Universes somehow? Should I build it myself?16:22
bram left16:23
stephenlb joined16:23
GeertB joined16:24
doener brink: I'm usually running a self-built git from git.git's master. IIRC for Ubuntu there are newer packages available "somewhere"16:25
brink: at that ubuntu version is _definitely_ worth upgrading. 1.5.2 is almost 2 years old, and there have been just too many improvements to still use that old thing16:26
s/at/and/16:26
reprore left16:26
charon on my debian box i just downloaded the git-core package from unstable and installed it manually, worked fine16:27
outoftime joined16:27
charon (you'll want to update gitk etc. too, but that one's headless and i only cared about the tools)16:27
outoftime is there a way to get a log-type summary of all of the commits that are in one branch, but not in another?16:27
(like a git-diff, but showing the commit logs rather than the actual diff)16:27
rostedt left16:28
mfilipe left16:29
drewr joined16:30
mfilipe joined16:30
Hendu joined16:30
giallu left16:30
Bass10 joined16:31
charon doener: how about http://gist.github.com/63983 ?16:32
edwardam joined16:32
eean left16:32
eean joined16:33
Voker57 joined16:33
chris2 joined16:33
qrush__ joined16:35
nothinghappens joined16:35
kadoban joined16:37
Korren left16:37
ashleyw_ joined16:38
mansour joined16:38
mansour I have added "*.o" to my .gitignore. However, I couldn't find a way to do d this in all directories. Do I need to put this in every directory ?16:39
qrush__ left16:39
ekidd mansour: Just once, at the top level of your project.16:39
doener mansour: no, unless there's a slash in there, the rule works recursively for all subdirectories16:40
naeu left16:40
Grum hmm so what is .git/info/exclude used for?16:40
doener mansour: and "dir/" works also in all subdirs, as that just means that "dir" must be a directory, not a file, and does not anchor the pattern16:40
Grum: same as .gitignore, but for things you want to ignore locally16:41
Grum: .gitignore is the tracked version, that you can commit so everyone has it16:41
Grum hmm for example if you are using a different editor which leaves ~ files orso?16:41
doener yeah, or if you have any other funny tools, that leave e.g. directory index files, or something else that not the whole world will care about16:42
Grum is there any way to find the most recent branchpoint of a branch?16:42
doener you can find the merge base of two branches16:42
Grum yeah git mergebase does that but i dont know what it forked from16:43
reprore joined16:43
kapone joined16:43
mansour ok, so do I need to put a slash only? like this ?? *.o/ ??!!16:43
qrush_ left16:43
qrush_ joined16:44
doener mansour: no... that would mean that only directories ending in .o would be ignored16:44
mansour: just *.o is already fine16:44
akitada_ joined16:44
lresende left16:45
akitada_ left16:46
solydzajs joined16:46
mansour doener: thank you. I just tried it.16:46
ashleyw left16:46
mansour so, if I have multiple modules, and I want to ignore a dir called target in each of them, all I have ot do is "target/", right /16:47
right ?16:47
RaySl joined16:48
doener modules == submodules?16:48
ekidd Is there a good way to iterate over two lists in parallel when using shell scripts?16:48
ekidd is working on git patch16:48
mansour hum, no. I missed this part. I forgot git has submodules keyword. I have few subdirectories and each of them contains "target"16:49
I need to ignore this "target" dir always.16:49
doener yep, just "target/" in a top-level .gitignore should be fine16:49
ekidd Or even /target/, I think.16:50
doener charon: hm, maybe you should mention that "git clone /path/to/repo" won't do the trick, as that just hardlinks everything16:50
mansour cool, for some odd reason I had to put .gitignore in each module directory ... I will go back again sometime and double check this16:50
cilly left16:51
doener ekidd: no, that anchors the pattern, thus it won't ignore the directory in any subdirectory16:51
ekidd Oh, sorry.16:51
I wasn't paying enough attention. :-(16:51
tor3 joined16:51
akitada joined16:51
sitaram left16:52
charon doener: true, i forgot. using file:// should do it, right?16:52
Grum doener: you know of now way to see where a branch forked from if you dont know the branch it came from?16:52
doener charon: I think so, I always forget how to force the pack generation. And the "rm -rf .git/refs/original" will fail when the refs got packed for some reason (e.g. earlier packing attempts)16:53
Grum it seems like you have to find the closest parent which has >1 children16:53
jordibunster joined16:53
doener Grum: git doesn't really have a "branched from" concept in its object model, unlike svn16:53
xenoterracide does git format-patch have a -m switch? where could I find the docs on it? I'm wondering if I've been screwing up patches... also where the -M option documented?16:54
Grum yeah i know; but the 'parent with multiple children' is what i am looking for; is there any way to easily get that information?16:54
or hard ... ;D16:54
jordibunster My prompt makes use of git status to see if there's anything dirty, anything untracked, and anything staged. Any way to do it faster than git status?16:55
Grum or mmm i could just bruteforce a mergebase on all of the other refs i have; and pick the one with the least revisions between me and the mergebase found16:55
qrush_ jordibunster: mind control16:55
doener Grum: that might as well give you a commit at which another branch was created from this branch16:55
kukks joined16:56
Grum doener: true .. mmm16:56
alip left16:56
jordibunster qrush: I was thinking something that stops as soon as it finds one of each.16:56
reprore left16:56
charon Grum: git rev-list --boundary HEAD --not $(git for-each-ref refs/heads/ --format='%(refname)' | grep -v $(git symbolic-ref HEAD)) | sed-ne 's/^-\(.*\)/\1/p'16:56
alip joined16:57
charon gives you the most recent commit common with any other branch16:57
Grum i so need to decypher that hehehe16:57
bentob0x how do you 'pull' single commits from an external project on your local machine?16:57
charon Grum: afterwards 'git branch --contains $sha1_from_above' is probably the most helpful16:57
orlandov joined16:58
charon note that it's more or less the same as brute-forcing the merge-base as you suggested, except it's much faster16:58
reprore joined16:58
Grum mmm i am only missing where to put the input-branch16:58
(or commit even)16:59
galderz left16:59
charon where i wrote HEAD16:59
(so you could also just check it out)16:59
Grum i tried; it gives nothing for me16:59
awarde joined17:00
sdboyer-laptop joined17:00
mansour every while and then I get: # Changed but not updated: when I do git status. These files have been added already !!17:00
kinyobi joined17:00
doener Grum: did you replace both "HEAD"s?17:00
charon it won't work with a sha1 in place of the HEAD unfortunately17:01
it also won't work if you have any other branch containing the same commit17:01
melvinram|awaymelvinram17:01
Grum i'm getting the error that i'm not inputting a 'symbolic ref'17:01
charon oh, right. just replace the entire $(git symbolic-ref HEAD) by the branch name in the second case17:02
doener easily fixable with $(git rev-parse --branches | grep -v ($git rev-parse HEAD))17:02
outoftime left17:02
doener s/($/$(/17:02
qrush_ left17:03
Grum k, i'll toy with this :)17:03
thanks ^^17:04
i should start reading those manpages ;)17:04
kapone_ joined17:04
charon a way to spell --all-except that doesn't involve grep might be nice17:04
bryanl joined17:04
kapone left17:05
vmiklos left17:06
vmiklos joined17:06
charon (damn, another nice idea and we're supposed to be in -rc freeze)17:06
cmarcelo left17:11
allan_wind joined17:12
allan_wind git show 18b6ecb0c17:18
...17:18
index 2c62fb8..cab14f3 10064417:18
How do I find the commit hash for 2c62fb8? Or how do I find the parent for 18b6ecb0c for a particular file?17:18
offby1 I have this dim idea that you can call "git ls-tree" on lots of trees, and grep the output for that17:21
_stack joined17:21
charon allan_wind: git rev-list -1 18b6ecb0c^ -- file17:22
MarcWeber allan_wind: 2c62... seems to be the start of a hash. You can use them instead of the full has has well. Just try git show 2c62fb817:22
charon allan_wind: that will give you the _first_ candidate. it may not be unique17:22
jchris joined17:23
_stack hi,is it possible to do auto replication of a certain repository throught varius servers with git?17:23
charon allan_wind: oh, and if 18b6ecb0c was a merge you'll have to investigate all of its parents. you could use 'git rev-list -2 18b6ecb0c -- file' then.17:24
softdrink joined17:24
plediii_ joined17:25
Daniel_B How do I find any tags that contain a given commit? (1.6.1.2)17:25
doener charon: commit^@ == all parents of commit17:26
charon doener: damn. thanks. i even took a brief look in rev-parse's manpage :)17:26
doener: oh, and i sent out the gfb doc patch, but forgot to CC you.17:26
doener no problem, I'm subscribed anyway17:27
icwiener joined17:27
cgardner joined17:28
exon left17:28
abditus joined17:29
allan_wind charon: git show 2c62fb8 does show me the blob, but I need the commit for use with bisect17:29
HenryHuang left17:30
schierbeck joined17:31
charon allan_wind: that's why i'm suggesting rev-list. i didn't bring up show :)17:31
reprore left17:31
benn_d left17:31
charon allan_wind: taking doener's suggestion into account, you should use git rev-list -1 18b6ecb0c^@ -- file17:31
Spacecrack joined17:31
offby1 what exactly does "git clone --mirror" do, and why would one use it?17:32
allan_wind charon: git rev-list -1 18b6ecb0c^ -- file gives me 0d41c924293bec930b9c226ab3744a10b7ef0d97 and when I show that it does not contain the before changes corresponding to my diff17:32
Spacecrack I wanna clone a complete part of a repository with a non-standard layout. There's not tags, and the branches are located in _two_ subdirectories. Can I use multi-globbing in the .git/config to import that?17:33
bobmcw joined17:33
d0k joined17:34
Spacecrack I.e., the directory structure looks like this: [common path]/production hosts the stable branches, [common path]/development the unstable ones, and [common path]/main/ is the trunk itself!17:34
charon allan_wind: is 18b6ecb0c a merge?17:34
patrikf joined17:35
Spacecrack For testing I only imported all production branches, but gitk strangely only showed one linear path of development.17:35
kadoban Spacecrack: gitk --all ?17:36
offby1 curse kadoban and his fast fingers17:36
Spacecrack kadoban: thanks, that did it. Now I see funky arrows. :)17:37
chalky joined17:37
charon offby1: bc699afcce3c417:37
Gitbot [git bc699afcc]: http://tinyurl.com/clu5hn -- clone: Add an option to set up a mirror17:37
yofel left17:37
Spacecrack BTW, what does it mean in gitk when there's a long arrow which is vertically interrupted?17:38
offby1 hmm17:38
charon: thanks ...17:38
abditus Git newbie question: I've cloned off a remote repository and created a branch I'm working on, and now I'd like to update that branch with the latest remote repository changes. Which command/options do I run?17:38
NSaibot joined17:38
offby1 charon: that kinda begs the question, though: I don't know what "git remote --mirror" does.17:39
Call me lazy, but I don't feel like deciphering the source to find out17:39
allan_wind charon: merge... I don't think so, how do I tell?17:39
offby1 abditus: "git pull" should do it.17:39
charon offby1: unlike clone --mirror, remote --mirror is actually documented "in full" including semantics :)17:39
offby1 hmm17:39
charon allan_wind: 'git show 18b6ecb0c' will show a line 'Merge: parent1 parent2 ...'17:40
Niamor left17:40
Sitaramcell joined17:40
offby1 I wouldn't call that "in full": it describes the behavior, but doesn't tell me why that behavior would be useful. What problem does "git remote --mirror" solve?17:40
Niamor joined17:40
lack offby1: It just puts the heads in refs/heads/ and not refs/remotes, so the repository is an exact mirror of the upstream repository.17:40
iulian joined17:41
offby1 lack: I gathered that from the docs. But my question still stands: what problem does that solve?17:41
Why would I want to do that?17:41
lack offby1: I use it to keep a local copy of the kernel.org man git tree on a local server, updated by nightly cron job, so we don't clog our thin pipe during the day.17:41
plediii left17:41
abditus When I run "git pull" I get the message " Please name which branch you want to merge on..." It's a little unclear how I specify that. "git pull mybranchname" doesn't seem to work.17:41
allan_wind charon: yeah, I thought so. No it was not a merge17:41
charon offby1: if people then fetch from the mirror, they'll get the branches; fetch doesn't grab refs/remotes/* by default.17:42
temoto-wd left17:42
offby1 charon: so basically it's just for saving network bandwidth?17:42
charon huh?17:43
allan_wind charon: let me ask it more generic. I see a commit, how do i find out who made the defective check-in? git blame 18b6ecb0c^ -- file didn't work17:43
offby1 charon: I'm trying to figure out what problem "git remote --mirror" solves.17:43
"saving network bandwidth" is my guess at the problem; apparently, it's the wrong guess.17:43
charon it's to make a mirror of a repo that people can fetch from as if it was the original17:44
one use could indeed be to save bandwidth. but maybe you just have cronjobs mirroring your repos around the world to back them up, who knows.17:44
offby1 yes, yes; but that's not a _problem_. I still don't understand why people don't just fetch from the original.17:44
ah17:44
now we're talkin'.17:44
thanks.17:44
ciskje left17:45
offby1 so a related question: I did git clone --mirror remote:foo.git mirror, and saw (among other things) "error: refs/stash does not point to a valid object!"17:46
charon allan_wind: and how exactly did it not work? that's the right syntax to blame a file in the parent.17:46
offby1 what's that mean? What should I do about it?17:46
The remote indeed has a stash, and my clone indeed doesn't have it.17:46
allan_wind charon: blame output does not contain the before change17:47
abditus N/M. Got it. git pull <remote branch name here>17:47
dwave left17:47
charon allan_wind: that would be a bug, and you'd have to make a test case.17:47
offby1: stashes are implemented through reflogs, and those aren't cloned. though i wonder why it would point at an invalid object; it should point to a merge commit of two other commits, all three of which make up the stash state.17:48
allan_wind charon: hmm... I think the problem is that 18b6ecb0c^ doesn't do it for the right file17:48
bb17:48
thumper_laptop joined17:50
roger_padactor i set up git on my webserver. how do i change my username so i can ssh and clone that repo17:50
thumper left17:50
roger_padactor currently its using my unix box username instead of me specifing one17:51
juanjoc joined17:52
joshdavey joined17:52
marvil07 joined17:53
jordibunster left17:54
a-priori joined17:55
Ilari roger_padactor: user@host?17:59
lorandi left18:03
lorandi joined18:03
Hendu left18:06
cedricv left18:06
cmarcelo joined18:08
cmarcelo left18:09
cmarcelo joined18:09
name joined18:11
marvil07 left18:14
dwave joined18:14
kapone_ left18:15
countd joined18:15
lorandi left18:16
Sitaramcell left18:16
lorandi joined18:16
kapone joined18:17
RoPP joined18:18
tango_ left18:19
jmesnil left18:20
bobesponja joined18:22
jboyens joined18:24
Grum charon: git rev-parse $(git rev-list remotes/$BRANCH --not $(git for-each-ref refs/remotes/ --format='%(refname)' | grep -v remotes/$BRANCH) | tail -1)~18:24
that worked like charm for finding the point it branched of from18:24
there is probably a more elegant way of doing it .. but hell =)18:25
mm and for some reason it fails on some of the branches ...18:27
bronson joined18:27
JensB left18:28
charon some of them will be reachable from another branch18:28
so the rev-list will be empty18:29
tanek joined18:29
Grum yeah but that only happens when someone did something nasty in svk so it appears18:29
aziz joined18:29
eletuchy_ left18:30
eletuchy joined18:30
Grum how does gitk list the branches a commit is in?18:30
tanek left18:31
akitada left18:31
charon git branch --merged $commit18:33
(presumably)18:33
er, 'git branch --contains $commit' of course.18:33
charon goes to grab a coffee18:33
lorandi left18:34
nick_h[litage] left18:34
lorandi joined18:34
tanek joined18:36
TML Is there a flag to 'git format-patch' that can make it output them in a format that patch(1) can read, rather than the mbox-ish format? I looked on http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html, but if it's there, I'm not seeing it.18:36
doener patch usually reads that just fine18:36
FFighter joined18:37
FFighter hello18:37
dreiss joined18:37
doener unless your commit message looks like a diff18:37
FFighter is this the right place to ask about gitosis ?18:37
TML doener: Ah, maybe that's what I did. Thanks.18:38
ceej joined18:38
doener so far, nobody has been blamed for asking about gitosis in here18:38
da1l6 joined18:38
Sigma joined18:39
doener at least no as far as I'm aware18:39
FFighter hehe ok thanks18:39
TML doener: I can see how that was stupid of me. Thanks.18:39
FFighter how do I specify more than on repo per group?18:39
like, can I do: writable = repo1,repo2,repo318:39
da1l6 hi18:40
FFighter ?18:40
da1l6 how do i get an accidently deleted file back from head state?18:40
krh da1l6: git checkout <file>18:40
doener FFighter: http://eagain.net/gitweb/?p=gitosis.git;a=blob;f=example.conf;h=87bd822fc17ebfe0132f7060afa8036f84c3be99;hb=master18:40
da1l6 krh: thanks :)18:41
doener krh, da1l6: that's from the index, actually (so it won't work after "git rm")18:41
to get the file from HEAD, it's "git checkout HEAD -- file"18:41
rigel joined18:41
rigel does git have support for hardware signing systems like the rsa dongle18:42
doener FFighter: see "writable" for group "quux"18:42
krh oh yeah18:42
FFighter doener, thank you18:42
:)18:42
mcella left18:44
merlin83 joined18:44
TML Maybe this doesn't make sense, but can I 'pull' a bare repo? That is, given a remote repo, I want to have a local 'bare' repo that matches it.18:47
doener TML: clone --mirror18:47
krh TML: git clone --bare, I think18:47
oh18:47
doener TML: then you can _fetch_ in the bare mirror18:48
TML: pull is fetch + merge, and merge doesn't work in a bare repo18:48
(well, you can always fetch in a bare repo, not just when created with clone --mirror, but that sets it up as a mirror, obviously)18:49
lorandi left18:49
TML doener: I actually want to have the remote repo 'push' to this bare repo in a post-commit hook.18:50
_slacker_ left18:50
ceyusa left18:50
doener TML: well, then just "git init --bare" does the trick, as usual...18:50
jeckel joined18:50
TML doener: And then setup the remote and push, rather than 'clone --mirror'?18:51
tango_ joined18:52
doener TML: yep. You might want to set remote.<name>.push to refs/*:refs/* as well (in the repo from which you push)18:52
ToxicFrog left18:56
benn_d joined18:56
merlin1983 joined18:57
kapone left18:58
solydzajs_ joined18:59
plediii_ left19:00
warlock_mza joined19:00
TML doener: Sorry, that last bit was mostly nonsense to me. Got something I can read that would explain it?19:04
eventualbuddha left19:05
doener the git-push man page19:05
eventualbuddha joined19:05
ice799 joined19:05
TML k19:05
Transitioning to git is either going to make me brilliant or kill me :)19:06
doener TML: oh, actually, setting remote.<name>.mirror is smarter19:06
TML Is remote.<name>.mirror the same thing as "[remote "<name>"] mirror"?19:07
kapone joined19:07
doener yes. The former is what you give to "git config", the latter is how it looks in the config file19:07
TML ok19:08
solydzajs_ left19:08
solydzajs left19:10
merlin83 left19:10
TML And that's a true/false?19:11
"git config remote.hub.mirror true"?19:11
msanchez left19:11
eventualbuddha left19:11
doener yep19:13
(see git-config(1))19:13
merlin1983 left19:13
merlin83 joined19:13
TML Ah - I honestly didn't even expect there to be a comprehsive list of all of them.19:15
doener some things aren't in there (the send-email stuff, for example), but most are19:17
kinyobi left19:18
bentob0x can you add a remote in your 'global' ~/.gitconfig file instead of the local /.git/config file?19:19
kevlarman i think so19:19
although that sounds a little silly19:19
ijcd joined19:19
kevlarman (if you clone an unrelated project you'll end up fetching a lot of unrelated stuff)19:20
Spacecrack left19:20
bentob0x I just use a remote reference when I need it19:20
like : git pull myremote master19:20
drizzd joined19:20
naeu joined19:21
bobmcw left19:21
Laibsch left19:22
eletuchy left19:24
noth left19:29
Grum how can i toss a commit away? (and yes i know i am altering history but that is ok)19:30
chrisdone left19:30
maelcum|konv joined19:31
bremner git rebase --interactive19:32
sgrimm left19:33
Grum but this only works nicely with commits relatively close to head i presume?19:33
lorandi joined19:33
PsychoTrahe joined19:35
Yuuhi left19:36
mncaudill left19:37
dmlloyd_ joined19:37
noth joined19:37
dmlloyd left19:37
dmlloyd_dmlloyd19:37
qrushqrush|away19:39
csgeek left19:39
dsal joined19:39
fynn joined19:40
ryates joined19:42
AngryElf_ joined19:43
ryates I may be missing something obvious, but is there a way to clone an svn repository (aka git svn clone) to a bare repository that can then act as a shared git repo? so I need to rebase the git shared repo against svn occasionally and also push changes to the git repo from other git clients19:44
AngryElf_ left19:44
Tv ryates: "rebase" and "shared" don't fit nicely in one sentence :(19:44
PerlJam ryates: you can make it a bare repo by hand editing things.19:45
allan_wind I have a commit `git show 18b6ecb0c7` and see index 2c62fb8..cab14f3 100644. I am interested in the commit for the blob 2c62fb8. git show 2c62fb8 does give me the right thing, but how do I find the corresponding commit? I tried `git blame 18b6ecb0c7^ but it does not give me the right content. git blame 2c62fb8 -- $file fails with "non commit ...". Any ideas?19:46
ryates Tv: that might explain it :)19:47
parasti allan_wind: blame takes a treeish and a filename, but you're passing it a blob SHA119:47
ryates my approach was to git svn clone to a temporary git repo, then set up my final repo by doing a clone --bare on my temp repo19:48
but then I can't rebase!19:48
parasti allan_wind: "git blame 18b6ecb0c7^ -- $file" should do the right thing19:48
ryates PerlJam: you mean change the git config files to make it think it's bare?19:48
PerlJam ryates: yep (it's a one line change). but you'll also want to get rid of the working files.19:48
and hoise the .git dir up to project.git19:49
ryates PerlJam: can you still rebase after doing that?19:49
PerlJam s/hoise/hoist/19:49
ryates: you *can*, but it's not generally a good thing.19:49
Hydrogen joined19:49
ryates thanks folks - perhaps I should abandon the effort. I was trying to "test out" git while still maintaining my working svn repo. Maybe I should just dive in with both feet.19:50
PerlJam But I guess with svn's linearity it's probably okay. I don't know.19:50
eventualbuddha joined19:50
ryates I'd rather deal with a learning curve with git than risk the integrity of my repo, me thinks19:50
cbrakecbrake_away19:50
PerlJam ryates: copy the svn repo and turn it into a git repo for play.19:51
allan_wind parasti: ahh... it does, I mixed up two files. Why doesn' git show 18b6ecb0c776f08556bf2fb0f6aef2bbd9d9b497^ $file give me the same thing?19:51
ryates PerlJam: I'll do that. Thanks again for the help.19:52
PerlJam ryates: it's really easy to go from git -> svn and not screw something up, but it's much harder to go the other way.19:52
(I mean for working files)19:52
parasti allan_wind: "git show $rev $file" shows the differences in $file made in $rev19:52
PerlJam you do things in git-land that have no equivalent in svn-land so that just becomes a simple patch.19:52
ryates I'm really the only devloper at this time so this whole thing may be overkill - I was just going with a shared git repo to manage re-cloning between my work computer and my laptop19:52
allan_wind parasti: how content (blob) instead of diff?19:53
how do I get...19:53
parasti allan_wind: "git show $rev:$file"19:53
drewr` joined19:55
eventualbuddha left19:56
lorandi left19:57
sgrimm joined19:58
willb left19:59
engla joined20:01
elyezer joined20:01
plediii joined20:01
Toad__ joined20:01
yann joined20:02
Hydrogen left20:06
lollan joined20:09
drewr left20:11
lollan left20:13
Toad left20:13
allan_wind parasti: subtle... perfect, thanks a ton20:13
da1l6 left20:13
drewr`drewr20:13
Toad__Toad20:16
charon_ joined20:18
charon_ left20:19
archis joined20:20
tango_ left20:21
porcnick joined20:21
archis left20:21
porcnick left20:22
porcnick joined20:23
tango_ joined20:23
unreal left20:25
unreal joined20:26
dreiss left20:28
topinupa left20:30
TheRealKerni joined20:31
melvinram left20:32
pointlessjon joined20:35
bentob0x left20:37
error404notfoun1 left20:40
Hydrogen joined20:41
edwardamedwardam|Lnch20:43
dramsay joined20:44
mfilipe left20:45
warlock_mza left20:45
bryanl left20:46
moccuo joined20:49
bobthecow joined20:49
qixyxexi joined20:50
priidu left20:52
plediii_ joined20:52
melvinram joined20:52
benn_d left20:53
bobthecow i'm having trouble with git-svn. It's set up, and working, but gets confused every time i pull from another repo.20:54
I can't find much on debugging git svn. All my googling returns "how to set it up", not much on "how to fix it"20:54
charon_ joined20:54
bobthecow anyone have debugging tips and/or links for git svn?20:55
d0k left20:56
error404notfound joined20:59
radii left21:00
plediii left21:03
SRabbelier left21:03
SRabbelier1 joined21:04
SRabbelier1SRabbelier21:04
plediii_ left21:05
charon left21:05
charon_charon21:05
plediii joined21:05
parasti bobthecow: can you give us more info? "pull" isn't something you do in git-svn workflows, and "gets confused" and "another repo" doesn't say a lot about what's happening and what you're trying to do21:05
perezd88 joined21:06
bobthecow sorry. I'll try again :)21:06
aisbaa left21:06
qixyxexi left21:07
bobthecow i have three repos, call them: svn, A and B.21:07
A was created using git-svn from the original svn repo.21:07
B is a clone of A21:08
lywex joined21:08
bobthecow currently the code in A B and the original svn is identical.21:08
making a change in B then pulling it to A works great.21:08
tvw joined21:09
bobthecow git-svn fetch and rebase in A works great.21:09
jonnylamb left21:09
johnw joined21:09
bobthecow dcommit works great.21:09
basically everything's great.21:09
drobbins hiya21:09
bobthecow but the next time i try to pull from B to A then dcommit, it wants to recommit all the previous changes too.21:10
git-svn rebasing fixes it (with a few warnings about merges)21:10
drobbins hey, if I'm applying patches using git am -3, and a patch fails and it says it's unable to fall back to a 3-way merge, is there any steps that could have been taken (either in patch generation or otherwise) that *would* allow me to fall back on a merge?21:10
s/is/are/21:10
bobthecow but next time, it'll try all the same things plus any new commits.21:11
it's getting absurd.21:11
and i'm seeing more merge warnings.21:11
krawek_ joined21:11
abditus left21:12
parasti bobthecow: merging + git-svn don't go well together21:12
elmarco left21:12
krawek left21:13
dramsay left21:13
bobthecow parasti: that's not the answer i wanted to hear :)21:13
parasti bobthecow: hang on21:14
peritus joined21:14
abditus joined21:14
parasti bobthecow: git pull is fetch + merge, so I'd suggest you use git fetch + git merge --squash or git format-patch | git am21:15
marvil07 joined21:15
drobbins parasti: any suggestions for my question?21:16
Niamor left21:16
seb42 left21:18
offby1` joined21:18
seb42 joined21:19
Tv left21:19
parasti drobbins: not really. all I know about git am merge support can be read in man git-am, the paragraph about -3 :)21:19
Gitbot drobbins: the git-am manpage can be found at http://git.or.cz/man/git-am21:20
Radtoo joined21:20
eletuchy joined21:20
drobbins parasti: ok, no problem :)21:20
ryates bobthecow: I just got a similar answer and decided to just convert to using git full time - you can too :)21:20
jaalto Is it possible to merge two git repositories? I have code in CVS. Long time ago I set up fresh git repository, moved all CVS head files there, started at ground zro and continued developing with git, forgetting about the CVS. No I would like to import the "old" code somehow. Is this possible?21:21
error404notfound left21:21
|Voker57| joined21:22
Voker57 left21:22
ashleyw_ left21:24
thiago_home joined21:24
lywex left21:25
parasti jaalto: sure. I don't know about Git's CVS support, but I've done this with old tarballs and a new SVN repo21:25
Radtoo How do I replace missing/corrupt objects in a local repository with objects from a remote repository?21:25
bobthecow ryates: unfortunately, I can't. I have to commit to an existing SVN repo, and I have no control over the decision to switch it to git :(21:26
bywe joined21:26
error404notfound joined21:26
charon bobthecow, parasti: actually merging works with git-svn as long as you make sure the svn history is the first-parent line21:27
Hydrogen left21:27
jaalto parasti: How did you do it? I'm currently running 'git-cvsimport -p x -v -d <pserver-address> project' to convert my old CVS repo into git repo. But I don't know how would I merge this "old" with current devel repo.21:27
orlandov left21:28
parasti jaalto: I fetched the "converted" repo into the Git repo and used grafts to glue the histories together21:29
jaalto: to make the connection permanent, you'd probably want to use git filter-branch, too (which I never did)21:30
bobthecow parasti: Thanks, squashing seems to work.21:30
hobodave left21:30
mriou_ joined21:31
jaalto parasti: What is grafts?21:31
benn_d joined21:31
bobthecow parasti: it's prob'ly better that way anyway. That way the SVN commits can be more concise :)21:31
parasti charon: I suspect the problem was that a particular "pull" didn't record a merge commit, so git-svn rewrote all the commits, Git lost track of what was already merged, and chaos ensued21:32
earcar joined21:32
parasti charon: probably wouldn't have happened with a --no-ff21:32
nerochiaro left21:33
offby1 left21:33
bobthecow parasti: is there any way to tell git-svn to start over?21:33
parasti jaalto: "grafts" is fake ancestry information, stored in .git/info/grafts21:33
charon oh this is about two git repos. then chaos will always ensue, as 'git svn rebase' rewrites the merge, but the other repo still has the old one21:33
bobthecow charon, parasti: so that will always happen unless changes from the second git repo are merged in as a unique commit, like with --squash ?21:34
parasti jaalto: not much info in the docs about it, but it's simple: one line per commit, "$commit $parent1 $parent2 ..."21:34
charon bobthecow: or take other steps to fix the rebasing. see the section "recovering from upstream rebase" in man git-rebase. the situation is pretty much the same, except that you can't really blame the upstream, as git-svn has no choice but to rebase21:35
Gitbot bobthecow: the git-rebase manpage can be found at http://git.or.cz/man/git-rebase21:35
bobthecow charon: thx :)21:35
Niamor joined21:36
Weaselweb left21:37
drizzd left21:39
jaalto parasti: Would you have any examples?21:39
parasti: I'm not sure if I understand that "commit parent1 parent2"21:41
ashleyw joined21:42
parasti jaalto: each commit can have 0 or more parents, have a look at "git log --pretty=raw" output21:42
_Vi joined21:42
alexis__ joined21:42
parasti jaalto: so, for example, you'd see that $parent1 is a parent of $commit21:42
jaalto: if you added a line in .git/info/grafts that said "$commit $parent2", that would override the actual parent info21:43
jaalto: and the log output would reflect that21:43
dreiss joined21:43
esparkman left21:44
allan_wind left21:45
parasti jaalto: usually there's just one commit in a repo that has 0 parents, the root commit (first commit in the repo)21:45
bywe left21:45
melvinram left21:46
parasti jaalto: after fetching your converted-from-CVS repo, you'll have two root commits21:46
ryates left21:46
mucuqi joined21:46
nick_h[litage] joined21:47
parasti jaalto: so you'll want to connect the first root commit which was already in the repo, to the appropriate commit from the fetched repo21:47
rovalent joined21:47
jaalto listening parasti21:48
bobthecow I'm starting to think having a git repo stacked on top of an svn checkout would be a whole lot less hassle than git-svn :-/21:48
skeeziks joined21:48
Radtoo bobthecow: uh... what?21:48
bobthecow Radtoo: just hating on the rebase right now.21:49
skeeziks How can I list *all* the branches in a remote git repository, not just the ones that I'm tracking?21:49
parasti jaalto: but do note that grafts are meant for temporary such "reparenting". as I said, you'll want to use git filter-branch to rewrite the commit objects and make the connection permanent21:50
jaalto parasti: I think I now understood the principle. So I have manually create the .git/info/grafts. It still has remove fetch for the "old". What's the next step to unify these two as single git repo?21:50
melvinram joined21:50
felipec joined21:50
jast skeeziks: all branches you've fetched? git branch -r21:50
Grum jaalto: filter-branch iirc; scary stuff =)21:50
jaalto parasti: You were faster. Okay, so I filter-branch everything to new location and that unifies all.21:50
parasti jaalto: first, check git log to see if the grafts work21:51
Circuitsoft left21:51
Radtoo bobthecow: Rebase works fine and without bad caveats if there's only the central repository you commit against and you don't touch the part that's represented in SVN already.21:51
skeeziks jast: Sorry, perhaps tracking wasn't the right term. I'd like to get a list of the branches I haven't fetched - is that possible?21:51
jaalto parasti: clear.21:51
jast skeeziks: please see man git-ls-remote21:51
Gitbot skeeziks: the git-ls-remote manpage can be found at http://git.or.cz/man/git-ls-remote21:51
ph^ left21:51
Radtoo bobthecow: That's not very hard to do though... so perhaps you're not using it right yet?21:52
qrush|away skeeziks: git remote show <remote> ?21:52
skeeziks jast: Aaaaaah! Thanks. I've been searching and haven't run across that yet.21:52
qrush|away: No, that just shows what I'm tracking I think.21:52
jast git remote show is slightly friendlier and does the same thing21:53
Bombela joined21:53
AlexanderS joined21:53
qrush|away git ls-remote --heads origin21:53
parasti jaalto: oh, that's right, using git filter-branch on a published history is a really bad idea21:53
qrush|away that should do it for branches right?21:53
berniyh left21:53
qrush|away this smells like a good tip :)21:53
jast git remote show calls ls-remote21:53
skeeziks jast: Perfect, thanks!21:54
bobthecow Radtoo: "don't touch the part thats represented in SVN already" ?21:54
parasti jaalto: I always forget about "minor details" like that because I'm mostly using git-svn :P21:54
plediii left21:55
jaalto parasti: opps. I have already published the new devel repo. So I cannot merge it with old?21:55
qrush|away jast: is there a way to untrack a branch?21:55
jast depends on what you mean by tracking21:56
Radtoo bobthecow: Yes... basically your local branch that you will push against SVN and pull from has to be arranged nicely from revision 0 to svn trunk - and then your own commits on top of svn trunk.21:56
jast if you mean the thing branch --track sets up, just edit the config file21:56
alexis__ remove the remote in your config file21:56
jast it'll have a [branch "foo"] section. remove it; done.21:57
Radtoo bobthecow: You never perform any actions against that branch that would mess up that order (rebase it against something else than SVN and all that...) and you'll not have much trouble.21:57
qrush|away Alright, so I'm definitely not tracking some branches yet they're showing in git remote show21:57
so it really just checks ls-remote21:57
markelikalderon left21:57
jast yes, as mentioned in the manual :)21:57
manpage, actually21:58
bobthecow Radtoo: but i need to push changes from another git repo into SVN.21:58
qrush|away I just want to make sure what i'm going to write is accurate :)21:58
berniyh joined21:58
parasti jaalto: I think you can keep the graft around and it won't hurt, but filter-branch will overwrite all the commits, causing a lot of pain for anyone who's based any work on your published commits21:58
Radtoo bobthecow: one possible workflow is to NOT touch the svn branch at all, and work on another branch. Then right before you want to commit something on SVN, update the svn branch (rebase it) and merge the other branch on top of the svn branch. Then push.21:58
bobthecow: (well, dcommit in svn's case)21:59
bobthecow: You loose changes that happened "in between" with that of course, but there's not going to be any crazy conflicts that happened because of reordered commits in the other git repos22:00
bobthecow Radtoo: right. i don't care about "in between" that much.22:00
Radtoo bobthecow: Well, then the above workflow should work. probably.22:00
bobthecow Radtoo: and i have an svn branch that i'm not making any changes on.22:00
parasti jaalto: you can read more about problems with rewriting published history in man git-rebase (section "RECOVERING FROM UPSTREAM REBASE")22:00
Gitbot jaalto: the git-rebase manpage can be found at http://git.or.cz/man/git-rebase22:00
bobthecow Radtoo: the problem is that every time i merge the other branch into the svn branch, it tries to apply *all* previous changes to svn on the next dcommit.22:01
crowbar joined22:01
crowbar left22:02
jaalto parasti: Would you suggest that it would be better to 1) git remote add URL old 2) fetch old 3) push that branch to server (for other to see) 4) document the use of grafs and live with it22:02
bobthecow Radtoo: if i do a merge with --squash seems to work fine. it's just when it does ff that it breaks.22:02
Tv joined22:03
msanchez joined22:04
Radtoo bobthecow: ... I don't exactly get that problem. You mean this happens when you merge on a svn branch that hasn't been rebased right before the merge, or always?22:04
hagabaka left22:06
elyezer left22:06
parasti jaalto: I'd go with keeping a separate repo project-old.git and grafts (I actually did something similar with the converted-from-tarballs repo, which is why I never used filter-branch either)22:07
jaalto prasti: okay, thanks for the insight22:07
hagabaka joined22:07
cannonball left22:08
Radtoo bobthecow: Because what the svn-tracking branch really should have after the merge is one single additional commit on top of whatever is on the server. And you just like, commit that to the svn server.22:08
a-priori left22:09
a-priori joined22:09
r0bby joined22:09
bobthecow Radtoo: that's what it does if i use --squash. but if i let it do an FF merge, it tries to commit everything since the initial svn checkout.22:09
Ryback_ left22:10
sporkmonger left22:11
bobthecow Radtoo: hmm. i just merged an identical working copy with my svn branch and it did a recursive merge instead of fast forward, and it looks like it created an empty changeset to push to SVN.22:11
ThaDon joined22:11
Radtoo bobthecow: seems all right?22:12
dwave left22:12
bobthecow Radtoo: I thought so. then i did svn rebase and it tried to rewind head and replay a bunch of awesome all over the top of it.22:13
Radtoo bobthecow: but thats what it should do...22:14
edwardam|Lnchedwardam22:14
plediii joined22:14
Radtoo bobthecow: I think you merged somewhere in the middle instead of on top of HEAD or something.22:14
bobthecow: Would make sense if you used --squash and thus didn't move the HEAD...22:16
felipec left22:16
bobthecow Radtoo: right. is there a way to fix that?22:16
robinr joined22:16
kate21de joined22:17
Radtoo bobthecow: I'd fix it like this: Make sure you got the history and most recent commit in your other, non svn-tracking branch. Then hard-reset the svn branch by as many commits as it takes for it to rebase without interaction.22:17
bobthecow: That way you'll be properly "mirroring" the svn repos again, without any altered history (or at least none that matters anymore).22:18
plediii left22:18
qrush|away left22:19
qrush joined22:19
kate21de left22:19
Radtoo bobthecow: Perhaps it won't be unwise to use checkout on the branch just to make very sure it points to head after rebasing. (I can't remember if it always does). And then you can merge. :)22:20
charon where on earth does the libgit2 discussion hide out? shawn only seems to host the api docs, even the repo is gone from his site. google isn't very helpful, or i'm doing it wrong. there's no readme in the repo either.22:22
LiamH left22:22
orlandov joined22:22
Radtoo bobthecow: The dcommit then really should be like, one revision committed, nothing else to report... (unless someone else committed something in the meantime but then the auto-merge / manual merge cycle just happens once or as many commits as are needed, not the insanity of possibly replaying half of the repository's history under the fun assumption that the revision in the middle was different)22:22
cemerick left22:23
Hydrogen joined22:24
bobthecow Radtoo: okay. I've rebased it, it says my svn branch is up to date. I merged in my working branch (which is actually identical to the svn branch) and it created a recursive merge, which appears to be empty.22:25
Radtoo: dcommitted that and got 'No changes between current HEAD and refs/remotes/git-svn'22:26
dmlloyd_ joined22:26
bobthecow Radtoo: that's a good thing, yeah?22:26
jrmuizel left22:26
Radtoo bobthecow: Perfect. Now as long as you keep it in sync with svn prior to merging its gonna be easy.22:26
bobthecow Radtoo: so the process is... changes in working branch > head over to svn branch > svn rebase > merge in working branch > svn dcommit?22:27
plediii joined22:28
Grum is there an easy way to recognize a completely empty commit? (no permission/data/whatever changes at all?)22:28
thiago_home the tree is still the same22:29
git commit refuses to commit like that, but you can create them with other tools22:29
Radtoo bobthecow: Well, I merge things on top of the SVN instead of the working branch but I think it matters not. :)22:29
Grum yeah git svn created them22:29
Radtoo bobthecow: Might actually be better as you say it... otherwise you could forget to get the changes from svn into your working branch22:29
bobthecow Radtoo: so what happens when svn changes, and i need to get things back? right. that's what i was asking.22:29
Grum so thiago_home: i should diff the git ls-tree $commit vs git ls-tree $commit^ ?22:30
Radtoo bobthecow: Yep. Its very likely better. :)22:30
maelcum|konv !time22:30
kate21de joined22:30
eddyp joined22:30
antirobotrobot joined22:32
joshdavey left22:32
antirobotrobot how can i have git-archive include submodules?22:32
Radtoo bobthecow: Well, I think you got both what happened and why it happened, right? :)22:32
bobthecow Radtoo: i sure hope so. If I didn't, I22:33
'll be back :)22:33
charon Grum: there's diff-tree that does that for you22:33
Grum ok; so if that output is nothing i can safely assume the commit is completely not needed?22:34
Radtoo bobthecow: Sure. Glad to have helped, have fun with git.22:34
Bombela left22:34
Grum i'm trying to find out if i can safely purge a branch (for some reason i got a bunch of them without any changes)22:34
lolage joined22:34
bobthecow Radtoo: Thanks for all the help.22:35
Radtoo: now how do I keep it from making SVN commit messages like 'Merge commit 'origin/master'' ?22:37
charon Grum: yes22:38
Grum charon: thanks; also what is the best way to rename a branch without leaving a trace of me doing so?22:38
charon Grum: though you may not want to drop a merge even if it is the same as all its parents :)22:38
Grum moving it in .git/refs ?22:38
Radtoo bobthecow: well, you can specify a message when merging (-m or something, or perahaps you can leave it uncommited and just specify a commit message) OR use git rebase --interactive HEAD~1 to rewrite the last commit :P22:38
Grum charon: its mostly for branches that are just useless22:38
the svn import created a bunch of them and they are just empty commits22:39
Radtoo bobthecow: Oh and of course git commit --amend...22:39
Grum so i'm going to loop over all branches; see where they came from and then check if there is just 1 commit and if that one commit contains no data .. *purge*22:39
i only get one chance to clean it up properly .. at the migration itself ;)22:40
charon Grum: why would you want to move them with no trace? ... i think you'll have to trash the reflog as the old entries are bound to contain some hints of the old name22:40
dmlloyd left22:41
Grum mmm22:41
dmlloyd_dmlloyd22:41
RaySl left22:42
Grum hmm so i should just rename them using git branch? (i was planning to move all the refs/remote/xxx)22:42
msanchez left22:43
kapone left22:43
Grum they should be renamed to refs/heads/xxx right? (in order to appear as 'normally created branches)22:43
charon if you're not afraid of trashing any existing refs/heads/*, saying 'git fetch . refs/remotes/*:refs/heads/*' will do that in one go22:44
well, not rename but copy.22:44
Grum ok but then i still need to git branch -D -r for every remote/x right?22:45
drewr left22:45
faithfulgeek left22:45
Grum mmm i have to loop over them individually to inspect them (to see if they arent empty and thus worthy of saving) so i might as well just rename them22:46
charon i'm not even sure it lets you rename across hierarchies. but in any case you'll have to delete them individually unless you resort to 'rm .git/refs/remotes/*'22:47
(and similarly for the logs)22:47
Grum lets try ^^22:48
johan-s joined22:48
orlandov_ joined22:49
Grum error: refname refs/heads/remotes/$BRANCH not found ... hmmm22:49
ashleyw left22:50
nick_h[litage] left22:54
bdimcheff joined22:54
a-priori left22:54
cnu left22:55
Grum oi that wasn't planned; it seems there are packed-refs as well22:55
dmlloyd left22:56
charon man git-update-ref22:57
Gitbot charon: the git-update-ref manpage can be found at http://git.or.cz/man/git-update-ref22:57
charon note that the first argument must be the full ref name, usually starting with refs/22:57
Grum that works for both packed and unpacked refs i presume?22:58
charon yes22:58
Grum and for the logs?22:58
SRabbelier Is there a way to list all files that were modified since a certain time?22:59
sporkmonger joined22:59
charon Grum: deleting also deletes the reflog22:59
SLiMIT joined23:00
charon SRabbelier: maybe git diff --name-only $(git rev-list --first-parent --before=yesterday -1 HEAD) HEAD23:01
boto left23:01
krh left23:01
Modius left23:01
charon though "since <time>" generally isn't very well defined23:02
maelcum|konv left23:02
dmlloyd joined23:02
SRabbelier charon: awesome, that seems to work :)23:02
Modius joined23:02
cmarcelo left23:04
moore_ left23:04
moore_ joined23:05
peritus left23:06
Sigma left23:07
Arrowmaster left23:07
NSaibot left23:07
Arrowmaster joined23:08
SRabbelier charon: mhhh, now how do I list only the files that were created since a certain date? :d23:08
charon --diff-filter=A23:09
perezd88 left23:11
naeu left23:11
orlandov_ left23:12
SRabbelier charon: you are made of win :)23:13
krh joined23:13
Grum charon: for ref in $(git for-each-ref refs/remotes --format='%(refname)'); do git update-ref $(echo $ref|sed 's#remotes#heads#') $(git rev-parse $ref); done23:13
that seems to so what i meant; now to just clean up the old refs23:13
ToxicFrog joined23:17
orlandov left23:17
Hydrogen left23:18
Hydrogen joined23:19
Hydrogen left23:20
antirobotrobot left23:20
Grum and it seems i can only do that with rm -rf .git/refs/remotes .git/logs/refs/remotes -- oh well .. starting to look nice now ;)23:22
schierbeck left23:22
a-priori joined23:23
alexis__ hi guy, I'd like to know how to do a "push --mirror" from a non-bare repo to another without having to create a local refs per remote branches?23:23
pointlessjon left23:24
ProperNoun left23:24
PuffTheMagic left23:26
PuffTheMagic joined23:26
loincloth left23:27
loincloth joined23:28
ashleyw joined23:30
barjunk left23:32
a-priori left23:32
earcar left23:33
bobthecow left23:34
cnk joined23:34
cnk left23:34
ProperNoun joined23:34
charon Grum: well, update-ref can also delete23:34
orlandov joined23:35
Grum mmm how?23:38
ciskje joined23:39
kate21de left23:39
edwardam left23:39
kate21de joined23:39
kate21de left23:43
sporkmonger left23:43
nothinghappens left23:43
charon Grum: update-ref -d refs/foo23:44
dsal left23:44
welly left23:45
davik joined23:46
TheRealKerni left23:46
charon left23:47
loincloth left23:47
welly joined23:47
patrikf left23:48
jboyens left23:49
orlandov left23:49
rovalent left23:50
krh left23:51
dwmw2dwmw2_gone23:54
levifig left23:54
moore__ joined23:55
EmilMedve left23:56
moore_ left23:56
chris2 left23:58

Logs Search ←Prev date Next date→ Channels Documentation