git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Does a `git pull' write to the origin repository in any way?
@ 2008-10-22  9:00 Brett Ryan
  2008-10-22 13:25 ` Marc Weber
  0 siblings, 1 reply; 3+ messages in thread
From: Brett Ryan @ 2008-10-22  9:00 UTC (permalink / raw)
  To: git

Greetings, the reason I ask this question is because my pattern of
development is to create local source git repositories on my home
directory, then pull them to the central location. I found myself
getting the error `unable to create temporary sha1 filename
.git/objects/11: File exists' which after investigation found that
there were paths in `.git/objects/' owned by root which is who I use
to do the pull from my home directory using sudo. `git log' shows all
commits as me.

Typical dev cycle.

cd ~/src/appl_bin
# make mods
git commit -a
cd $DEST
sudo git pull ~/src/appl_bin linux_test

Thankyou
-Brett

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Does a `git pull' write to the origin repository in any way?
  2008-10-22  9:00 Does a `git pull' write to the origin repository in any way? Brett Ryan
@ 2008-10-22 13:25 ` Marc Weber
  2008-10-22 14:27   ` Brett Ryan
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Weber @ 2008-10-22 13:25 UTC (permalink / raw)
  To: git

On Wed, Oct 22, 2008 at 08:00:11PM +1100, Brett Ryan wrote:
> Greetings, the reason I ask this question is because my pattern of
> development is to create local source git repositories on my home
> directory, then pull them to the central location. I found myself
> getting the error `unable to create temporary sha1 filename
> .git/objects/11: File exists' which after investigation found that
> there were paths in `.git/objects/' owned by root which is who I use
> to do the pull from my home directory using sudo. 
Aeh.. about which repo are you talking here? I guess it's not the one
owned by root because otherwise this would be normal..

Hi Brett, I'm not sure where the problem comes form. But I feel your dev
cycle is kind of wired.
If you can login as root using ssh you can also do it the "normal" (?)
way:

# user dir
git remote add root_repo ssh://root@localhost/path-to-root-repo
git pull root_repo # then resolve conflicts if any
git push root_repo # update the root repo

This way you always have conflicts in your local repo and never on the
root one which is preferable (IMHO)..

git-fetch doesn't list a way to access another repo by "su(do)" which
might be the best way here ? This could be convinient because you
would'nt have to setup an extra group to access the same repo as root
and user (?)

You're right that git pull *should not* modify any files from the repo
its pulling from.. But I don't know enough about git internals to say
more about this. All I know is that git clone might have created some
hardlinks.. But I'm not sure how this interfers with file permissions.

I hope someone else can give a more accurate reply.

Marc Weber

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Does a `git pull' write to the origin repository in any way?
  2008-10-22 13:25 ` Marc Weber
@ 2008-10-22 14:27   ` Brett Ryan
  0 siblings, 0 replies; 3+ messages in thread
From: Brett Ryan @ 2008-10-22 14:27 UTC (permalink / raw)
  To: Marc Weber, git

Thanks Marc. I agree the dev cycle is a little strange, though we're
still using a 4GL environment (Progress) from the 70's where all the
developers have no prior experience to version control except for
renaming files to ${name}.yyyymmdd.

My apologies for being a little light headed I've only been using git
for about a week now, currently I'm the main merger for CVS and
looking for an alternative. First impressions of `git' to me are
fantastic and it seems to fit right, what I need to do is figure out a
good dev cycle that my peers can use as they're all used to working
int he same directory and just simply yelling out to each other "I'm
about to edit file {x}", making me cringe each time.

Anyway Marc your answer was all I'm after, it could have been
something I goofed, just needed clarification that a pull wasn't going
to touch the rep that the pull is pulling from.

Thanks,
-Brett


On Thu, Oct 23, 2008 at 12:25 AM, Marc Weber <marco-oweber@gmx.de> wrote:
> On Wed, Oct 22, 2008 at 08:00:11PM +1100, Brett Ryan wrote:
>> Greetings, the reason I ask this question is because my pattern of
>> development is to create local source git repositories on my home
>> directory, then pull them to the central location. I found myself
>> getting the error `unable to create temporary sha1 filename
>> .git/objects/11: File exists' which after investigation found that
>> there were paths in `.git/objects/' owned by root which is who I use
>> to do the pull from my home directory using sudo.
> Aeh.. about which repo are you talking here? I guess it's not the one
> owned by root because otherwise this would be normal..
>
> Hi Brett, I'm not sure where the problem comes form. But I feel your dev
> cycle is kind of wired.
> If you can login as root using ssh you can also do it the "normal" (?)
> way:
>
> # user dir
> git remote add root_repo ssh://root@localhost/path-to-root-repo
> git pull root_repo # then resolve conflicts if any
> git push root_repo # update the root repo
>
> This way you always have conflicts in your local repo and never on the
> root one which is preferable (IMHO)..
>
> git-fetch doesn't list a way to access another repo by "su(do)" which
> might be the best way here ? This could be convinient because you
> would'nt have to setup an extra group to access the same repo as root
> and user (?)
>
> You're right that git pull *should not* modify any files from the repo
> its pulling from.. But I don't know enough about git internals to say
> more about this. All I know is that git clone might have created some
> hardlinks.. But I'm not sure how this interfers with file permissions.
>
> I hope someone else can give a more accurate reply.
>
> Marc Weber
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-22 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-22  9:00 Does a `git pull' write to the origin repository in any way? Brett Ryan
2008-10-22 13:25 ` Marc Weber
2008-10-22 14:27   ` Brett Ryan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).