From: Martin Langhoff <martin.langhoff@gmail.com>
To: skimo@liacs.nl, Martin Langhoff <martin@ng.eduforge.org>,
git@vger.kernel.org
Subject: Re: [PATCH] Add merge detection to git-cvsimport
Date: Wed, 17 Aug 2005 09:36:08 +1200 [thread overview]
Message-ID: <46a038f9050816143646fa4137@mail.gmail.com> (raw)
In-Reply-To: <20050816110725.GL11882MdfPADPa@garage.linux.student.kuleuven.ac.be>
On 8/16/05, Sven Verdoolaege <skimo@kotnet.org> wrote:
> On Tue, Aug 16, 2005 at 10:35:27PM +1200, Martin Langhoff wrote:
> > +
> > +sub get_headref($$) {
>
> If you want to check whether a ref is valid, then
> it is better to use git-rev-parse...
We are reading/writing directly to .git/refs/heads/ a lot in this
script. Not changing that for the time being.
> > + if (open(C,"$git_dir/refs/heads/$name")) {
> > + chomp($sha = <C>);
> > + close(C);
> > + length($sha) == 40
> > + or die "Cannot get head id for $name ($sha): $!\n";
>
> ... but if you're just going to die, then why not simply
> let git-commit-tree do the test ?
Because we get the head names from cvsps output, and we want to have a
specific error when cvsps has given us a bogus branch name.
git-commit-tree could fail for a number of reasons, this one is the
most likely one to be from a bug in cvsps or the cvsimport logic.
> > + if ($mparent eq 'HEAD') { $mparent = 'origin'};
>
> Please don't hardcode 'origin' here.
Duh! Patch submitted. Juniooooo!
martin
next prev parent reply other threads:[~2005-08-16 21:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-16 10:35 [PATCH] Add merge detection to git-cvsimport Martin Langhoff
2005-08-16 11:07 ` Sven Verdoolaege
2005-08-16 21:36 ` Martin Langhoff [this message]
2005-08-17 17:29 ` Matthias Urlichs
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=46a038f9050816143646fa4137@mail.gmail.com \
--to=martin.langhoff@gmail.com \
--cc=git@vger.kernel.org \
--cc=martin@ng.eduforge.org \
--cc=skimo@liacs.nl \
/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).