git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Andy Parkins <andyparkins@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Added "-kb" to all the entries lines sent to the client
Date: Thu, 22 Feb 2007 12:37:28 -0800	[thread overview]
Message-ID: <7v4ppedj3r.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <200702221606.42638.andyparkins@gmail.com> (Andy Parkins's message of "Thu, 22 Feb 2007 16:06:42 +0000")

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++;
}

  reply	other threads:[~2007-02-22 20:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22 15:04 git-cvsserver and binary files Andy Parkins
2007-02-22 16:06 ` [PATCH] Added "-kb" to all the entries lines sent to the client Andy Parkins
2007-02-22 20:37   ` Junio C Hamano [this message]
2007-02-27 13:45     ` [PATCH] cvsserver: Make always-binary mode a config file option Andy Parkins
2007-02-28 11:36       ` Martin Langhoff
2007-02-28 13:01         ` Andy Parkins
2007-02-28 23:40           ` Martin Langhoff
2007-03-01  8:40             ` Andy Parkins
2007-03-01  9:13               ` Martin Langhoff
2007-03-01  9:41                 ` Andy Parkins
2007-03-01  9:46                   ` Junio C Hamano
2007-03-01 10:04                     ` Junio C Hamano
2007-03-01 11:03                       ` Junio C Hamano
2007-03-01 11:40                         ` Andy Parkins
2007-03-01 11:44                         ` Karl Hasselström
2007-02-27 13:46     ` Andy Parkins
2007-02-27 23:56       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v4ppedj3r.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).