git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Ping Yin <pkufranky@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [bug] Working files created in bare repository when pushing to a rewound bare repository
Date: Mon, 31 Dec 2007 01:47:42 -0500	[thread overview]
Message-ID: <20071231064741.GA4250@coredump.intra.peff.net> (raw)
In-Reply-To: <46dff0320712302242m34b5267dlb3f26488293d5d51@mail.gmail.com>

On Mon, Dec 31, 2007 at 02:42:42PM +0800, Ping Yin wrote:

> Following scripts can reproduce the problem: in the final line,
> foo.txt is generated in bare foo.git

No, your script is wrong.

> # create bare foo.git and its clone foo
> mkdir foo
> cd foo && echo foo>foo.txt &&
> git init && git add . && git commit -m 'create project foo' && cd ..
> cd foo && echo foo1>foo.txt && git commit -a -m "update foo.txt" && cd ..
> git clone --bare foo foo.git && rm -rf foo
> git clone foo.git foo
> 
> # reset bare and then push
> cd foo.git && git reset --hard HEAD^ && cd ..

Try looking in foo.git after this step. The "--hard" to git-reset is
creating the file foo.txt. --hard makes no sense in a bare repository (I
thought we were disallowing it, but apparently not).

-Peff

  reply	other threads:[~2007-12-31  6:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-31  6:42 [bug] Working files created in bare repository when pushing to a rewound bare repository Ping Yin
2007-12-31  6:47 ` Jeff King [this message]
2007-12-31  7:02   ` Ping Yin
2007-12-31  7:07     ` Jeff King
2007-12-31  7:13       ` Jeff King
2007-12-31  7:19         ` Jeff King
2007-12-31  7:26         ` Jeff King
2008-01-03 21:29           ` Junio C Hamano
2007-12-31  6:50 ` Junio C Hamano

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=20071231064741.GA4250@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=pkufranky@gmail.com \
    /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 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).