All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ferry Huberts (Pelagic)" <ferry.huberts@pelagic.nl>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: CVS import [SOLVED]
Date: Mon, 16 Feb 2009 18:33:44 +0100	[thread overview]
Message-ID: <4999A378.2040905@pelagic.nl> (raw)
In-Reply-To: <alpine.DEB.1.00.0902161451210.6289@intel-tinevez-2-302>

Johannes Schindelin wrote:
> Hi,
>
> On Mon, 16 Feb 2009, Johannes Schindelin wrote:
>
>   
>> On Mon, 16 Feb 2009, Ferry Huberts (Pelagic) wrote:
>>
>>     
>>> I solved it:
>>>
>>> it has to do with the
>>> core.autocrlf=input
>>> core.safecrlf=true
>>>
>>> settings I had in my global config.
>>>       
>> Thanks!
>>
>>     
>>> Maybe the manual page should warn against having these defined?
>>>       
>> Maybe it should be solved differently?  As cvsimport needs to operate with 
>> autocrlf=false, it seems, it could set that variable when it creates a 
>> repository, and check the variable otherwise (erroring out if it is set 
>> inappropriately)?
>>     
>
> IOW something like this:
>
> -- snip --
>  git-cvsimport.perl |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/git-cvsimport.perl b/git-cvsimport.perl
> index e439202..a27cc94 100755
> --- a/git-cvsimport.perl
> +++ b/git-cvsimport.perl
> @@ -562,12 +562,16 @@ my %index; # holds filenames of one index per branch
>  unless (-d $git_dir) {
>  	system("git-init");
>  	die "Cannot init the GIT db at $git_tree: $?\n" if $?;
> +	system("git-config core.autocrlf false");
> +	die "Cannot set core.autocrlf false" if $?;
>  	system("git-read-tree");
>  	die "Cannot init an empty tree: $?\n" if $?;
>  
>  	$last_branch = $opt_o;
>  	$orig_branch = "";
>  } else {
> +	die "Cannot operate with core.autocrlf other than 'false'"
> +		if (`git-config --bool core.autocrlf` =~ /true|input/);
>  	open(F, "git-symbolic-ref HEAD |") or
>  		die "Cannot run git-symbolic-ref: $!\n";
>  	chomp ($last_branch = <F>);
> -- snap --
>
> If you could add a test to t9600 and a few words to the man page, that 
> would be awesome.
>
> Ciao,
> Dscho
>
> P.S.: I think the same strategy should be applied to git-svn...
>   
I'm willing to give it a stab but I'm not versed on Perl at all. C and 
Java I can do without breaking a sweat though.
Isn't it a better idea to have the original authors do this? They 
understand the code.
Also, doing this would constitute my first patch to git. I'm unfamiliar 
with its codebase and the requirements of the people that contribute to 
it. Willing to learn though :-)
My patches would then probably need some review and would take a bit 
longer to develop. If that's acceptable then I'm willing to try.

Ferry

  reply	other threads:[~2009-02-16 17:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-16  9:17 CVS import Ferry Huberts (Pelagic)
2009-02-16 13:20 ` CVS import [SOLVED] Ferry Huberts (Pelagic)
2009-02-16 13:45   ` Johannes Schindelin
2009-02-16 13:53     ` Johannes Schindelin
2009-02-16 17:33       ` Ferry Huberts (Pelagic) [this message]
2009-02-16 18:11         ` Johannes Schindelin
2009-02-16 20:32   ` Ferry Huberts (Pelagic)
2009-02-16 20:59     ` Johannes Schindelin
2009-02-17 11:19       ` Ferry Huberts (Pelagic)
2009-02-17 14:18         ` Johannes Schindelin
2009-02-17 15:16           ` Ferry Huberts (Pelagic)
2009-02-20 15:28       ` Jeff King
2009-02-20 16:25         ` Ferry Huberts (Pelagic)
2009-02-20 17:29           ` autocrlf=input and safecrlf (was Re: CVS import [SOLVED]) Jeff King
2009-02-20 23:24             ` Ferry Huberts (Pelagic)
2009-02-23  0:08               ` Jeff King
2009-02-23  6:50                 ` Ferry Huberts (Pelagic)
2009-02-23  6:56                   ` Jeff King
2009-02-23  7:09                     ` Ferry Huberts (Pelagic)
2009-02-23  7:10                       ` Jeff King
2009-02-23  7:29                         ` Ferry Huberts (Pelagic)
2009-02-24  6:11                           ` Jeff King
2009-02-24  9:25                             ` Ferry Huberts (Pelagic)
2009-02-25  6:56                               ` Jeff King
2009-02-25  8:03                                 ` Ferry Huberts (Pelagic)
2009-02-25  9:03                                   ` Jeff King

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=4999A378.2040905@pelagic.nl \
    --to=ferry.huberts@pelagic.nl \
    --cc=Johannes.Schindelin@gmx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.