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

[PATCH] svn: (cleanup) use predefined constant for rev_map_fmt

From
EWEric Wong <normalperson@yhbt.net>
Date
Aug 13, 2009, 05:34 UTC
Message-ID
<20090813053423.GB24694@dcvr.yhbt.net>

This makes life easier in case we ever need to change the internal format of the rev_maps.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 also pushed out to git://yhbt.net/git-svn
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index a2934e8..1da9f07 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3277,7 +3277,7 @@ sub _rev_map_get {
 		my $i = int(($l/24 + $u/24) / 2) * 24;
 		sysseek($fh, $i, SEEK_SET) or croak "seek: $!";
 		sysread($fh, my $buf, 24) == 24 or croak "read: $!";
-		my ($r, $c) = unpack('NH40', $buf);
+		my ($r, $c) = unpack(rev_map_fmt, $buf);
 
 		if ($r < $rev) {
 			$l = $i + 24;
-- 
Eric Wong
Message 1 of 1 in “svn: (cleanup) use predefined constant for rev_map_fmt”
  1. svn: (cleanup) use predefined constant for rev_map_fmtEric Wong, Aug 13, 2009

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.