git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] cvsexportcommit: be graceful when "cvs status" reorders the arguments

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 18, 2008, 18:50 UTC
Message-ID
<alpine.LSU.1.00.0802181849410.30505@racer.site>
In-Reply-To
<7v1w7ap0vo.fsf@gitster.siamese.dyndns.org>
Hi,
On Mon, 18 Feb 2008, Junio C Hamano wrote:
Show 11 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> >> The script uses File::Basename upfront so perhaps just simply...
> >
> > I tried that.  But as the file need not exist, "basename" went on 
> > strike.
> >
> > So I'll keep the (ugly) version.
> 
> The reason why "basename" is not being used needs documented in the code 
> then.  The next person will likely to make the same mistake as I did.
Right.  Could you be so good and squash this in, then, please?

Thanks, Dscho

-- snipsnap --
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index c00368b..6eff42c 100755
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -208,6 +208,7 @@ if (@canstatusfiles) {
       my %fullname = ();
       foreach my $name (keys %todo) {
 	my $basename = $name;
+	# cannot use basename(), since $name need not exist in the CVS tree
 	$basename =~ s/.*\///;
 	$basename = "no file " . $basename if (exists($added{$basename}));
 	chomp($basename);
Previous: Junio C HamanoNext: Martin Langhoff
Message 11 of 15 in “cvsexportcommit: be graceful when "cvs status" reorders the arguments”
  1. cvsexportcommit: be graceful when "cvs status" reorders the argumentsJohannes Schindelin, Feb 18, 2008
  2. Junio C HamanoFeb 18, 2008
  3. Junio C HamanoFeb 18, 2008
  4. Martin LanghoffFeb 18, 2008
  5. Johannes SchindelinFeb 18, 2008
  6. Martin LanghoffFeb 18, 2008
  7. Johannes SchindelinFeb 18, 2008
  8. cvsexportcommit: be graceful when "cvs status" reorders the argumentsJohannes Schindelin, Feb 18, 2008
  9. Johannes SchindelinFeb 18, 2008
  10. Junio C HamanoFeb 18, 2008
  11. Johannes SchindelinFeb 18, 2008
  12. Martin LanghoffFeb 18, 2008
  13. Johannes SchindelinFeb 18, 2008
  14. Martin LanghoffFeb 18, 2008
  15. Johannes SchindelinFeb 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.