| shruggar | ncopa, how about whenever a new tag is pushed, Have A Script check-out that tag, build it, etc? If you only want certain tags to be auto-built, then have a naming convention for tags |
| Ilari | ncopa: The script could also export a snapshot, unpack it somewhere and build. |
| ncopa | hum |
| ncopa | for each git push i already git pull and build the changes |
| Ilari | ncopa: Using git pull in scripts is a bad idea. |
| shruggar | ncopa, so do it for tags as well. What's the actual issue you're having? |
| ncopa | detect when there is new tag |
| ncopa | lunch. brb |
| shruggar | as was said before, git-fetch will tell you about new tags it fetched |
| Ilari | ncopa: Also in post-update hook, updated/new tags are visible in list of refs updated. |
| Ilari | New way to abuse remote helpers: As client-side "post-push" hooks. ):-) |
| shruggar | I suppose having a real post-push makes as much sense if not more sense than post-commit |
| tasslehoff | How can I fetch objects from one local repo to another? Setup a remote? None of the repos are bare. |
| shruggar | tasslehoff, bare repositories are only a convenience and are not required. Just set up a remote |
| shruggar | git remote add foo /path/to/repos |
| tasslehoff | shruggar: thanks |
| tasslehoff | when I add the remote I get a warning about "no common commits", is that very bad? |
| shruggar | not necessarily, but it's probably not what you want |
| shruggar | tasslehoff, how were these repos created? |
| tasslehoff | shruggar: git svn clone :) |
| tasslehoff | shruggar: we're moving to git, but I still have to work with the svn server |
| shruggar | tasslehoff, I'm guessing that the repos weren't created using the same "git svn clone" string. For example, one may have been created with "git svn clone svn+ssh://foo/bar/baz" while another was created with "git svn clone file:///bar/baz" |
| tasslehoff | shruggar: yeah. one is actually trunk, while the other one is branches/foo. |
| tasslehoff | hmm, when I say it out loud, this sounds sketchy |
| ziro` | what should i set my autocrlf to? |
| ziro` | i want to only work with LF's but I want to ensure I don't accidently add CRLF's |
| shruggar | tasslehoff, there's the problem, then :) svn branches don't translate neatly into git branches like that. In some situations, you can clone the entire svn repository (specifying where branches, tags, etc, go) and then treat them as normal git branches |
| shruggar | tasslehoff, I've yet to meet a mature svn repository (out of all three I've looked at, so my own experience is rather minimal) where git-svn could process that sort of thing sanely |
| tasslehoff | shruggar: hm. I also want to add a remote to my colleagues checkout of the same branch, but I sense that will cause the same problem |
| shruggar | tasslehoff, if you both cloned using the same string, you should be able to pass commits back-and-forth no problem |
| Ilari | ziro`: input then |
| shruggar | tasslehoff, for example, I pass commits through a bare repository between work and home, since work and home both cloned via the same git-svn string |
| bob_f | sitaram: Sorry, juggling a bunch of things at once here. When I try to "git clone git@server:gitolite" I get "fatal: 'gitolite' does not appear to be a git repository". |
| bob_f | And same if I do "gitolite-admin", which is what the repo is called. |
| Ilari | bob_f: Try 'gitolite:gitolite-admin'. |
| Ilari | bob_f: (weird games gitolite plays with ssh). |
| tPl0ch | Hi, I am trying to create a post-receive hook on our server. It is as simple as that: http://pastebin.com/hW0Ffq0T If I run it as the 'git' user, it works flawlessly, but when pushing via git+ssh from the local repo, it does not get executed. |
| bob_f | Ilari: Nope, same error. |
| Ilari | tPl0ch: 1) Don't run git as root. 2) Don't use pull in scripts, 3) if you cd in script, remember to unset $GIT_DIR. |
| bob_f | This is probably in the docs, let me check it up. |
| Ilari | bob_f: 'git clone gitolite:gitolite-admin' (literally that way) says that it does not appear to be git repository? |
| bob_f | Oh, wait. |
| Ilari | bob_f: As opposed to things like access denied, or host not found. |
| bob_f | Nope, that dosen't work either - yeah, says it's not a repo. |
| Ilari | bob_f: What does 'ssh gitolite' (yes, 'gitolite' literally) say? |
| bob_f | Ilari: It says hello and lists repos and perms. |
| tasslehoff | and the final straw. it's not possible to use git-svn to create a bare repo, with support for pushing changes back up? |
| tPl0ch | Ilari, so, how do I update a clone in the post-receive hook? |
| tPl0ch | without pull? |
| Ilari | bob_f: 'git ls-remote gitolite:gitolite-admin' (again, literally). |
|
|
| Ilari | tPl0ch: fetch + reset. |
| shruggar | tasslehoff, "not possible" is too strong a word. "very inconvenient and annoying to set-up, and always requiring awareness of the set-up" is more accurate |
| tasslehoff | shruggar: :) |
| bob_f | £ git ls-remote gitolite:gitolite-admin |
| bob_f | fatal: 'gitolite-admin' does not appear to be a git repository |
| bob_f | (gitolite-admin is listed when I do "ssh gitolite" though). |
| bob_f | And I have R W perms. |
| Ilari | bob_f: Some very broken gitolite setup? If you didn't have permissions, it would print access DENIED message. |
| bob_f | Hrm. |
| Ilari | bob_f: Try 'git ls-remote gitolite:does-not-exist'? |
| bob_f | £ git ls-remote gitolite:does-not-exist |
| bob_f | fatal: 'does-not-exist' does not appear to be a git repository |
| bob_f | fatal: The remote end hung up unexpectedly |
| Ilari | bob_f: Eeh... For me the error is: "fatal: remote error: R access for does-not-exist DENIED to Ilari". |
| bob_f | Hmmmm. |
| Ilari | bob_f: Wonder what the heck is going on. Based on 'ssh', there's gitolite on other end, but git connections look like they bypass gitolite. |
| bob_f | Yeah, weird, huh ? |
| shruggar | tasslehoff, the most annoying part of it: commits will ALWAYS be re-written when you dcommit, so if you "git push" to such a repository, a "git pull" right afterwards will try to merge. "git pull --rebase" /might/ work, but something like "git push && git remote update && git reset --hard origin/master" is more what is required |
| shruggar | tasslehoff, (something like that, anyway) |
| Ilari | bob_f: (ignore the "fatal: remote error " part, it is artefact of local setup). |
| bob_f | Ah okay. |
| Ilari | bob_f: Because error messages from gitolite are converted into protocol errors, and client prints prints protocol errors with 'fatal: remote error: " prefixed... |
| sitaram | bob_f: putty? |
| bob_f | sitaram: Nope. |
| Ilari | bob_f: "ssh gitolite git-upload-pack does-not-exist". What does that complain about? |
| bob_f | Just £ ssh -V |
| bob_f | OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007 |
| sitaram | bob_f: client OS and sever OS? (shooting in the dark here...) |
| tasslehoff | shruggar: hm. plan 1 is now to speed up the process towards !svn |
| bob_f | ubuntu-server and debian on my end. |
| bob_f | £ ssh gitolite git-upload-pack does-not-exist |
| bob_f | fatal: 'does-not-exist' does not appear to be a git repository |
| shruggar | tasslehoff, it is a good plan. Note that a new interface to svn is being actively worked on at the moment. I don't know if it will solve any of these problems, but I hardly see the point if it doesn't :) |
| Ilari | bob_f: So that looks like it bypasses gitolite (but 'ssh gitolite' doesn't...). Hmm... |
| Ilari | bob_f: You ran 'ssh gitolite' and 'ssh gitolite git-upload-pack does-not-exist' from the same shell (just to rule out environment fscking things up?) |
| bob_f | Here's my ~/.ssh/config just in case: http://bpaste.net/show/7307/ |
| bob_f | Ilari: Yes, same shell, no env changes. |
| tasslehoff | shruggar: is that interface mature enough for testing, or is it way-pre-alpha? |
| Ilari | bob_f: Looks sane... |
| shruggar | tasslehoff, I think last I saw there were certain aspects of it for which testing was requested, but I wouldn't call it mature enough that it's worth testing for actual use yet |
| rajeshsr | How does git distinguish between tag name and a branch name, when you do git branch newName tagName etc.. |
| rajeshsr | ? |
| sitaram | bob_f: run src/sshkeys-lint in your gitolite clone (prints USAGE message), then folow instructions, and report back |
| Ilari | bob_f: Bit of brute-forceish, but: Do 'ssh -vvvv gitolite' and save the full output to file. Then do the same (saving to other file) for 'ssh -vvvv gitolite git-upload-pack does-not-exist' and then diff the two files. |
| Action: FauxFaux has managed to lose a commit from reflog. /o\ |
| bob_f | Ilari: Sure. |
| Ilari | bob_f: 'diff -u file1 file2' to diff them. |
| engla | git diff --no-index file1 file2 and you can use a more familiar diff |
| bob_f | Ilari: I can pastebin this safely ? |
| Ilari | bob_f: It shouldn't have any private information. |
| bob_f | Yeah, looks safe. |
| bob_f | http://bpaste.net/show/7309/ |
| ncopa | back |
| ncopa | thanks all |
| Ilari | bob_f: What the heck? Looks like 'ssh gitolite' did actual login? |
| Ilari | bob_f: Do the sshkeys-lint stuff... |
| level09 | when using reflog to revert, do I use checkout ? or reset ? or revert ? |
| wereHamster | what do you mean by 'revert'? |
| level09 | like undo changes |
| level09 | i have merged some branches and did some cleaning that messed up everything |
| Ilari | level09: 'reset --merge' probably then... |
| Ilari | level09: Or --hard (dangerous). |
| wereHamster | was the merge successful? |
| wereHamster | or did it fail because of conflicts? |
| level09 | failed |
| wereHamster | reset --hard |
| wereHamster | or checkout --merge -- . |
| level09 | but if I want to go back into a specific point in my reflog |
| wereHamster | reset --hard or checkout |
| level09 | okay thanks ! I'll try that |
| bob_f | Ilari: I'm gonna run to lunch, but this lint stuff should hopefully help me figure it out - thanks a lot for your help though, it's really appreciated. |
| bob_f | I'll let you know how it goes. |
| sondreb | when i type "git rm <filename>" it deletes the file but then sends the message "Deletion of directory 'ubs/common/composer' failed. Should I try again? (y/n)?" |
| sondreb | why does it try to delete te folder? |
| mathepic | Whats the filename? |
| sondreb | C:\BuildSys\work\ubs\common\composer>git rm comp_resbuild.pm |
| sondreb | rm 'ubs/common/composer/comp_resbuild.pm' |
| sondreb | Deletion of directory 'ubs/common/composer' failed. Should I try again? (y/n)? |
| jupko | http://pastie.org/1014987 |
| jupko | what's the problem with my local repository ? |
| jupko | How can I correct it ? You can see the situation if you open the link I pasted. |
| mathepic | sondreb: Thats odd. |
| wereHamster | jupko: git fsck --full |
| jupko | okay |
| wereHamster | jupko: and before you do that, can you check if the file .git/objects/e1/17cf9010e5973e9d65139424bde2e27cf7389c exists and if it is zero bytes long? |
| jupko | oops |
| jupko | I have run fsck before the checking |
| jupko | 4KB |
| jupko | and it exists |
| jupko | http://pastie.org/1014995 |
| jupko | you can see the output of fsck operation and the size of that object file. |
| jupko | the question is still existing, how can I fix it ? :) |
| jupko | and what can cause such a problem at all ? This will be my other question. |
| wereHamster | do you have a backup of that repo? or a clone that contains that object? |
| mathepic | You need to replace that object with one from a noncorrupt repo. |
| jupko | I can do a new clone because I have pushed the commits |
| jupko | but I would like to avoid it next time so I would like to know what can cause such a problem. |
| wereHamster | filesystem corruption for example |
| jupko | only in this small git repository and no corruption in another places ? :) |
| jast | no corruption you have found so far |
| wereHamster | a block on the disk is usually 512 bytes, well within the 4kb file that is corrupt |
| jast | and it's actually quite likely to happen that way if, for example, you're working on that repository and you get a power failure in the middle of something |
| jupko | 4KB is the page size on i686 |
| wereHamster | page size, yes. But not block on the harddrive |
| jupko | ah okay I see |
| jupko | I may know the problem. |
| jupko | I am developing a driver |
| jupko | and syscrash occured because of some bad lines. |
| jupko | that I inserted |
| jupko | and maybe it caused that. |
| jupko | meanwhile I was in this repository. |
| jupko | so it's definitely worth to make a backup directory then. |
| jupko | :-) |
| jupko | wereHamster: thank you. |
| jast | in theory git syncs stuff before updating a branch, but perhaps your filesystem did something nasty and ignored it |
| jupko | jast: no problem with filesystem at all |
| jast | well, the corruption has to have been caused by *something* :) |
| anebi1 | hi. i'm newbie in git and i want to ask if is possible to clone a repository under folder located in my current git repository. for example if my git repository is in this http path /git/php, i want to clone a repository under /git/php/vendor. is this possible somehow? |
| jast | are you, perchance, talking about submodules? |
| anebi1 | jast: if you call this submodule, then it is. i'm looking it from http url side. vendor is a subfolder in my gitrepo and i want to clone all content of remote under this folder. |
| anebi1 | jast: i'm reading now for submodules :) |
| jast | oh, you want to clone only part of a repository? |
| jast | if so... well, tough luck. git doesn't support that. |
| anebi1 | jast: the people moved the project from svn to git, i think i will need the full cloning if their repo. i have not checked yet how they have done this. |
| anebi1 | but the content should go under vendor subfolder in my repo |
| jast | sounds like a case for submodules all right... or the third-party git subtree tool, if you prefer that |
| Mpenz | sitaram: :) Thanks. I figured. |
| jast | some people don't like submodules very much, e.g. because you have to manually update the submodule and record the update whenever you need a newer version |
| anebi1 | jast: i see. i will learn how submodules work and probably will go that way. thanks |
| tPl0ch | Hi, I am still trying to get a post-receive hook to run: http://pastebin.com/Bkj9ULm1. If I run that as the user 'git' on the server, it works flawlessly, but when I push from my local repository, the hook won't execute. |
| Last message repeated 1 time(s). |
| PerlJam | tPl0ch: how did you run it from the command line? |
| PerlJam | tPl0ch: you do have execute permission set, yes? |
| tPl0ch | PerlJam, yes, it's executable, and I did a su git && /path/to/hook/post-receive |
| tPl0ch | it did everything right |
| tPl0ch | but whatever I do, it won't execute when pushing from my local repo |
| PerlJam | Are you sure you're pushing to the right place? |
| tPl0ch | PerlJam, yes, since the hook does the fetch after I push from my local repo |
| tPl0ch | but only if I run it by hand |
| tPl0ch | my git version is 1.7.0.5 |
| PerlJam | wait ... that doesn't make sense. |
| PerlJam | The hook does not execute when you push, yes? |
| tPl0ch | indeed |
| PerlJam | and how do you know you're pushing to the right remote? |
| tPl0ch | git remote show origin |
| Ilari | tPl0ch: And how do you tell it doesn't execute? |
| tPl0ch | Ilari, I added a 'touch PLEASE_RUN' to post-receive |
| PerlJam | tPl0ch: hrm. I think this is one of those "devil in the details" kind of things. If you could generate a transcript of everything you did to make sure the script was executable, that you were pushign to the right remote, and that the remote isn't executing the post-receive, they might help |
| bob_f | Ilari: Hi, just got back from lunch and been poking a bit more. |
| bob_f | Ilari: If I unset ssh-agent env vars, doing "git clone git@gitolite:gitolite-admin" works - you see it is asking me for the passphrase for ~/.ssh/bob and not ~/.ssh/id_rsa |
Popular searches: