From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: "Martin Langhoff" <martin@catalyst.net.nz>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-cvsimport: fix initial checkout
Date: Fri, 14 Mar 2008 01:04:13 +0200 [thread overview]
Message-ID: <e29894ca0803131604qa61adfbo22ff75d076feb899@mail.gmail.com> (raw)
In-Reply-To: <47D9A836.9010601@catalyst.net.nz>
Hi
On Fri, Mar 14, 2008 at 12:18 AM, Martin Langhoff
<martin@catalyst.net.nz> wrote:
> Marc-Andre Lureau wrote:
> > git-symbolic-ref HEAD returns master reference, even if the file does
> > not exists. That prevents the initial checkout and fails in
> > git-rev-parse.
>
> But you are patching the block that gets triggered on subsequent
> imports, this code does not deal with "initial checkout" unless
> something else is wrong. The line right above the open() is an else that
> has the block that matters.
>
Yeah, it failed in the middle of a ~4h import, I did not restart it.
git-cvsimport -r cvs -p b,HEAD -k -m -a -v -d
:pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer -C
gst-plugins-good gst-plugins-good
This is a quite problematic CVS, btw. (missing patches/files in the
end, branch merge fail ... see my previous patch)
> > The patch checks the existence of the reference file
> > before assuming an original branch exists. There might be better
> > solutions than checking file existence.
>
> There are indeed. If we need this patch -- then you can call git
> ref-parse right to see if you get a sha1.
Ok, which one is prefered? ref-parse I guess? I am mostly ignorant of
all the plumbing stuff.
> > - unless ($last_branch) {
> > + if (-f "$git_dir/$last_branch") {
>
> Note that the file won't exist there in any modern git. It will be in
> $git_dir/refs/heads/$last_branch. Did you test this patch?
>
Crap. The patch indeed worked, because the file did not exist. The
second time it also worked:
skip patchset 5825: 1205277122 before 1205418644
skip patchset 5826: 1205418644 before 1205418644
DONE.
Already up-to-date.
*** Building gst-plugins-good *** [1/145]
make -j2
Result is here: http://git.infradead.org/users/elmarco/gst-plugins-good.git
Thanks for the review!!
--
Marc-André Lureau
next prev parent reply other threads:[~2008-03-13 23:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-13 19:09 [PATCH] git-cvsimport: fix initial checkout Marc-Andre Lureau
2008-03-13 21:05 ` Junio C Hamano
2008-03-13 22:18 ` Martin Langhoff
2008-03-13 23:04 ` Marc-André Lureau [this message]
2008-03-13 23:07 ` Marc-André Lureau
2008-03-13 23:29 ` Martin Langhoff
2008-03-13 23:15 ` Junio C Hamano
2008-03-13 23:27 ` Martin Langhoff
2008-03-13 23:22 ` Marc-André Lureau
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=e29894ca0803131604qa61adfbo22ff75d076feb899@mail.gmail.com \
--to=marcandre.lureau@gmail.com \
--cc=git@vger.kernel.org \
--cc=martin@catalyst.net.nz \
/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).