{"thread":{"id":"16009","subject":"Does a `git pull' write to the origin repository in any way?","startedAt":"2008-10-22T09:00:11Z","lastAt":"2008-10-22T14:27:00Z","messageCount":3,"participants":["Brett Ryan","Marc Weber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"93669","messageId":"a65d095e0810220200q42936427o917cdac067d04135@mail.gmail.com","threadId":"16009","inReplyTo":null,"subject":"Does a `git pull' write to the origin repository in any way?","fromName":"Brett Ryan","fromEmail":"brett.ryan@gmail.com","sentAt":"2008-10-22T09:00:11Z","receivedAt":"2008-10-22T09:00:11Z","isPatch":false,"sender":{"key":"brett.ryan@gmail.com","avatar":null},"body":"Greetings, the reason I ask this question is because my pattern of\ndevelopment is to create local source git repositories on my home\ndirectory, then pull them to the central location. I found myself\ngetting the error `unable to create temporary sha1 filename\n.git/objects/11: File exists' which after investigation found that\nthere were paths in `.git/objects/' owned by root which is who I use\nto do the pull from my home directory using sudo. `git log' shows all\ncommits as me.\n\nTypical dev cycle.\n\ncd ~/src/appl_bin\n# make mods\ngit commit -a\ncd $DEST\nsudo git pull ~/src/appl_bin linux_test\n\nThankyou\n-Brett\n"},{"id":"93684","messageId":"20081022132517.GM3988@gmx.de","threadId":"16009","inReplyTo":"a65d095e0810220200q42936427o917cdac067d04135@mail.gmail.com","subject":"Re: Does a `git pull' write to the origin repository in any way?","fromName":"Marc Weber","fromEmail":"marco-oweber@gmx.de","sentAt":"2008-10-22T13:25:17Z","receivedAt":"2008-10-22T13:25:17Z","isPatch":false,"sender":{"key":"marco-oweber@gmx.de","avatar":null},"body":"On Wed, Oct 22, 2008 at 08:00:11PM +1100, Brett Ryan wrote:\n> Greetings, the reason I ask this question is because my pattern of\n> development is to create local source git repositories on my home\n> directory, then pull them to the central location. I found myself\n> getting the error `unable to create temporary sha1 filename\n> .git/objects/11: File exists' which after investigation found that\n> there were paths in `.git/objects/' owned by root which is who I use\n> to do the pull from my home directory using sudo. \nAeh.. about which repo are you talking here? I guess it's not the one\nowned by root because otherwise this would be normal..\n\nHi Brett, I'm not sure where the problem comes form. But I feel your dev\ncycle is kind of wired.\nIf you can login as root using ssh you can also do it the \"normal\" (?)\nway:\n\n# user dir\ngit remote add root_repo ssh://root@localhost/path-to-root-repo\ngit pull root_repo # then resolve conflicts if any\ngit push root_repo # update the root repo\n\nThis way you always have conflicts in your local repo and never on the\nroot one which is preferable (IMHO)..\n\ngit-fetch doesn't list a way to access another repo by \"su(do)\" which\nmight be the best way here ? This could be convinient because you\nwould'nt have to setup an extra group to access the same repo as root\nand user (?)\n\nYou're right that git pull *should not* modify any files from the repo\nits pulling from.. But I don't know enough about git internals to say\nmore about this. All I know is that git clone might have created some\nhardlinks.. But I'm not sure how this interfers with file permissions.\n\nI hope someone else can give a more accurate reply.\n\nMarc Weber\n"},{"id":"93687","messageId":"a65d095e0810220727n66d83bcag15213ef3554ce834@mail.gmail.com","threadId":"16009","inReplyTo":"20081022132517.GM3988@gmx.de","subject":"Re: Does a `git pull' write to the origin repository in any way?","fromName":"Brett Ryan","fromEmail":"brett.ryan@gmail.com","sentAt":"2008-10-22T14:27:00Z","receivedAt":"2008-10-22T14:27:00Z","isPatch":false,"sender":{"key":"brett.ryan@gmail.com","avatar":null},"body":"Thanks Marc. I agree the dev cycle is a little strange, though we're\nstill using a 4GL environment (Progress) from the 70's where all the\ndevelopers have no prior experience to version control except for\nrenaming files to ${name}.yyyymmdd.\n\nMy apologies for being a little light headed I've only been using git\nfor about a week now, currently I'm the main merger for CVS and\nlooking for an alternative. First impressions of `git' to me are\nfantastic and it seems to fit right, what I need to do is figure out a\ngood dev cycle that my peers can use as they're all used to working\nint he same directory and just simply yelling out to each other \"I'm\nabout to edit file {x}\", making me cringe each time.\n\nAnyway Marc your answer was all I'm after, it could have been\nsomething I goofed, just needed clarification that a pull wasn't going\nto touch the rep that the pull is pulling from.\n\nThanks,\n-Brett\n\n\nOn Thu, Oct 23, 2008 at 12:25 AM, Marc Weber <marco-oweber@gmx.de> wrote:\n> On Wed, Oct 22, 2008 at 08:00:11PM +1100, Brett Ryan wrote:\n>> Greetings, the reason I ask this question is because my pattern of\n>> development is to create local source git repositories on my home\n>> directory, then pull them to the central location. I found myself\n>> getting the error `unable to create temporary sha1 filename\n>> .git/objects/11: File exists' which after investigation found that\n>> there were paths in `.git/objects/' owned by root which is who I use\n>> to do the pull from my home directory using sudo.\n> Aeh.. about which repo are you talking here? I guess it's not the one\n> owned by root because otherwise this would be normal..\n>\n> Hi Brett, I'm not sure where the problem comes form. But I feel your dev\n> cycle is kind of wired.\n> If you can login as root using ssh you can also do it the \"normal\" (?)\n> way:\n>\n> # user dir\n> git remote add root_repo ssh://root@localhost/path-to-root-repo\n> git pull root_repo # then resolve conflicts if any\n> git push root_repo # update the root repo\n>\n> This way you always have conflicts in your local repo and never on the\n> root one which is preferable (IMHO)..\n>\n> git-fetch doesn't list a way to access another repo by \"su(do)\" which\n> might be the best way here ? This could be convinient because you\n> would'nt have to setup an extra group to access the same repo as root\n> and user (?)\n>\n> You're right that git pull *should not* modify any files from the repo\n> its pulling from.. But I don't know enough about git internals to say\n> more about this. All I know is that git clone might have created some\n> hardlinks.. But I'm not sure how this interfers with file permissions.\n>\n> I hope someone else can give a more accurate reply.\n>\n> Marc Weber\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"}]}