IRCloggy #git 2008-05-04

Logs Search ←Prev date Next date→ Channels Documentation

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

2008-05-04

cousin_it joined00:01
dadark left00:02
eternaleye joined00:04
ehamberg left00:07
charon left00:07
maier left00:08
nud left00:10
clsdaniel joined00:13
tcoppi left00:15
ehamberg joined00:15
ehamberg left00:16
ehamberg joined00:17
tcoppi joined00:18
peeja left00:18
brosner left00:19
maier joined00:22
maier left00:29
peeja joined00:33
cousin_it left00:34
a-priori left00:35
peeja left00:35
peeja joined00:37
a-priori joined00:37
Jerdent left00:43
bradleyjames joined00:48
cliffstah left00:54
kipras left00:54
bradleyjames is there a way to configure a git repository to say that the initial branch should be named something other than 'master'?00:54
kipras joined00:54
vmiklos just edit .git/HEAD before the first commit00:56
a-priori left00:56
bradleyjames k, i'll try that. thanks.00:57
peeja left00:57
a-priori_ joined01:01
a-priori_ left01:14
ebel left01:14
kanru left01:14
ctennis joined01:14
ctennis join #cisco01:14
markkalderon left01:21
kipras left01:23
paulproteus I accidentally made some changes on top of the latest version of some git code, but I really would rather have made changes on top of a different branch that's a few weeks behind the current master.01:24
git-rebase seems to only want to forward-port changes, not backport them.01:24
Is there a way to use it to backport changes instead?01:25
Or to otherwise backport changes instead of forward-porting them?01:26
RandalSchwartz cherry pick it01:26
how many commits are you talking about01:27
paulproteus Guess I'll read up on cherry picking.01:27
RandalSchwartz git checkout old other branch01:27
wait let me try that again01:27
git checkout oldbranch01:27
git cherry-pick otherbranch01:28
that'll pick the top commit from otherbranch and apply it to your current branch01:28
if you have more than one, apply them oldest to newest:01:29
git cherry-pick otherbranch~201:29
git cherry-pick otherbranch~101:29
git cherry-pick otherbranch01:29
although - rebase shoudl actually let you do that01:30
paulproteus I'm using a git-svn mirror, so it's possible there's fruity things going on with branch history here.01:30
RandalSchwartz git rebase otherbrnach~2 otherbranch --onto oldbranch01:30
RandalSchwartz averts his eyes upon seeing the deadly "git-svn"01:30
RandalSchwartz runs away screaming01:30
pygi left01:34
paulproteus RandalSchwartz, Thanks, now I see how git-cherry-pick works. (-:01:35
RandalSchwartz cool01:37
a-priori joined01:39
a-priori left01:43
schacon_ left01:45
strangy left01:48
bradleyjames left01:50
jacqui joined01:52
destruct1 joined01:52
jacqui left01:53
[tla] left01:53
jacqui joined01:53
dysinger joined01:57
schacon joined01:58
KiWiB0RG left02:00
destruct left02:03
elkmoose joined02:13
brazilian joined02:23
johnw joined02:27
samgranieri joined02:30
jacqui left02:31
schacon left02:33
harinath joined02:36
samgranieri left02:38
BabelO left02:39
leachim6 joined02:42
elkmoose left02:42
leachim6 Where can I get the ruby bindings for git ?02:42
nkallen joined02:43
Eridius leachim6: http://github.com/mojombo/grit/tree/master02:43
leachim6 lovely...02:44
thank you02:44
johnw left02:44
johnw joined02:44
johnw left02:44
leachim6 wow ... how any trees does mojombo have on github ... well I guess he's allowed to have as many as he wants :)02:44
johnw joined02:44
leachim6 how do I set my name and email ... I forget ... git-config what02:46
brazilian left02:47
Ramune left02:47
loops git config --global user.email "you@where.com" ; git config --global user.name "Your Name"02:47
jbunster left02:48
jbunster joined02:48
leachim6 thanks02:49
warthog9 left02:53
Ramune joined02:53
csc` joined03:13
csc` left03:17
csc` joined03:17
warthog9 joined03:18
ironfroggy joined03:19
ggeecko_ left03:20
ggeecko_ joined03:20
ggeecko left03:20
ironfroggy left03:20
ggeecko joined03:20
agib joined03:22
a-priori joined03:23
kukks left03:31
a-priori left03:45
Ademan_ left03:52
Ademan_ joined03:53
ironfroggy joined03:54
tjafk2 joined04:14
WALoeIII joined04:18
madewokherd left04:20
WALoeIII left04:23
johnw left04:24
tjafk1 left04:30
PerlJam left04:34
brazilian joined04:51
dysinger left04:58
Jerdent joined05:04
ajonat joined05:09
Jerdent left05:13
angasule_ joined05:14
WALoeIII joined05:24
wagle_home joined05:24
angasule left05:31
pygi joined05:41
Sho_ left05:51
ajonat left05:53
ajonat joined05:53
bobesponja left06:05
xjunior joined06:05
xjunior I''m starting to use git now, and I made my first commit (commit; push). but I had a problem: the new files were sent to the remote server, but the files that I modified weren't sent to central repository.... what did I do wrong?06:06
zdennis left06:06
zdennis joined06:06
Pieter what is a central repository?06:07
xjunior Pieter: hum... ahh... I think I said something wrong... well... I'm using github06:08
Pieter: oh, I think that I know where I missed....06:12
I need to "add" every file I'll commit06:12
WildPikachu yey06:18
my repo is imported!06:18
9hrs :(06:18
WALoeIII left06:18
Eridius xjunior: you can also use `git add -u` to add all modified files (but not new files)06:21
and `git add .` to add everything in the current directory06:21
morphir joined06:21
xjunior Eridius: current recursively?06:22
brosner joined06:24
Eridius xjunior: of course06:24
xjunior Eridius: hum.. good :D thanks!06:24
bye!06:24
Eridius bye06:24
ph^ joined06:29
xjunior left06:30
ph^ left06:44
ajonat left06:45
ajonat joined06:45
ajonat left06:45
ajonat joined06:47
ph^ joined06:48
ajonat left06:48
janm joined06:50
ajonat joined06:54
ph^ left07:01
aLone joined07:02
ph^ joined07:03
johnw joined07:07
Jerdent joined07:09
Jerdent left07:11
statim left07:14
unreal left07:14
unreal joined07:15
dsaxena left07:20
deavid joined07:26
kmag joined07:27
kmag Ilari: it turns out that the problem was Fink's ancient version of git.07:28
Thanks for your help everyone.07:28
kmag left07:30
Sho_ joined07:32
rofrol joined07:33
rofrol left07:33
csc` left07:47
dadark_ Hey folks07:49
kmap left07:49
dadark_ How would you move out stuff from an existing repo into a submodule?07:49
Is that even possible without losing all commit information etc?07:49
devogon joined07:50
ironfroggy left07:55
ph^ left07:55
ph^ joined07:58
sverrej left08:00
statim joined08:01
Ilari dadark_: Use split/filter-branch (split is not standard) to get the history, remove from newest version and put submodule in its place?08:01
charon joined08:01
WildPikachu ok ... now, time to port our scripts to git08:02
Ilari, my import worked :)08:02
dadark_ Sorry, I'm quite new to git, Ilari ;)08:02
warthog9 left08:03
dadark_ Ilari: Would you mind, only if you have some secs, explaining me how that filter-branch works? I have the docs, but I don't understand that much, yet08:05
Ilari WildPikachu: It tends to be that for any git subcommand, it is either scripting-grade, or it was once/is still some sort of script (usually shell or perl)...08:05
WildPikachu i love perl :)08:05
easiest to do what i want to in this case08:05
just need to get 3 functions ported to git and i should be back on track08:06
sverrej joined08:07
sverrej left08:07
Ilari dadark_: Basically, make a clone of the repository, then create new branches on clone that only contain the submodule (--subdirectory-filter).08:07
Zycon_ left08:07
dadark_ Ah, cool08:07
Will check that out, thanks08:07
sverrej joined08:10
brazilian left08:13
kumbayo joined08:17
cliffstah joined08:17
thiago_home joined08:24
ph^_ joined08:26
warthog9 joined08:31
Pieter what is a central repository?08:33
oh08:33
scrap that08:33
rraasch joined08:36
ph^ left08:41
johnw left08:52
ajonat left08:53
igorgue left08:56
ph^_ left09:09
ph^ joined09:12
kmap joined09:17
nkallen left09:17
vbgunz joined09:25
rraasch left09:26
fhobia left09:28
kipras joined09:39
ajonat joined09:44
stillLotR joined09:50
ph^ left09:52
ph^ joined09:54
ShKodRanI joined09:56
prl789 joined10:01
ph^_ joined10:03
ph^_ left10:03
Eludias joined10:04
ph^_ joined10:04
LotR left10:07
ph^ left10:19
dadark_ I love git! ;)10:22
I really does everything right that I hated svn for10:22
cliffstah lol, welcome to the revolution =P10:24
dadark_ Hah10:26
prl789 I'm converting some svn repos to git... have a Q about branches. I do git-svn init file:///Users/phil/devel/gitted/ezor/ --no-metadata -T trunk -b branches -t tags from inside my new git dir, but all the branches are visible only with git branch -a because they are "remote". And after I git clone that new git dir to "remove svn cruft" the branches seem to be entirely gone. How can I migrate an svn repo including all its branches?10:32
Fullmoon left10:33
Ramune prl789: check those branches out via "git checkout -b localname remotebranch"10:33
prl789 Ramune: ok, thank you10:33
Ilari prl789: 'git branch foo foo' for each of them would probably be faster.10:34
loops prl789, when you clone Git copies all of the branches and sets them up as remote tracking branches (rather than local branches), git branch -r should list them all for ya10:34
Ilari Since new branch creation means creating and writing two small files, where checkout with branch create updates/creates four + all working tree files to modify.10:36
alb joined10:37
prl789 all: so that means I first need to 'git branch foo foo' or "git checkout -b localname remotebranch" from within the first git repo I make from svn, and then also do the same thing again to re-local the branches from the 2nd git repo I clone from the 1st (the 2nd repo clone is to "remove svn cruft). Correct?10:39
thijso joined10:39
Vanduror joined10:40
Ilari prl789: Or maybe make bare repo and push all the stuff there?10:40
loops prl789, it sounds like you are happy with the results of your initial repo, where you have imported from svn. There's probably nothing to do there10:42
reaVer left10:42
johan-s left10:42
chris2 joined10:42
loops prl789, the issue with your branches not showing up when you clone that repo, is a standard Git feature10:42
prl789, when you clone with Git, it will appear to only clone one branch, unless you do "git branch -r" to see that in fact all your branches were cloned, and put under the origin/* namespace rather than being setup as local branches10:43
prl789 loops: right, I was just reading about that at: http://lwn.net/Articles/222086/. but since this is to be the canonical repo (er, the only repo) I thought it should have all branches local10:43
_graham_ joined10:44
loops prl789, well you can do that.. by following Ilari or Ramune's advice on creating a local branch for each remote.. (you might also look at the --mirror option to clone instead)10:45
Ilari prl789: 'canonical repo' probably should not have working tree, as repos with working trees should not be fetched from or pushed to unless one is aware of the pitfalls involved.10:45
trochala joined10:45
loops prl789, hmm.. maybe clone doesn't have --mirror after all, you may have to resort to "git init; git remote add" .. to get mirror feature.. odd10:47
dadark_ Hum, what happens when I change stuff in a submodule in the parent repo? Can I commit it just like it was the working directory?10:47
Hope you get that, dunno how to explain10:47
prl789 Ilari: sounds like I've got more googling to do.10:47
all: thanks for the info, I'll keep this window open and go play some more.10:48
Ilari prl789: Nah. Just make the canonical repo to be without working tree.10:48
loops Ilari, to be fair to prl789 that's kinda a separate issue from what he was originally asking about, ie. trying to understand where his branches were going etc..10:49
Ilari prl789: 'git --bare init' (note: NOT, 'git init --bare' or 'git-init --bare'). And if init-db is mentioned in some tutorial, that tutorial is virtually certainly obsolete.10:50
prl789: (well, aside of mentioning that it is obsolete and one should use init instead).10:50
loops dadark_, nothing happens in the parent until you manually commit the changes.10:50
dadark_ Okay, see.. Can I commit changes to a submodule from the repo where is is included at all?10:51
loops dadark_, no, you need to make the commit in the submodule first, then you can commit the parent repo.10:52
dadark_ Okay, but it's kept there as a separate repository, that was what I wanted to know10:54
Cool10:54
Loving git more and more10:54
albertito left10:54
prl789 Ilari: actually I was kind of excited about having a working tree in the same place as my repo, unlike svn where I had the repo in one place and then my working copy elsewhere. Since I'm the only dev on the projects I'm playing with this morning it seemed cleaner. But you say there are "pitfalls" involved. Would those pitfalls be associated with publishing/sharing the repo? If that's the case I wouldn;t need to worry about it unti10:54
Ilari prl789: Message cuts off: "that's the case I wouldn;t need to worry about it unti"...10:55
aLone left10:55
prl789 "If that's the case I wouldn;t need to worry about it until/if these reached a point where I put them out on a git server womewhere, in which case I would then of course have my working tree seperate."10:55
Ilari prl789: In pushing to that repo, there's push-to-HEAD problem. In fetching, problem is lack of buffer to fix mistakes.10:56
prl789: Well, you could create the second repo with working tree as follows: 'git init', 'git fetch ../old-repo refs/heads/*:refs/heads/*', 'git checkout master'...10:57
prl789: That checkout might additionally need '-f'...10:58
loops prl789, As a single developer with a single repo on a single machine, there's really no reason to worry about it. It's only when you start pushing and pulling between machines where it's better to use a bare intermediary10:58
Ilari prl789: Also, have you checked that the committer/author information recorded is reasonable?11:00
prl789: And if you have used 'svn merge' in the SVN repo, merges could need fixing...11:00
prl789 oh, i just realized I had better worry about it, becasue i'm planning to cross-platform test the projs across various VMs on my box. So I will need a bare intermediary after all.11:01
Ilari prl789: 'mkdir path/to/repo.git', 'cd path/to/repo.git', 'git --bare init', 'cd path/to/svn/import', 'git remote origin path/to/repo.git', 'git push origin --all' maybe...11:03
Oops. 'git remote add origin path/to/repo.git'.11:03
ebel joined11:03
prl789 Ilari: actually, the committer/author information is problematic, I was going to ignore the difficulty, but... I succesfully migrated a very large (by my standards) project we have at work , multiple devs, etc, by using the `git config svn.authorsfile ../ubp_users.txt` command. but that same method faied to work for these little ones only I dev on. Kept saying prlfoo is not in the file.11:04
cliffstah left11:05
Ilari prl789: filter-branch can be used to create new history with different committer/author info. It's not even difficult if there is just one committer/author.11:05
prl789 Ilari: well, there were three of me ;-) but I'll give it a try.11:06
Ilari prl789: It only gets sightly more complicated when one has to look at the old value to decide what new value to use...11:07
ruphyklogger11:09
Ilari prl789: Something like "--env-filter 'unset GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL'" (assuming user.name and user.email are set).11:09
kloggerruphy11:10
prl789 all: thanks for the friendly IRC. real life intrudes, cya.11:11
prl789 left11:11
comp greetings, anyone tested git performance with 100 or more branches?11:18
as I've seen, branches (their SHA-1s) are stored line by line in a single file11:20
so I suppose it could be possible to have 100 branches without major problems11:21
Tv comp: I'd even ask, why do you expect to see trouble11:22
comp I don't know, just because "typical" work with git expect about 10-20 branches ..11:22
Mikachu usually there are more tags than branches11:23
and i don't think there's any code in git that expects any specific number of branches11:23
reaVer joined11:23
comp well ... I'll try it11:24
kipras left11:24
kipras joined11:25
Pieter comp: make sure you git-gc after creating the branches though11:26
chris2 are there code review tools that can make use of git other than review-board?11:26
comp I know11:26
Pieter: so duplicated data get compressed11:26
Pieter comp: a lot of things slow down in my repo with 5000 branches without packed refs11:27
Tv pfft 100 files isn't that much, don't really need packed-refs for that11:27
comp naah, I suppose about 300 max11:27
but thanks for the info11:27
Mikachu where are you getting these numbers from?11:28
chris2 i think there was a discussion on adding arbitrary metadata to git objects, what happened to it?11:35
Pieter some people are still against it11:35
so it's dropped11:35
chris2 okay :/11:36
Yuuhi joined11:42
strangy joined11:43
cncfanatics joined11:44
cncfanatics hello, could anyone explain to me how to remove a branch on a remote ?11:44
vmiklos git push origin :refs/heads/foo?11:44
ShKodRanI left11:45
cncfanatics nvm, found it, git branch -r -d origin/BranchName11:45
thanks nayway vmiklos :)11:45
strangy left11:48
FunkeeMonk left11:56
PerlJam joined11:57
johan-s joined11:57
reaVer left11:58
reaVer joined11:58
jast cncfanatics, in fact that only deletes the tracking branch and not the actual remote branch afaik12:02
cncfanatics :o12:02
I'd have to run git push origin :refs/heads/BranchName too then ?12:02
jast i suppose so12:03
cncfanatics okay, thanks :)12:03
fujin is there a better way to delete remote branches?12:03
I would have guessed git branch to be able to take care of it somehow12:04
Pupeno joined12:04
bentob0x joined12:05
jast git branch deals with local stuff only12:05
if anything, i think git remote should handle that12:05
cncfanatics wouldn't it be possible to add that as extra argument for git remote rm ?12:07
if a branch is supplied only delete that branch12:07
loops git remote rm doesn't do anything to the remote repository.12:08
ruphy left12:08
Pupeno how do I get rid of all current changes (and go back to the last submit)?12:08
cncfanatics revert the modified files ?12:08
loops All it does is remove local information about the remote repo12:08
Pupeno cncfanatics: yes.12:09
loops Pupeno, if you want to throw away all your local changes, and you're not worried about ever getting them back: git reset --hard but be careful it throws away all uncommitted local changes irretrievably12:09
Pupeno thanks.12:10
FunkeeMonk joined12:12
FunkeeMonk left12:13
Pupeno Is there any command to check if a repo is ok? that is, not corrupt?12:18
cncfanatics left12:20
fujin corrupt? heh - are you having issues?12:20
PerlJam left12:20
Tv Pupeno: git fsck12:20
Pupeno Tv: that gave me two dangling trees, is that ok?12:22
Tv Pupeno: nothing serious12:22
Pupeno: stuff waiting to be garbage collected12:22
Pupeno fujin: I've got some weird messages when doing git svn rebase, and my management of the repo was not the best.12:22
Tv: that was just after gcing.12:23
Tv Pupeno: it doesn't gc them until they're old enough12:23
Pupeno Oh, ok.12:24
d0k joined12:25
Pupeno Is there an easier way of getting a diff of the last change than git diff previous_hash..last_hash?12:31
Tv git show12:33
brosner left12:35
cncfanatics joined12:39
Husio left12:39
thannoy joined12:39
cncfanatics left12:39
BabelO joined12:41
WildPikachu which git command would one use to restore a deleted file?12:41
Tv did you commit it?12:42
WildPikachu nope12:42
Tv then read git status more carefully12:42
WildPikachu i'm blind ;)12:43
thanks12:43
hrmmmmmmm12:44
SuttoL joined12:52
SuttoL left12:53
z3ro_ left12:55
Lemurnomicon left12:56
cncfanatics joined12:58
cncfanatics left13:04
janm left13:19
ehamberg I'm on the branc "(no branch)" for some reason. How can I make this replace my "master" branch?13:20
shaftyy joined13:21
gcarrier left13:24
Mikachu ehamberg: one way is git branch -d master; git checkout -b master13:26
another way is git rev-parse HEAD; git checkout master; git reset --hard <paste the number from the first command here>13:28
GyrosGeier joined13:30
chris2 http://www.gnu.org/software/gnuit/ <- hehe13:34
[tla] joined13:35
dadark_dadark13:36
Mikachu they renamed?13:37
Pieter yes13:38
a while back I think13:38
knurd joined13:38
a-priori joined13:38
Pieter in february apparently13:39
aroben joined13:44
ehamberg Mikachu: Thanks!13:51
d0k left13:57
a-priori_ joined13:57
rmh3093 joined13:59
rmh3093 can someone assist me, im having a brain fart... i need to seed an empty remote repo14:00
cant remember the push command i need to make a new branch14:00
its 'git push -f origin master'14:01
right?14:01
deavid git push origin master14:01
you don't need to --force14:01
rmh3093 yeah ok.... my url must be fubar then14:02
bdiego joined14:02
shaftyy left14:02
PerlJam joined14:02
shaftyy joined14:02
aroben left14:03
zachinglis joined14:08
bentob0x why does a git-pull in an empty git repository only brings the current branch?14:09
ArteK joined14:11
Mikachu if it's an empty repo, how can there be a current branch?14:11
ph^_ph^14:11
a-priori left14:12
bentob0x I'm very confused, I want to get the current version of a full existing git repository (with branches, commits etc), work on it and pull the changes back in the source repository14:14
basically working from laptop14:14
thiago_home clone it14:14
bentob0x ah14:14
going to try this right now14:14
aroben joined14:15
doener joined14:17
aroben left14:17
aroben joined14:18
bentob0x ok, that's what I was looking for thiago_home, but it doesn't seem to have linked to the right directory14:20
on server, folder with git was: /var/www/folder, and I pulled locally in /var/www/new_folder, I expected the content of folder to be in /var/www/new_folder but it was in /var/www/new_folder/folder14:22
(I meant cloned)14:22
Pieter yes, that's how it works14:22
otherwise, user "git clone folder new_folder" from /var/www14:22
s/user/use/14:22
bentob0x so I should have typed: git clone var/www/folder .14:23
?14:23
Pieter no14:24
I don't think that works14:24
bentob0x I'll try14:24
doesn't work no14:25
Tv bentob0x: no scm i'm familiar with works the way you expected; they all like to checkout new subdirectories14:25
bentob0x: which is smart, because the potential for damage is much smaller14:26
bentob0x by damage you mean to overwrite the current git directory?14:26
Tv and files in the current dir etc14:26
bentob0x so git-pull won't overwrite anything?14:27
Tv how about i publish a repo with .bashrc that installs a backdoor on your machine, and you clone it in your ~14:27
bentob0x ah14:27
thiago_home we're talking about clone, not pull14:29
rmh3093zenbot14:29
zenbotricer414:30
ricer4ricer4bot14:31
ricer4botricer4ftw14:31
brosner joined14:32
ricer4ftwrmh309314:32
knurd hi all; just noticed that "git diff v2.6.23..v2.6.24 | diffstat | tail -n 1" and "git diff v2.6.23..v2.6.24 --shortstat" give different results (off by ten lines in fact)? is that a bug or amd I missing something here?14:34
drizzd knurd: git diffstat is smarter than diffstat, it can detect renames, for example14:35
not sure if that's the case in your example though14:35
a-priori_ left14:36
a-priori joined14:37
_graham_ left14:40
bentob0x ok now, git clone worked perfect, I did a commit locally and I would like that commit to be on the server too14:42
knurd drizzd, thx for the hint, but renames are definitely not the root for this off-by-ten, as there were a lot of renames between linux .23 and .24 with results in more then a ten-line difference (running "git diff -M" confirms this)14:42
bentob0x (sorry for my newbie questions)14:42
knurd drizzd, but yeah, maybe it's something other where git is smarter14:42
Tv different diff algorithms and settings will also make the numbers differ14:52
zachinglis_ joined14:52
zachinglis_ left14:53
kumbayo left14:53
a-priori left14:56
drizzd well, the diff algorithm is the same14:56
a-priori joined14:57
cncfanatics joined15:00
bdiego left15:07
ckknight joined15:07
ckknight hey all. What's the best way to prevent people from pushing a commit that has certain filetypes in it, e.g. .exe, .bat? (I'd actually prefer a whitelist over a blacklist)15:08
ggeecko left15:09
zachinglis left15:09
drizzd ckknight: .gitignore15:09
ggeecko_ left15:09
drizzd actually, that won't help against pushing15:09
ckknight yea, was thinking that15:09
brazilian joined15:10
ckknight basically, if someone tries to push an exe (or whatever), it should stop the push and give an error15:10
Mikachu ckknight: find a good hook in documentation/hooks.txt and write a script that detects them15:10
knurd left15:17
a-priori left15:17
a-priori joined15:17
lu_zero left15:24
ckknight I think a pre-receive hook is my best bet15:25
but I'm not sure how I'd get info on the commit in there...15:25
shaftyyy joined15:26
WildPikachu will git-rm remove the dir if there are no files in it?15:27
Mikachu ckknight: i think for each line of input, you have to loop over the git rev-list $1..$2 and check if any of the commits within contain the banned filetypes15:28
(pseudo code variable names)15:28
ckknight okay15:28
csc` joined15:29
Mikachu there are fun special cases when new branches are created though15:29
WildPikachu i wonder why my dir is being removed when it becomes empty :(15:32
doener WildPikachu: git doesn't track directories15:33
cncfanatics create an empty file in your dir WildPikachu15:33
WildPikachu so it does remove it if all files in it are gone?15:33
Mikachu it won't be created on a new checkout of the branch anyway15:33
WildPikachu ah15:34
cause i have 3 files in the dir15:34
i call rm in perl15:34
RandalSchwartz happy star wars day! may the fourth be with you!15:34
WildPikachu to remove the 3 files and WHAM dir dissapears ... which is not bad, I just want to make sure I understand this15:34
Mikachu the fourth?15:34
if it was a pun i completely missed the joke :)15:35
RandalSchwartz today is May the Fourth.15:35
"May the Force be with you"15:35
Mikachu ah15:35
RandalSchwartz but if you have to explain a joke... oh well.15:35
Mikachu i didn't think to look at the date15:35
madewokherd joined15:37
doener Mikachu, ckknight: I guess instead of iterating, you could do "git log --name-only --pretty=format: $1..$2", generates some empty line noise, but might be a bit faster15:38
ckknight I think using the update hook is better, not sure15:38
Mikachu doener: that's possible, the problem is still when 1==015:39
that is less confusing if i write it as $1=="0"15:39
doener Mikachu: hm, then "git log --name-only --pretty=format: $2 --not --branches"?15:41
or --not --all, or whatever15:41
Mikachu aha, that looks nice :)15:42
shaftyy left15:42
Mikachu i was having nightmares about looping over all local branches manually15:43
shaftyyyshaftyy15:43
doener yeah, it's neat that log (and some others) take rev-list's options :-)15:43
Mikachu even so, i didn't know you could use --not and --branches together15:44
shaftyy left15:45
shaftyy joined15:46
doener hm, yeah, the documentation is a bit unclear there, prefixing --branches with ^ makes little sense15:46
harinath left15:49
harinath joined15:50
albalbertito15:51
bentob0x left15:55
siprbaum left15:56
siprbaum joined15:56
reaVer left16:03
shaftyy left16:03
shaftyy joined16:03
kukks joined16:04
Jerdent joined16:07
brazilian_ joined16:08
aroben left16:13
angasule_angasule16:15
peeja joined16:16
niki left16:18
johntramp left16:19
johntramp joined16:19
Oejet joined16:20
brazilian left16:20
threeve joined16:20
ggeecko joined16:21
niki joined16:21
eternaleye left16:23
johan-s_ joined16:24
threeve left16:26
shaftyy left16:29
shafty joined16:29
cooloney joined16:31
eMBee good evening16:32
ggeecko_ joined16:32
ggeecko_ left16:32
KirinDav joined16:32
eMBee what exactly does git-mv do besides mv file; git add file; ?16:33
nostromo joined16:33
shaftyy joined16:33
a-priori_ joined16:34
nostromo I'm seeing a problem with git. Since last update "-C -C" gives an error about too many files to detect moves16:35
aniero eMBee: git elete oldfile16:35
eMBee: but that's really it16:35
nostromo and rebase or merge fail to follow moves correctly16:35
is it known? 1.5.5.1 here16:35
reaVer joined16:36
tobij joined16:37
KirinDav left16:37
yann left16:38
johan-s left16:38
dsaxena joined16:42
eMBee is having an argume, erm, i mean a discussion about gits support for moving files.. is there any concise writeup on that topic?16:43
aniero eMBee: git doesn't track moving files. that's it.16:44
eMBee exactly, that is the issue16:44
aniero eMBee: git doesn't track files, per se, either, it's just content16:44
eMBee: the thing is, after the fact, you can figure out that oh, this new file is the same as what was in the old file, so it's a move16:44
asdx joined16:45
aniero eMBee: at that point it's "just" a matter of computation16:45
asdxdiego16:45
aeruder and frankly it works much better that way16:45
aniero yeah, agreed16:45
aeruder git blame with -M is a beautiful thing16:45
(for example) :)16:45
aniero ooh :D16:45
eMBee is looking for an explanation as to why it is not necessary to track moves, and what features there are (like -M) to find moves late16:46
eMBee later16:46
Oejet eMBee: There is a bit in the FAQ on git.or.cz.16:46
aniero eMBee: -M and -C for detecting moved lines and copiedl ines16:46
kukks left16:46
aniero eMBee: it's not necessary to track moves because git only tracks filenames incidentally. it only really cares about contents, and if some blob (that's git's term) happens to be called one thing one day and something else another day, it doesn't matter16:47
eMBee i know that, but stating that unfortunately does not convince people who think it is important to track moves16:47
a-priori__ joined16:47
shafty left16:47
aniero eMBee: the thing about tracking content is that you can reconstruct the moves after the fact16:48
shafty joined16:48
aniero you don't hae to tell the SCM about moves anymore because of the way it stores things. that information is just there waiting to be discovered/calculated16:48
so why bother with it up front if you can discover it after the fact if you really need to?16:49
a-priori left16:49
tobij what if you edit and rename in one step, then commit?16:49
that'd be a bad idea then, right?16:49
aniero tobij: then it's a little harder to detect :p16:49
aeruder it has a similarity factor it considers when finding moves16:49
tobij: so unless you completely rewrite and move16:50
it'll still pick it up16:50
aniero if you completely rewrite it, is it really a move anyway? heh16:50
cncfanatics if you completely rewrite and move its not really a move is it ?16:50
aeruder and if you've rewritten it, then the merges will fail anyway16:50
aniero eMBee: i'm curious to hear why your friend thinks it's important to track moves16:51
aeruder tracking moves also adds all sorts of complexity to the repo itself16:51
aniero eMBee: (strictly out of curiosity, not looking to argue)16:51
eMBee i am still in the process of finding that out16:51
aeruder for example, let's say you want to get rid of a file in the history (purge it), try doing an svnadmin dump and editing out a file that gets copied/moved around16:52
the series of snapshots method of git just makes tons of stuff easier16:52
aeruder left16:53
nostromo left16:55
rofrol joined16:58
ggeecko_ joined17:03
ggeecko_ left17:03
ggeecko_ joined17:04
a-priori_ left17:04
ggeecko_ left17:04
ggeecko left17:04
shaftyy left17:05
Sigurd joined17:06
ggeecko joined17:06
nostromo joined17:07
lu_zero joined17:09
shafty left17:16
kristoffer joined17:16
jbunster left17:18
a-priori joined17:18
threeve joined17:21
brosner left17:21
WildPikachu hrmm ... the --all flag in git-commit17:24
would I use that if I add, remove, change files in a dir?17:24
or would i not use --all17:24
igorgue joined17:26
niki left17:26
schacon joined17:26
brosner joined17:29
cooloney left17:31
yann joined17:33
thiago_home left17:33
a-priori__ left17:34
reaVer left17:40
reaVer joined17:41
Ilari WildPikachu: --all means to stage current versions of all tracked files before commit actually takes place.17:41
WildPikachu: Which results behaviour like default of pretty much any other VCS (including SVN).17:42
cliffstah joined17:42
cliffstah left17:44
Ilari WildPikachu: The default is to commit currently staged files. New files need to be added in any case.17:45
cliffstah joined17:45
cliffstah left17:45
Ilari WildPikachu: If you want to experiment, replace 'commit' by 'status', and it performs dry run...17:45
cliffstah joined17:47
kukks joined17:48
cliffstah left17:48
cliffstah joined17:48
cliffstah left17:49
cliffstah joined17:49
WildPikachu aha17:50
hrmmm, lock file exists17:52
reaVer left17:53
reaVer joined17:53
malc_ joined17:54
malc_ left17:54
Ilari WildPikachu: What command?17:54
WildPikachu git-status17:55
i killed a git-commit with ctrl-c17:55
well, may of been a kill -917:55
happened because my script went mad :(17:55
safe to remove the lock file and try again?17:55
Ilari WildPikachu: Should be safe...17:55
WildPikachu cool17:56
ruphy joined17:56
bryanray For future reference you can just commit with no message and git will "cancel" the changes ... rather than kill -9'ing.17:56
WildPikachu well, my perl script went bonkers, so i ctrl-z'd it and kill %1 , then kill -9 %1 it :)17:57
omg .... i think it worked!17:57
thiago_ joined18:00
WildPikachu now, let me try and figure out how to do the rest :)18:00
brosner left18:01
thiago_thiago_home18:01
WildPikachu omg x 218:01
git-diff-tree --summary refs/heads/master refs/remotes/origin/master18:02
just what i wanted!18:02
not sure how right that is, but it looks really cool18:02
ggeecko left18:02
cncfanatics compares the local & remote versions ? :o18:02
WildPikachu yep18:03
Mikachu is there any advantage over git diff --summary refs/heads/master refs/remotes/origin/master ?18:03
doener WildPikachu: git diff --summary master origin/master -- that's a bit more readable18:03
Mikachu it's fun to throw in -C too18:03
hm, why this syntax difference?18:04
WildPikachu oooooo18:04
Mikachu rename {obt => openbox}/mainloop.c (75%)18:04
rename obt/keyboard.c => openbox/modkeys.c (64%)18:04
doener WildPikachu: "... origin/master master" is more common for me though. or rather even "origin/master...master"18:04
WildPikachu drules18:04
Mikachu doener: uh, does ... mean anything with empty sides?18:05
doener Mikachu: hm? what do you mean? like origin/master...?18:05
Mikachu doener: you wrote "... origin/master master"18:06
WildPikachu now i need to see how i can push only a specific changeset18:06
doener Mikachu: ah, in that case, the ... meant to replace the "git diff --summary" part18:06
Mikachu ah18:06
doener too lazy to type :-/18:06
Mikachu: the syntax difference just makes it more visible that in one case, you moved a file from directory A to B, while in the other case, you also renamed the file along the way18:07
madewokherd left18:07
Mikachu oh right, i didn't even notice the filename changed18:07
Ilari Isn't diff-tree output more suitable for scripting than diff output?18:08
doener at least that's how I always read it, and it was even useful a few times18:08
WildPikachu ok ... for now ... git-push without args will work for me18:10
fhobia joined18:10
WildPikachu oh man this is sooooo cool!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!18:10
doener Ilari: does that make a difference with --summary? But yeah, you shouldn't parse porcelain anyway, so diff-tree it is for scripts18:11
madewokherd joined18:12
xenoterracide if one does a remote fetch and then needs to merge the remote branch (origin/master) into local master. how do you do it?18:15
Ilari xenoterracide: 'git merge <branch-to-merge>'?18:15
ggeecko joined18:16
ggeecko_ joined18:16
xenoterracide k18:17
still trying to understand what the purpose of rebase is18:17
lu_zero left18:18
deavid xenoterracide: rebase is for rewriting some changes on top of other ones; for example, if you are doing some kind of patch and the provider released a newer version of the code18:18
coderdad_ joined18:19
johnw joined18:19
WildPikachu hrmmm deavid18:19
so its like svn up ?18:19
deavid I don't know what svn up does18:19
WildPikachu thinks ...18:20
WildPikachu xenoterracide, http://eagain.net/articles/git-for-computer-scientists/18:20
johnw it's svn up = git fetch + git reset --soft HEAD18:20
s/it's/isn't18:20
mahmoud2 joined18:21
johnw (with no local checkins on master, of course)18:21
WildPikachu whats the diff between git-fetch and git-pull?18:21
johnw git-fetch doesn't change your local HEAD18:21
WildPikachu ah18:21
johnw git-pull will merge your local changes with the remote if necessary18:21
WildPikachu how would you update HEAD if you use git-fetch?18:21
deavid with fetch + merge18:21
johnw yep18:22
deavid fetch + merge ~= pull18:22
xenoterracide WildPikachu: thanks will look at it in a bit18:22
WildPikachu just plain git-merge with no args?18:22
johnw git-merge master18:22
WildPikachu aha!18:22
johnw um, git-merge origin/master18:22
WildPikachu sorry for all my q's :)18:22
my eyes are as wide as saucers18:22
doener or "git merge FETCH_HEAD", depends18:23
johnw you could also git-rebase at this point, since you haven't published your commits, if you wished to18:23
WildPikachu: check out http://newartisans.com/blog_files/git.from.bottom.up.php18:23
it doesn't talk about fetch, but it does talk about merge and such18:24
WildPikachu i'm still trying to understand under exactly what scenario i'd use rebase :)18:24
zdennis left18:24
etnt joined18:24
johnw rebase transplants commits18:24
WildPikachu so say i commit a change to foobar18:24
johnw it cuts them off the common ancestor, and moves them to another base commit18:24
WildPikachu aha18:25
so it moves the patch along to a new base18:25
johnw yep18:25
patch or patches18:25
git-rebase -i can also edit patch history18:25
but it rewrites commits, so this is for local only18:25
WildPikachu so i guess if the same thing is changed in the remote repo, and i rebase .... the diff won't show anything?18:25
johnw yes, and the commit is dropped18:25
I always rebase in local branches, and merge in remote ones18:26
niki joined18:26
WildPikachu now ... i've made some changes to my "master" I have a few commit ID's ... how do I merge them into a branch v4.0.x?18:30
WildPikachu reads18:30
nkallen joined18:31
johnw checkout v4.0.x and then "git merge master"18:33
or git merge origin/master, if you haven't actually updated your local master yet18:33
WildPikachu do I need to checkout v4.0.x?18:36
johnw yes18:36
you need a working tree available for merge conflicts to be placed into18:36
WildPikachu cool ... i have 2 boxes, one with master checked out, other with v4.0.x checked out :)18:36
johnw local clones are extremely cheap18:36
if you can't afford to checkout something, just "git clone -l DIR NEWDIR" and then checkout there18:37
WildPikachu ah, hardlinks18:37
is there a way to merge in a specific set of files from master into v4.0.x?18:37
i guess i just specify them at the end of the command18:38
johnw no, because a merge must result in a new commit based on two or more existing ones18:38
to merge "only some files" will result in deleting the changes to all the other files18:38
WildPikachu hrmmm18:38
johnw you *can* git-cherry-pick to pull out a commit, then just use git checkout to wipe out changes to other files18:38
schacon left18:38
WildPikachu can I specify the commit id to merge in?18:38
johnw git merge COMMIT18:39
git cherry-pick COMMIT18:39
git rebase COMMIT18:39
WildPikachu aha18:39
all 3?18:39
johnw those are your three options, each results in a different parent18:39
WildPikachu ah!18:39
johnw merge parent = COMMIT + old parent18:39
cherry-pick parent = old parent18:39
rebase parent = COMMIT18:39
WildPikachu and all 3 would only only pull in that commit id?18:40
johnw when you say "only pull in that commit id", I get nervous18:40
it would change your current branch based on the content tree represented by COMMIT18:41
WildPikachu see ... i made changes to 3 files, which were in one commit to my master18:41
i want to now merge that into my stable18:41
johnw use git merge18:41
WildPikachu argh, my v4.0.x branch18:41
cool, just making sure :)18:41
johnw git merge preserves the most history, at the cost of making it non-linear18:41
cliffstah left18:41
cliffstah joined18:41
WildPikachu non-linear?18:42
johnw yes, let's say I had a master with X Y Z in it (commit names)18:42
and a branch with A B C18:42
and that I had merged every time either one changed18:42
then my local branch would be A A+X B B+Y C C+Z18:42
(and it is now based on the new Z)18:43
if I'd rebased, my local branch would always be A + B + C18:43
it's just the parent commit of A that would be changing18:43
mahmoud2 left18:43
johnw (well, technically speaking A B C keep changing too, but that fact isn't adding new commits to the history)18:44
eternaleye joined18:44
johnw read that link I posted, it explains this difference in detail18:44
WildPikachu hrmmmmm18:44
cool18:44
mahmoud2 joined18:44
johnw if you always use git-merge, then you are on a par with svn18:45
dysinger joined18:45
doener johnw: technically speaking A, B and C don't change. You get _new_ commits A', B' and C'18:45
Ilari WildPikachu: Commit can have up to 16 (well, actually it could have even more) commits listed as its precessors...18:45
doener the old A, B and C will still be around18:45
Beket joined18:46
johnw doener: yeah, I tried to update what I said, but I thought i'd get more confusing as I went. thanks :)18:46
Ilari WildPikachu: Through normally one sees 0-2 precessors (0 being initial commit, 1 being ordinary commt and 2 being merge commit).18:46
WildPikachu hrmmm18:46
igorgue left18:46
johnw WildPikachu: the trick here is becoming able to visualize your repository in terms of commits, rather than thinking in terms of "changes"18:46
WildPikachu ok ...18:47
doener johnw: yeah, transferring the dag-model to words can be hard when it comes to rebasing, I regularly fail at that ;-)18:47
johnw changes are the diff between two commits18:47
doener exactly because rebasing more or less deals with diffs rather than with commits directly18:48
johnw so when you cherry pick, for example, Git will take the diff between your HEAD and the commit you're cherry picking, will apply that diff as a patch to your HEAD, and then create a new commit that represents the application of those changes to your HEAD18:48
coderdad_ left18:48
doener johnw: argh! no!18:48
johnw no?18:48
doener johnw: it takes the diff between the commit's parent and the commit18:48
johnw oops, johnw thinks he's wrong18:48
doener not the diff between HEAD and the commit18:49
johnw ok, since I'm confusing things even more at this point, I'll stop!18:49
doener: yes, you're right of course, I confused myself!!!18:49
fadec_ joined18:49
doener "git cherry-pick $sha1" is like "git diff $sha1^..$sha1 | git apply"18:49
(roughly)18:49
d0k joined18:50
johnw see, even I just got bit by thinking about changes instead of commits18:50
johnw strives to retrain his CVS-addled mind18:50
WildPikachu hrmmmm18:50
if i cherry-pick a commit, i don't have to commit the cherry-pick? if i'm making any sense?18:51
doener WildPikachu: cherry-pick automatically creates a commit, unless there are conflicts18:52
WildPikachu aha!18:52
reuss or unless you use -n18:52
WildPikachu ok, i just resolved a conflict ...18:52
doener reuss: ah, right18:52
WildPikachu ok ... how do i get a file back that i just deleted using rm?18:54
one that had conflicts ... heh18:54
doener the version with the conflicts? Start over with the cherry-pick18:55
WildPikachu i did a cherry pick, it failed with conflicts, so I rm'd the file by mistake18:55
i would rather now go back and just copy the file from my master instead of merging in changes18:56
doener git checkout master -- file18:56
WildPikachu aha18:56
doener checkout is the almighty "get something from the repo" tool18:56
johnw doener: will git checkout master:file do the same thing?18:56
alley_cat joined18:56
WildPikachu ok, that restored the file18:57
doener johnw: no, that will error out18:57
WildPikachu how would I suck in the file from another branch?18:57
johnw git checkout branch -- file18:57
d0k left18:57
doener WildPikachu: s/master/other_branch/18:57
WildPikachu aha18:57
doener whether you actually would want to do that is a different question18:57
WildPikachu so .... checkout can restore the files i remove by mistake18:57
and also suck in files from other branches18:58
johnw WildPikachu: checkout says "get X out of the repository"18:58
if you say "git checkout file", it will use your current HEAD18:58
WildPikachu ok ... I did a git-fetch, so obviously i must bring my head up to date first18:58
doener johnw: no, it will use the index18:58
johnw doener: damn18:58
WildPikachu hrmmmm18:58
johnw ah yes, git reset uses HEAD, not git checkout19:00
doener johnw: often enough that ends up the same, but if it doesn't you'll scream at your screen trying to get a file back ;-)19:00
johnw that's a thing I recently learned19:00
doener been there, done that19:00
johnw haha19:00
i've found gibak to be very handy for that case :)19:00
WildPikachu after a git-fetch, would i use git-merge to bring my local copy up to date?19:00
git-merge origin/v4.0.x?19:01
johnw or just say git-pull again19:01
and let it do that part for you19:01
a-priori left19:01
WildPikachu i think i'm doing something wrong ..... i am trying git-checkout master -- repoUtil.c but under my branch to try suck in repoUtil.c19:03
doener johnw: hm? how would gibak help there? I don't need yet _another_ backup (.git/ already has one). It's just that "git rm file; git checkout file" won't restore the file, only "git checkout HEAD --file" will19:03
Jerdent left19:03
WildPikachu it returns without error, but the files contents is still the branch contents19:03
johnw doener: gibak will save your repo, index and working tree all together19:03
so whatever you lose, you can get it back19:03
but if what you want to recover is in the repo somewhere, then yeah, you don't need it19:04
doener johnw: well, I was solely talking about the case where "git checkout file" doesn't work, because the file is also gone from the index19:04
johnw oh, I see what you mean19:05
eternaleye left19:05
doener and stuffing git repos into a git repo doesn't make much sense to me, I can just push them to some other box ;-)19:05
krawek joined19:05
johnw well, i'm using it for the non Git-controlled stuff too19:06
doener yeah, for that, different issue, obviously ;-)19:06
johnw: btw, in your bottom-up pdf you say "The word HEAD refers to the most recent commit of the last branch you checked out"19:07
WildPikachu this is very weird19:07
Oejet left19:07
johnw doener: hmm.. that does sound a bit unclear; how would you word it?19:08
doener johnw: actually, HEAD is a reference (.git/HEAD), either symbolic, pointing to the currently checked out branch, or non-symbolic pointing to the currently checked out commit (detached HEAD)19:08
ggeecko left19:08
ggeecko_ left19:08
eternaleye joined19:08
kumbayo joined19:08
johnw i was trying to describe it from just a usage point of view; usually when we say HEAD we mean "the tip of the current branch as known to your machine" -- even though yes, it really just refers to whatever the person decided to checkout19:09
doener "HEAD is a reference to the currently checked out branch or commit. If it references a commit, it is called detached HEAD."19:14
bdiego joined19:14
doener hm, that sucks19:15
WildPikachu if i have checked out my branch .... and another developer updates master .... and I do a git-pull on the branch, is it going to pull in his changes locally into my master?19:15
or only my branch?19:15
johnw well, it always references a commit, you mean a commit != tip of current branch19:15
doener johnw: no. Try this: "git checkout master && cat .git/HEAD" vs. "git checkout master^{}; cat .git/HEAD"19:16
in the first case, it's a symbolic reference, in the second case, it's not19:16
johnw i see what you mean19:16
bdiego left19:17
WildPikachu AHA19:17
deavid HEAD always point to the commit where your Working copy is (based). It can have a symbolic ref, or a commit id.19:17
WildPikachu checkout origin/master -- filename19:18
that worked for me19:18
doener deavid: it's not pointing to a commit most of the time. It's pointing to a branch.19:19
unless you happen to work on detached HEADs all the time ;-)19:19
deavid doener: a branch is pointing to a commit too19:19
ggeecko joined19:19
mahmoud2 left19:19
mahmoud2 joined19:19
deavid but it is not the same to point a branch as point a commit.19:20
because if you point a branch, you will update that branch;19:20
doener deavid: sure, but HEAD is _not_ pointing to that commit directly. If it was, how would you tell which branch you're currently on? ;-)19:20
deavid doener: right.19:20
then, in HEAD are two types of info avaliable; 1. the commit where you are 2. the branch (if you are on one)19:21
it is only another way of understanding the HEAD ref :-)19:23
tobij is there a specific reason why git-ls-tree would only work in the project root directory?19:24
doener tobij: works in subdirectories just fine here19:25
tobij: how is it failing for you?19:25
tobij doener: no output, strace suggests that it looks in $CWD/.git19:26
git version 1.5.3.719:26
WildPikachu ooo ... how would i fast forward my master if i'm currently in a branch?19:26
checkout master, and pull?19:26
doener WildPikachu: fast-forward to your current branch?19:26
WildPikachu master updated while i was working on branch19:27
tobij doener: ok, narrowed it down... i'm in an untracked directory19:27
still, might one consider that a bug?19:27
WildPikachu i'd like everything up to date19:27
tobij hmm, probably not19:28
whatever.19:28
lu_zero joined19:29
igorgue joined19:29
doener_ joined19:33
doener left19:35
brazilian_ left19:40
jjuran left19:40
ggeecko left19:43
djwonk joined19:45
djwonk left19:46
djwonk joined19:46
djwonk looking for some pointers on how to automatically create human-friendly build numbers from a git hash (i.e. for inclusion in hidden fields in bug reports on a Web app)19:50
i guess if the hash will be internal, i don't care if it is human friendly or not19:50
i guess this will work: git rev-parse HEAD19:51
drizzd djwonk: git describe19:51
cehteh tried 'git describe'19:51
djwonk fatal: cannot describe '22.......'19:52
doener_ no annotated tags yet?19:52
etnt left19:52
doener_ try with --tags19:52
jjuran joined19:53
djwonk i embraced git on Friday, no tags yet :)19:53
doener_ then there's --all19:54
although that's less useful in your case19:54
djwonk doener_: thanks, i'm learning more about git-tag, trying to figure out a good workflow19:55
drizzd djwonk: you need some kind of tag to get human-readable version numbers19:55
djwonk it would be super cool to use a tag for the "major" revision and then have git count the distance from the closest major tag for the minor19:56
could be some ambiguity perhaps, in which case it could just pick the closest in the "graph"19:56
cehteh thats what git describe actually does19:56
djwonk cehteh: nice!19:56
dysinger left19:56
ggeecko joined19:57
djwonk thanks everybody19:58
kristoffer left20:03
dysinger joined20:06
WildPikachu is there an easy way I can generate commit emails?20:07
doener_ format-patch20:08
WildPikachu to one of our mailing lists20:08
preferably by the server i'm pushing to20:08
doener_ ah, so you want push notifications20:09
WildPikachu yea20:09
that would be a post-receive-hook, right?20:09
doener_ yeah, there's an example hook in contrib/hooks/20:10
WildPikachu aha20:11
schlurchz joined20:13
_graham_ joined20:23
johntramp left20:25
johntramp joined20:25
WildPikachu ok .... if I have a master and a stable20:26
i beleive its possible to move stable to point to the master copy of a file20:27
wait, maybe is should read more :)20:27
johnw left20:31
cncfanatics left20:31
Beket left20:33
niki left20:35
tflsh joined20:36
tflsh is there a recommended way of doing a backup of the main repository for a project?20:36
jengelh rsync :p20:37
Mikachu get a large userbase20:37
tflsh hehe20:37
oh rsync, so just copy it all, preserving the file structure?20:37
jengelh of the .git dir (in case of a non-bare) yes20:37
rofrol left20:38
tflsh hm20:38
well my "main" repository is not a working copy20:38
jengelh then just tar that20:38
tflsh it's set up via gitosis (awesome package)20:38
ok20:38
jengelh well or rsync20:38
just the git repository, and not the cehckout (if any)20:38
tflsh ok,makes sense20:39
i wanted to know if that was sufficient20:39
because i am aware of svn having svnadmin dump20:39
and mysqdump, things like that. i wondered if anything like that was needed here20:39
jengelh you might wnat to run git gc before20:39
Mikachu just be sure you don't push to the repo while taring/rsyncing20:39
jengelh you can rsync while it pushes20:40
you just have to rerun rsync again to update HEAD and so20:40
tflsh hmm didn't even know about git gc20:40
Mikachu jengelh: you'd need to do that indefinitely until you rsynced while there wasn't a push then.. :)20:40
tflsh well push and pull on my projects run very fast anyawy20:40
jengelh so just use btrfs20:41
Mikachu jengelh: i think the problem is rsync gets the objects dir, then some objects are written and head is updated, then rsync gets the head ref20:41
kipras left20:41
jengelh snapshot it, rsync off, and then :)20:41
tflsh snapshot?20:41
Mikachu btrfs feature20:41
tflsh hmm time to google20:41
never heard of this fs20:41
is it like ext3, reiser?20:42
Mikachu it's very experimental20:42
jengelh better than any20:42
tflsh hmm cool20:42
surprised i hadnt heard of it yet20:42
about this git gc... is that something i run on my checked out repository or on the main (non working copy) repository (at the gitosis host) ?20:42
jengelh either20:43
it's for repacking the thing into few files20:43
gebi there is a network related fs too, crfs which uses the uniq features of brtfs20:43
Mikachu the one you are rsyncing/taring :)20:43
tflsh ok20:43
jengelh: is there any downside to running git gc, or can i safely do that now and then to keep the entire package size minimal?20:44
Mikachu the only i know of is if you're playing symlink tricks with refs20:44
tflsh oh ok20:44
well i am not doing that deliberately, so unless git does it for somme reason...20:44
Mikachu it doesn't :)20:44
tflsh cool thanks for answering all my questions guys20:45
destruct1destruct20:45
drizzd_ joined20:47
glommer left20:51
WildPikachu how would I push only master?20:52
jengelh uh, git push r master?20:52
fhobia left20:53
djwonk doener_: after some experimentation, it seems that git describe only works with annotated tags20:53
schlurchz left20:53
WildPikachu fatal: 'master': unable to chdir or not a git archive20:53
hrmmmm20:53
djwonk if I leave off the -a then it doesn't seem to find the tag20:53
i mean if I do "git tag v0.4 abcd..." and leave off the -a20:54
WildPikachu aha20:54
git push origin master20:54
is that right?20:54
niki joined20:54
johntramp left20:55
johntramp joined20:56
statim left20:58
doener_ djwonk: yeah, non-annotated tags are only considered if you use --tags (or --all)21:00
djwonk doener_: aha. is there some significance to annotated tags (i.e. taking the time to make a commit message gives them special significance?)21:00
doener_ djwonk: you might use some tags locally, just to "mark" a few commits temporarily, for whatever purpose, and then drop those tags again. Having git describe use them is pretty useless then21:01
djwonk: an annotated tag is a first class object, a plain tag is just a reference.21:01
djwonk doener_: ok, so making an annotated tag signifies more -- and is represented differently internally21:02
doener_ yeah. Annotated tags have a tagger, a message and can be signed21:02
and of course a tag date21:02
plain tags have none of that21:02
drizzd left21:03
sd_ joined21:03
igorgue left21:04
krawek left21:08
igorgue joined21:08
chris2 left21:11
cousin_it joined21:12
johntramp left21:13
trochala left21:13
johntramp joined21:13
eternaleye_ joined21:14
cliffstah left21:15
eternaleye left21:16
RandalSchwartz heh - the email I just sent to git@vger is marked text/us-ascii, but clearly has a utf8 char in it. :)21:16
stupid emailer21:17
jengelh RandalSchwartz: did you use git-send-email?21:17
RandalSchwartz no21:17
GNUS21:17
it should have noticed there was utf8 in there21:17
jengelh probably was not gnu enough21:17
RandalSchwartz no GNUS is good GNUS!21:18
jengelh ha21:19
"You space bastard! You killed my pine!!!"21:20
Jerdent joined21:20
jengelh 1/msg #perl mauke: not in the default distribution :) but ok21:21
kumbayo left21:21
jengelh blargh21:21
doener_ RandalSchwartz: did the "reset --hard" restore the other version of Märchen?21:21
ie. the one with \314\21021:21
oh wait... nwm21:22
nvm... argh21:22
johntramp left21:24
bobesponja joined21:24
aroben joined21:24
johntramp joined21:24
lolage0 joined21:27
dysinger left21:27
dysinger joined21:28
comp is there some switch for git-rebase so it won't generate new hashes for "custom changes" once re-applied at top ?21:28
just like backup those things and cherry-pick them at top21:29
doener_ comp: hm? new commit -> new hash. The ancestry changed.21:29
comp but that's the same commit21:29
no change was made "inside" it21:30
wagle_home it does recognize when two commits (with different sha1's) do "the same thing"21:30
comp not for me it seems21:30
git version 1.5.5.121:30
doener_ comp: so all files are the same, the parents are the same, the dates are the same, etc? Then your rebase did absolutely nothing ;-)21:31
wagle_home sorry, second hand info, i cant help more21:31
comp This caused me lots of problems with pushing to remote repo21:31
doener_: so better use merge then21:31
even when applying "base" updates from upstream21:31
well imagine a two branches, master and custom for example21:32
custom and master contains the same data21:33
you make ... let's say.. 5 commits in custom21:33
meanwhile, somebody else updates master from a remote master (fast-forward)21:33
and when I make a rebase from master to custom, all works fine except that those 5 commits will gain newly generated sha-1s21:34
doener_ you rather get 5 new commits21:34
a commit is _not_ just a delta21:35
comp if I could make a new branch from the updated master and then cherry-picked those 5 from custom, this would'n happen21:35
well21:35
doener_ comp: of course that would heppen21:35
jast cherry-picking changes the commit id, too21:35
doener_ s/heppen/happen/21:35
cherry-pick creates new commits, just like rebase21:36
(in fact, rebase -i uses cherry-pick)21:36
comp it changes the commiter so it has to rehash21:36
jast that's probably a better way to look at things, yeah21:36
even if it didn't the id would change21:36
you can verify this by cherry-picking your own commit21:36
s21:36
doener_ comp: the new commit has a different parent as well21:36
comp doener_: that explains why there were no errors with -i and conflicts with no parameters21:37
so in my scenario, if I want ever push those things, I should use merge instead of rebase21:38
doener_ you can rebase as much as you want, until you push.21:38
comp exactly21:39
spearce joined21:40
jengelh but all your base still belong to us :)21:40
comp hehe21:40
jengelh once pushed, its ours21:40
doener_ comp: http://git.pastebin.com/m65a1763e21:42
Mikachu all you'rebase? :)21:42
doener_ comp: the B', C' and D' commits are the newly created commits.21:42
comp: B and B' have different parents, and most likely, their trees differ as well (due to the changes introduced in E, F and G)21:42
jast Mikachu, i think i may want to cry now. :(21:42
sd_ left21:43
doener_ comp: if you pushed "foo" before the rebase, you had B, C and D there. But pushing foo after the rebase, would then remove those from foo's history21:43
ljlane joined21:44
kristoffer joined21:44
comp I'm not sure if I understand your scenario, but in manpage there's a one also21:44
and if I undo custom changes, update and then apply them again, I'm applying them on a different parent21:45
doener_ comp: foo forked from master at A and three commits were made on foo (B,C,D). In the meantime, 3 commits on master were made as well (E,F,G)21:45
the command to get the second history was just "git rebase master foo"21:46
Eludias left21:46
pygi left21:46
comp doener_: I now understand21:47
so it's basically a similar example as the one from manpage21:47
doener_: thank you21:47
RandalSchwartz hopes someone with ZFS on Solaris is nearby21:47
johntramp left21:47
johntramp joined21:48
pygi joined21:50
comp so it can look like http://rafb.net/p/xo14Za17.html21:50
(i know, not a really good example)21:51
wheels_ joined21:51
comp because they will be different actually21:51
morphir left21:52
wheels_ i'm trying to commit a jquery js file to git and it splits back an error21:52
error: pathspec 'public/javascripts/ui-tabs-ext.js' did not match any file(s) known to git.21:52
WildPikachu how do i get the last commit that affected each file recursively?21:52
Ilari WildPikachu: Ah, that last commit that affected each file. That's pretty expensive thing to compute...21:53
WildPikachu is it possible?21:54
wait ... anything is possible21:54
is it easy?21:54
or is there some other way? ....21:55
Ilari WildPikachu: And no, there isn't any very easy way to do that. And if you want stuff like that, you should keep some kind of cache. Also, define 'latest commit'.21:55
WildPikachu well .... i have a list of files in the repo ... now ... we export certain part of our repo to mirrors21:55
think a website21:55
doener_ comp: yeah, that would be two rebases (one for each topic). But you actually have E' and H'' and so on in the "AFTER" history.21:55
WildPikachu currently we cache the SVN commit rev's of each file21:56
Pieter RandalSchwartz: your problem with ZFS, I have that too with just HFS21:56
WildPikachu we then pull a recent list of files and their id's to see what changed21:56
doener_ comp: ... as rebase creates new commits. The old E, F, G and H', I', J' are still araound21:56
s/araound/around/21:56
WildPikachu pull those files out the repo, remove the deleted ones, and update the mirrors21:56
jast WildPikachu, you can do a separate git log on every file21:56
WildPikachu cannot export the repo every time, because most files are gpg signed21:57
and i don't want to sit rsyncing every file each time :)21:57
only what changed21:57
Ilari WildPikachu: If you know the base state, use diff-tree to see what changed?21:57
WildPikachu yes ... i was looking at that aswell, which i'm very sure will actually work better21:58
for the base i can just export21:58
and for everything after that, i can do a diff-tree?21:58
Ilari WildPikachu: diff-tree is by far faster, since it only needs to consider two trees and can perform subtree pruning.21:59
comp doener_: thanks, that make things *really* more brighter21:59
WildPikachu and ....21:59
it tells me what to delete!21:59
and crate21:59
*create21:59
Ilari WildPikachu: Also, it tells what was modified.21:59
comp this is why is the tool called "re-base" after all21:59
WildPikachu exactly!21:59
clsdaniel left21:59
WildPikachu let me see what i can do about that, it looks like a much better solution22:00
alley_cat left22:00
aroben left22:00
doener_ comp: for rebase, it's IMHO better to think in terms of changes, instead of states.22:01
Ilari That kind of subtree pruning is the reason Git can do merges as fast as it does (which is very fast compared to pretty much everything else).22:01
WildPikachu yea22:01
doener_ comp: commits represent states. What rebase does is looking at the changes between commits and reapplying those changes to some other commit. Thereby creating new commits22:01
WildPikachu ok, so my one set of scripts is now updated to git22:02
got email notifications22:02
gitweb ... etc22:02
and ssh accounts for all developers22:02
next is to do the scripts which control all the exports :)22:02
comp doener_: re-applying "static" changes making a new "commit header" on them22:03
doener_ comp: hmhm, "commit header" makes no sense to me in that context22:03
comp well22:03
doener_ comp: a commit records a certain _state_, the full contents of all files.22:04
A commit does not record a diff against its parent or so.22:04
mugwump that's quite an academic distinction22:05
given they are quite equivalent, modulo implementation bugs22:05
comp doener_: no, I didn'n though so22:05
thought22:05
statim joined22:08
doener_ mugwump: well, unless I got it wrong from the beginning, this discussion started from the question why a commit got a new hash from a rebase, although it still introduced the same changes.22:08
comp so I'm a bit network man so I've imagined a commit as a packet header and actual changes as a packet payload, so much for confussion22:08
brosner joined22:08
doener_ mugwump: And the fact that a commit does not consist of changes is at least part of the explanation, especially when you argue that the hash should be the same if the diff is the same22:09
mugwump the git-patch-id is the same22:09
dysinger left22:09
dysinger joined22:10
dysinger left22:11
comp As i get it - a commit represents a certain state and some aditional information like commiter, author, (gpg signature), ...22:11
so I'm going to read the manual again22:12
RandalSchwartz even if you made the exact same changes to a parent, and made a new commit from it, the commit sha1 includes the metainfo, which includes the timestamp22:13
mugwump try the user manual, chapter 722:13
RandalSchwartz so you'll never get the same commit twice22:13
brosner left22:13
brosner joined22:14
comp so, well, it can't be used as an identifier22:15
if you want to move your data22:16
cousin_it left22:16
johnw joined22:16
mugwump you can move things around fine, it's just rewinding and reapplying changes that has the issue22:17
it's more of a caveat really22:17
again, see git-patch-id - it calculates an identifier based on the actual changes22:18
If any of this is not good enough, you can always throw some identifier you generated somewhere else in the commit message22:18
this is called a "surrogate"22:18
if you put them at the start of the commit message, you can refer to them as if they were regular commit IDs with :/blah22:19
sbeyer joined22:19
thannoy left22:20
comp mugwump: thanks, will be useful22:20
tcoppi left22:20
tcoppi joined22:20
eternaleye_ left22:24
eternaleye_ joined22:24
kristoffer left22:29
gcv joined22:32
gcv left22:34
Jerdent left22:35
spearce left22:38
thiago_home left22:38
wheels_ left22:39
jmspeex left22:44
deavid left22:45
jmspeex joined22:45
wheels_ joined22:46
igorgue left22:47
wheels_ hi, i'm trying to push my changes to my github account and i'm getting : "error: failed to push some refs "22:49
any ideas how to fix?22:49
mugwump read more of the error message, then compare with the advice on the man page ? :)22:50
wheels_ " ! [rejected] master -> master (non-fast forward)"22:51
this is all it says22:51
Mikachu do more people than you have push access to this account?22:52
wheels_ yea, one other22:52
i did a pull first22:52
Mikachu he pushed something thne22:52
drizzd_ wheels_: search for 'fast forward' in man git-push and the first thing you'll find is a paragraph which explains the error22:52
I think you can see if it's a fast forward by checking that git rev-list remote/master..master is empty22:54
Gitzilla joined22:55
mugwump similarly, you can look at 'gitk master...github/master', to see what's happening22:55
(assuming the remote is called 'github'22:55
drizzd_ mugwump: that really works? I thought gitk only takes tips, no ranges?22:55
ebel left22:55
mugwump sure, it accepts the full glory of git-rev-list options22:56
see also the "view" menu22:56
intersecting views is pretty cool22:56
drizzd_ uh, which version?22:56
wheels_ ok, did the git rev-list remove/master master and it shows the same error22:56
the rejected master -> non-fast forward22:57
mugwump that was in the version in 1.4, at least22:57
wheels_ is there a way to overrwite everything in the remote gitbhub master with my master?22:57
mugwump that's called forcing22:58
the git-rev-list command wasn't going to change anything22:58
Mikachu it's also a little bit impolite to your friend22:58
mugwump try git merge remote/master22:58
drizzd_ ok, I have 1.5.5.1 and it gives me "Bad agruments to gitk: ambiguous argument master...mybranch': unkown revision or path not in the working tree.22:58
mugwump then, git log remote/master..master will show nothing22:58
Mikachu drizzd_: do you have a branch called "mybranch"?22:58
drizzd_ no, it's actually called fix-empty-merge, but I didn't want to cause confusion, which I managed to do anyway...22:59
mugwump you checked it with git-rev-list first?22:59
I use it all the time, so I'm pretty sure it works :)23:00
spearce joined23:00
drizzd_ mugwump: oops, my bad23:00
I have no master, apparently23:01
Mikachu hooray, you're free23:01
drizzd_ hehe23:01
cliffstah joined23:03
[tla] left23:03
nkallen left23:05
johntramp left23:11
johntramp joined23:12
igorgue joined23:17
wheels_ left23:17
ph^ left23:24
charon left23:28
cousin_it joined23:28
_graham_ left23:35
spearce` joined23:39
dadark_ joined23:46
cousin_it left23:48
tcoppi left23:51
tcoppi joined23:53
spearce left23:54
spearce`spearce23:56

Logs Search ←Prev date Next date→ Channels Documentation