Re: [PATCH] cvsimport: use git-update-ref when updating

From: Eric Wong <normalperson@yhbt.net>
Date: 2006-03-31 21:32:30
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
> 
> On Thu, 30 Mar 2006, Junio C Hamano wrote:
> 
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > 
> > > This simplifies code, and also fixes a subtle bug: when importing in a
> > > shared repository, where another user last imported from CVS, cvsimport
> > > used to complain that it could not open <branch> for update.
> > 
> > The second hunk look sensible but I do not know about "use Fcntl"
> > since I do not see anything you are adding that starts to use it...
> 
> O_EXCL. Without "use Fcntl;" perl says I am not allowed to use bareword 
> things in strict mode or some such.

Huh?  I still don't see where O_EXCL is used.

> > > +       system("git-update-ref refs/heads/$branch $cid") == 0

Passing args to system() in list form is always preferable in case
there's a shell-unfriendly variable:

	system("git-update-ref", "refs/heads/$branch", $cid) == 0

-- 
Eric Wong
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Mar 31 21:33:04 2006

This archive was generated by hypermail 2.1.8 : 2006-03-31 21:33:18 EST