All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bill Lear <rael@zopyra.com>
To: git@vger.kernel.org
Subject: Question on git fetch to bare repo
Date: Thu, 8 Feb 2007 16:28:29 -0600	[thread overview]
Message-ID: <17867.41997.561756.679778@lisa.zopyra.com> (raw)

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

             reply	other threads:[~2007-02-08 22:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08 22:28 Bill Lear [this message]
2007-02-08 22:34 ` Question on git fetch to bare repo 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17867.41997.561756.679778@lisa.zopyra.com \
    --to=rael@zopyra.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.