* help with cvsimport
@ 2007-06-23 9:11 Raimund Bauer
2007-06-23 11:27 ` Johannes Schindelin
0 siblings, 1 reply; 3+ messages in thread
From: Raimund Bauer @ 2007-06-23 9:11 UTC (permalink / raw)
To: git
Hi,
I unfortunately have to work with several cvs-repositories and was
wondering if there was a way to have the files processed on import:
- strip trailing whitespace
- convert to newline-only line endings
Knowing git there probably is already a way to do that - I'd appreciate
any rtfm-pointers ...
Many thanks in advance
--
best regards
Ray
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: help with cvsimport
2007-06-23 9:11 help with cvsimport Raimund Bauer
@ 2007-06-23 11:27 ` Johannes Schindelin
2007-06-24 9:37 ` Raimund Bauer
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2007-06-23 11:27 UTC (permalink / raw)
To: Raimund Bauer; +Cc: git
Hi,
On Sat, 23 Jun 2007, Raimund Bauer wrote:
> I unfortunately have to work with several cvs-repositories and was
> wondering if there was a way to have the files processed on import:
> - strip trailing whitespace
> - convert to newline-only line endings
If you want to use cvsimport incrementally, I'd rather not process the
"origin" branch like this, but rather use git-filter-branch (with a simple
index filter) to do that.
Even if you do not want to use it incrementally, it seems easier and
cleaner (if somewhat slower) to me.
So, something like
git filter-branch --index-filter 'git ls-files |
while read name; do
perl -pi -e "s/[ \009\015]*$//" "$name"
done
git add -u' cleaned-up-origin
should do.
Hth,
Dscho
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: help with cvsimport
2007-06-23 11:27 ` Johannes Schindelin
@ 2007-06-24 9:37 ` Raimund Bauer
0 siblings, 0 replies; 3+ messages in thread
From: Raimund Bauer @ 2007-06-24 9:37 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
Hi,
* Johannes Schindelin wrote, On 23.06.2007 13:27:
> Hi,
>
> On Sat, 23 Jun 2007, Raimund Bauer wrote:
>
>
>> I unfortunately have to work with several cvs-repositories and was
>> wondering if there was a way to have the files processed on import:
>> - strip trailing whitespace
>> - convert to newline-only line endings
>>
>
> If you want to use cvsimport incrementally, I'd rather not process the
> "origin" branch like this, but rather use git-filter-branch (with a simple
> index filter) to do that.
>
> Even if you do not want to use it incrementally, it seems easier and
> cleaner (if somewhat slower) to me.
>
> So, something like
>
> git filter-branch --index-filter 'git ls-files |
> while read name; do
> perl -pi -e "s/[ \009\015]*$//" "$name"
> done
> git add -u' cleaned-up-origin
>
> should do.
>
Thanks, will try that out.
Tough I'm not very happy about having to create an extra branch for
every branch I want to work with.
And a git-solution would also respect git-attributes ...
> Hth,
> Dscho
>
--
best regards
Ray
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-24 9:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-23 9:11 help with cvsimport Raimund Bauer
2007-06-23 11:27 ` Johannes Schindelin
2007-06-24 9:37 ` Raimund Bauer
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).