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

Re: [PATCH] Added "-kb" to all the entries lines sent to the client

From
Junio C Hamano <junkio@cox.net>
Date
Feb 22, 2007, 20:37 UTC
Message-ID
<7v4ppedj3r.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200702221606.42638.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
> Perhaps when the whole .gitattributes system has settled down that could be
> used to conditionally set -kb

Indeed. And this patch is a great help by identifying where to insert necessary '-kb'.

If the patch had a stub implementation to determine if -kb is needed (and the stub always says "yes" for your purpose, or "no" for backward compatibility for non-text files), it could be applied to the mainline for wider testing.

sub path_is_binary {
        my ($filename) = @_;
	# If you do not mind LF lineendings and care more about
        # binary files, return true from here; otherwise you may
        # want to change this to return false.
        # We'll ask the much talked about .gitattributes
        # mechanism when it's ready.
        return 1;
}
sub req_add {
        ...
        $kb = path_is_binary($filename) ? "-kb" : "";
        print "Checked-in $dirpart\n";
        print "$filename\n";
        print "/$filepart/0//$kb/\n";
        $addcount++;
}
Previous: Andy ParkinsNext: Andy Parkins
Message 3 of 17 in “git-cvsserver and binary files”
  1. Andy ParkinsFeb 22, 2007
  2. Added "-kb" to all the entries lines sent to the clientAndy Parkins, Feb 22, 2007
  3. Junio C HamanoFeb 22, 2007
  4. cvsserver: Make always-binary mode a config file optionAndy Parkins, Feb 27, 2007
  5. Martin LanghoffFeb 28, 2007
  6. Andy ParkinsFeb 28, 2007
  7. Martin LanghoffFeb 28, 2007
  8. Andy ParkinsMar 1, 2007
  9. Martin LanghoffMar 1, 2007
  10. Andy ParkinsMar 1, 2007
  11. Junio C HamanoMar 1, 2007
  12. Junio C HamanoMar 1, 2007
  13. Junio C HamanoMar 1, 2007
  14. Andy ParkinsMar 1, 2007
  15. Karl HasselströmMar 1, 2007
  16. cvsserver: Make always-binary mode a config file optionAndy Parkins, Feb 27, 2007
  17. Junio C HamanoFeb 27, 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.