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

[PATCH] git-svn: do not let Git.pm warn if we prematurely close pipes

From
EWEric Wong <normalperson@yhbt.net>
Date
Feb 1, 2007, 21:12 UTC
Message-ID
<11703643463997-git-send-email-normalperson@yhbt.net>
This mainly quiets down warnings when running git svn log.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 This is backported from my development branch and should
 be trivial enough for 1.5.0.
 git-svn.perl |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 68156fc..8ebaae9 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -681,7 +681,7 @@ sub show_log {
 		process_commit($_, $r_min, $r_max) foreach reverse @k;
 	}
 out:
-	eval { command_close_pipe($log) };
+	close $log;
 	print '-' x72,"\n" unless $_incremental || $_oneline;
 }
 
@@ -1475,7 +1475,7 @@ sub map_tree_joins {
 				$seen{$commit} = 1;
 			}
 		}
-		eval { command_close_pipe($pipe) };
+		close $pipe;
 	}
 }
 
@@ -1669,7 +1669,7 @@ sub write_grafts {
 				last unless /^\S/;
 			}
 		}
-		eval { command_close_pipe($ch) }; # breaking the pipe
+		close $ch; # breaking the pipe
 
 		# if real parents are the only ones in the grafts, drop it
 		next if join(' ',sort keys %$p) eq join(' ',sort keys %x);
@@ -1766,7 +1766,7 @@ sub get_commit_time {
 		} elsif ($tz =~ s/^\-//) {
 			$s -= tz_to_s_offset($tz);
 		}
-		eval { command_close_pipe($fh) };
+		close $fh;
 		return $s;
 	}
 	die "Can't get commit time for commit: $cmt\n";
@@ -2846,7 +2846,7 @@ sub rmdirs {
 			delete $rm->{join '/', @dn};
 		}
 		unless (%$rm) {
-			eval { command_close_pipe($fh) };
+			close $fh;
 			return;
 		}
 	}
-- 
1.5.0.rc2.133.gca07-dirty
Message 1 of 1 in “git-svn: do not let Git.pm warn if we prematurely close pipes”
  1. git-svn: do not let Git.pm warn if we prematurely close pipesEric Wong, Feb 1, 2007

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.