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

[PATCH 05/20] cvsserver: remove unused functions _headrev and gethistory

From
MOMatthew Ogilvie <mmogilvi_git@miniinfo.net>
Date
Oct 14, 2012, 05:42 UTC
Message-ID
<1350193353-19210-6-git-send-email-mmogilvi_git@miniinfo.net>
In-Reply-To
<1350193353-19210-1-git-send-email-mmogilvi_git@miniinfo.net>
Remove:
   - _headrev() - It uses similar functionality from getmeta() and gethead().
   - gethistory() - It uses similar functions gethistorydense() and getlog().
Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
---
 git-cvsserver.perl | 36 ++++--------------------------------
 1 file changed, 4 insertions(+), 32 deletions(-)
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index cc39b6b..8b2accb 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -3440,19 +3440,6 @@ sub insert_head
     $insert_head->execute($name, $revision, $filehash, $commithash, $modified, $author, $mode);
 }
 
-sub _headrev
-{
-    my $self = shift;
-    my $filename = shift;
-    my $tablename = $self->tablename("head");
-
-    my $db_query = $self->{dbh}->prepare_cached("SELECT filehash, revision, mode FROM $tablename WHERE name=?",{},1);
-    $db_query->execute($filename);
-    my ( $hash, $revision, $mode ) = $db_query->fetchrow_array;
-
-    return ( $hash, $revision, $mode );
-}
-
 sub _get_prop
 {
     my $self = shift;
@@ -3512,6 +3499,8 @@ sub gethead
 
 =head2 getlog
 
+See also gethistorydense().
+
 =cut
 
 sub getlog
@@ -3597,25 +3586,6 @@ sub commitmessage
     return $message;
 }
 
-=head2 gethistory
-
-This function takes a filename (with path) argument and returns an arrayofarrays
-containing revision,filehash,commithash ordered by revision descending
-
-=cut
-sub gethistory
-{
-    my $self = shift;
-    my $filename = shift;
-    my $tablename = $self->tablename("revision");
-
-    my $db_query;
-    $db_query = $self->{dbh}->prepare_cached("SELECT revision, filehash, commithash FROM $tablename WHERE name=? ORDER BY revision DESC",{},1);
-    $db_query->execute($filename);
-
-    return $db_query->fetchall_arrayref;
-}
-
 =head2 gethistorydense
 
 This function takes a filename (with path) argument and returns an arrayofarrays
@@ -3625,6 +3595,8 @@ This version of gethistory skips deleted entries -- so it is useful for annotate
 The 'dense' part is a reference to a '--dense' option available for git-rev-list
 and other git tools that depend on it.
 
+See also getlog().
+
 =cut
 sub gethistorydense
 {
-- 
1.7.10.2.484.gcd07cc5
Previous: Matthew OgilvieNext: Matthew Ogilvie
Message 6 of 22 in “git-cvsserver: add support for cvs "-r" refs”
  1. 00/20 git-cvsserver: add support for cvs "-r" refsMatthew Ogilvie, Oct 14, 2012
  2. 01/20 cvsserver t9400: add basic 'cvs log' testMatthew Ogilvie, Oct 14, 2012
  3. 02/20 cvsserver: removed unused sha1Or-k mode from kopts_from_pathMatthew Ogilvie, Oct 14, 2012
  4. 03/20 cvsserver: add comments about database schema/usageMatthew Ogilvie, Oct 14, 2012
  5. 04/20 cvsserver update: comment about how we shouldn't remove a user-modified fileMatthew Ogilvie, Oct 14, 2012
  6. 05/20 cvsserver: remove unused functions _headrev and gethistoryMatthew Ogilvie, Oct 14, 2012
  7. 06/20 cvsserver: clean up client request handler map commentsMatthew Ogilvie, Oct 14, 2012
  8. 07/20 cvsserver: split up long lines in req_{status,diff,log}Matthew Ogilvie, Oct 14, 2012
  9. 08/20 cvsserver: use whole CVS rev number in-process; don't strip "1." prefixMatthew Ogilvie, Oct 14, 2012
  10. 09/20 cvsserver: cvs add: do not expand directory argumentsMatthew Ogilvie, Oct 14, 2012
  11. 10/20 cvsserver status: provide real sticky infoMatthew Ogilvie, Oct 14, 2012
  12. 11/20 cvsserver: factor out git-log parsing logicMatthew Ogilvie, Oct 14, 2012
  13. 12/20 cvsserver: cleanup extra slashes in filename argumentsMatthew Ogilvie, Oct 14, 2012
  14. 13/20 cvsserver: define a tag name character escape mechanismMatthew Ogilvie, Oct 14, 2012
  15. 14/20 cvsserver: add misc commit lookup, file meta data, and file listing functionsMatthew Ogilvie, Oct 14, 2012
  16. 15/20 cvsserver: implement req_Sticky and related utilitiesMatthew Ogilvie, Oct 14, 2012
  17. 16/20 cvsserver: generalize getmeta() to recognize commit refsMatthew Ogilvie, Oct 14, 2012
  18. 17/20 cvsserver: Add version awareness to argsfromdirMatthew Ogilvie, Oct 14, 2012
  19. 18/20 cvsserver: support -r and sticky tags for most operationsMatthew Ogilvie, Oct 14, 2012
  20. 19/20 cvsserver: add t9402 to test branch and tag refsMatthew Ogilvie, Oct 14, 2012
  21. 20/20 cvsserver Documentation: new cvs ... -r supportMatthew Ogilvie, Oct 14, 2012
  22. Junio C HamanoOct 16, 2012

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.