All of lore.kernel.org
 help / color / mirror / Atom feed
* Question on git fetch to bare repo
@ 2007-02-08 22:28 Bill Lear
  2007-02-08 22:34 ` Jakub Narebski
  2007-02-09  2:39 ` Jeff King
  0 siblings, 2 replies; 10+ messages in thread
From: Bill Lear @ 2007-02-08 22:28 UTC (permalink / raw)
  To: git

If I have not yet made myself unwelcome, I now have another problem
using git 1.4.4.1.

I have a public bare repo I created yesterday:

% mkdir project && cd project
% git --bare init-db --shared
% git --bare fetch git://source/project
[All seems well]

I have a private repo:

% mkdir project && cd project
% git clone /repos/git/project
[All is well]

A co-worker checks something in to our company repo, so I go to my
public repo to fetch the changes:

% cd /repos/git/project
% git --bare fetch -v git://source/project
remote: Generating pack...
remote: Done counting 230 objects.
remote: Result has 152 objects.
remote: Deltifying 152 objects.
remote:  100% (152/152) done
Unpacking 152 objects
remote: Total 152, written 152 (delta 109), reused 90 (delta 51)
 100% (152/152) done
* fetched git://source/project
  commit: 5c2d43d

I then go to my private repo to pull from my public one:

% cd ~/project
% git branch
  topic
* master
% git pull
Already up-to-date.
% cat .git/remotes/origin
URL: /repos/git/project
Pull: refs/heads/master:refs/heads/origin
Pull: refs/heads/topic:refs/heads/topic
[All seems well with this repo ??]

I try to push from my private to my public:

% git push /repos/git/project
Everything up-to-date

I go back to my public repo, and poking around, can't see what is wrong.

The commit that the fetch says it pulled is there, if I do:

% cd /repos/git/project
% git --bare show -t 5c2d43d

the patch comes out exactly as it did in my email notification, so I
know it's there.

I tried then to be more forceful, and did another fetch like this,
which I sort of expected to fail:

% git --bare fetch -v git://source/project master:master
remote: Generating pack...
remote: Done counting 230 objects.
remote: Result has 152 objects.
remote: Deltifying 152 objects.
remote:  100% (152/152) done
Unpacking 152 objects
remote: Total 152, written 152 (delta 109), reused 90 (delta 51)
 100% (152/152) done
* refs/heads/master: fast forward to branch 'master' of git://source/project
  old..new: 37e2298..5c2d43d
Cannot fetch into the current branch.

Having enabled the logs, I can investigate a bit:

% cat logs/refs/heads/master
37e229835103a11365b1e081f9b9987a88437e62 5c2d43dc819fc1bc37ebae1696c3fbfd6a4401db Bill Lear <rael@zopyra.com> 1170973321 -0600     fetch git://source/project: fast-forward
5c2d43dc819fc1bc37ebae1696c3fbfd6a4401db 37e229835103a11365b1e081f9b9987a88437e62 Bill Lear <rael@zopyra.com> 1170973321 -0600     fetch git://source/project: Undoing incorrectly fetched HEAD.

And, my branches seem to be there, properly:

% git --bare branch
  topic
* master

So, I'm confused.  Why does my fetch seem to fetch things the first
time, yet I cannot pull these into my private repo?  I could swear I
just did this same sequence of operations on Monday and it worked.

Perhaps I just need a vacation ...


Bill

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

end of thread, other threads:[~2007-02-13  5:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-08 22:28 Question on git fetch to bare repo Bill Lear
2007-02-08 22:34 ` Jakub Narebski
2007-02-09  0:22   ` Johannes Schindelin
2007-02-09  0:24     ` Johannes Schindelin
2007-02-09  2:39 ` Jeff King
2007-02-09  4:19   ` Bill Lear
2007-02-12 20:47   ` Bill Lear
2007-02-13  4:54     ` Jeff King
2007-02-13  5:28     ` Junio C Hamano
2007-02-13  5:31       ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.