From: "Ping Yin" <pkufranky@gmail.com>
To: "Jeff King" <peff@peff.net>
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 15:02:25 +0800 [thread overview]
Message-ID: <46dff0320712302302p4c125ee1n2abc1561ba10c47e@mail.gmail.com> (raw)
In-Reply-To: <20071231064741.GA4250@coredump.intra.peff.net>
On Dec 31, 2007 2:47 PM, Jeff King <peff@peff.net> wrote:
> 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).
>
Sorry for my inattention. However, i remembered the reason i added
'--hard' is to avoid the warn 'foo.txt: needs update' when 'git
reset HEAD^'. Now i know '--soft' will do the right thing.
So how about use '--soft' as default in the bare repository?
--
Ping Yin
next prev parent reply other threads:[~2007-12-31 7:02 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
2007-12-31 7:02 ` Ping Yin [this message]
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=46dff0320712302302p4c125ee1n2abc1561ba10c47e@mail.gmail.com \
--to=pkufranky@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).