threads / discuss / 47892

test bare repository for unit tests

Subject: test bare repository for unit tests

## tl;dr

3 messages between Feb 21, 2018 and Feb 22, 2018.

replies: 2people: 2as markdown or json

Basin Ilya· Feb 21, 2018, 08:33 UTC · lore

Hi. I want to the test-repo-git under https://github.com/apache/maven-wagon/tree/master/wagon-providers/wagon-scm/src/test/resources/ just like test-repo-cvs and test-repo-svn

Which configuation options would suit that? I think core.compression 0 for human readable diffs. also, I need to force loose, gc after each push.

Ævar Arnfjörð Bjarmason· Feb 21, 2018, 22:53 UTC · re: Basin Ilya · lore

Re: test bare repository for unit tests

On Wed, Feb 21 2018, Basin Ilya jotted:
Show 7 quoted lines
> Hi.
> I want to the test-repo-git under https://github.com/apache/maven-wagon/tree/master/wagon-providers/wagon-scm/src/test/resources/
> just like test-repo-cvs and test-repo-svn
>
> Which configuation options would suit that?
> I think core.compression 0 for human readable diffs.
> also, I need to force loose, gc after each push.

It looks like you have unit tests that are going to do integration tests of some SVN/CVS repos as used by some other tool, and want to add git to that.

Since you have git already, the most straightforward thing to do would be to ship the output of git-fast-export in the repo, and have the test setup code create a repo locally out of that, then test it.

Or do you really need to commit the raw repo files as-is for some reason I've missed?

Basin Ilya· Feb 22, 2018, 07:47 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: test bare repository for unit tests

Hi. git-fast-export would work too, but it creates an additional step. I don't commit to the model repo during tests, but I do commit when I want to modify the tests. So far, I configured core.compression=0 and gc.auto=0, created the .gitattributes inside the bare repo dir containing one line: * binary I also created two empty .gitignore files inside refs/ and objects/

I still haven't found a way to force prune without pack after each push.
On 22.02.2018 1:53, Ævar Arnfjörð Bjarmason wrote:
Show 22 quoted lines
> 
> On Wed, Feb 21 2018, Basin Ilya jotted:
> 
>> Hi.
>> I want to the test-repo-git under https://github.com/apache/maven-wagon/tree/master/wagon-providers/wagon-scm/src/test/resources/
>> just like test-repo-cvs and test-repo-svn
>>
>> Which configuation options would suit that?
>> I think core.compression 0 for human readable diffs.
>> also, I need to force loose, gc after each push.
> 
> It looks like you have unit tests that are going to do integration tests
> of some SVN/CVS repos as used by some other tool, and want to add git to
> that.
> 
> Since you have git already, the most straightforward thing to do would
> be to ship the output of git-fast-export in the repo, and have the test
> setup code create a repo locally out of that, then test it.
> 
> Or do you really need to commit the raw repo files as-is for some reason
> I've missed?
> 

← back to recent threads