threads / discuss / 24579

"clean" filter breaks git-svn

Subject: "clean" filter breaks git-svn

## tl;dr

3 messages between Jul 30, 2010 and Jul 30, 2010.

replies: 2people: 3as markdown or json

Matt Wozniski· Jul 30, 2010, 03:55 UTC · lore

I'm playing around with smudge and clean filters, and I've discovered that they seem to completely break git-svn. When trying to fetch commits A and B from the SVN repos, it will fetch A, and then clean(A) is committed to my repository. Then when it tries to fetch B, it is horribly confused - it complains of a checksum mismatch, since the md5sums of the files in A in the SVN repos don't match up with the md5sums of the files in the clean(A) commit in git land. Is this a known problem? And, are there any work arounds other than just not using filters when using git-svn? Could git-svn be made to accept the md5sum of *either* A or clean(A) instead?

Thanks!
~Matt
PS - Please CC me if possible; I'm not subscribed
Jonathan Nieder· Jul 30, 2010, 20:31 UTC · re: Matt Wozniski · lore

Re: "clean" filter breaks git-svn

Hi Matt,
Matt Wozniski wrote:
Show 6 quoted lines
>                                              When trying to fetch
> commits A and B from the SVN repos, it will fetch A, and then clean(A)
> is committed to my repository.  Then when it tries to fetch B, it is
> horribly confused - it complains of a checksum mismatch, since the
> md5sums of the files in A in the SVN repos don't match up with the
> md5sums of the files in the clean(A) commit in git land.
Interesting.  Yeah, that sounds like a bug.

I am not convinced cleaning fetched files is the right thing to do in the first place (why not just trust the SVN repo?), but I assume people with workflows involving such filters could make a better call.

> Is this a
> known problem?
There is no test for it in git.git, so in that sense no.
>                                    Could git-svn be made to accept the
> md5sum of *either* A or clean(A) instead?

I don’t think that would be right. It’s not just the md5sums not matching that is the problem; it is that in these situations git-svn and the SVN server do not agree about the file’s current content.

Once the code makes the semantics clear, I assume it should Just Work™.

Good luck, Jonathan

Junio C Hamano· Jul 30, 2010, 21:21 UTC · re: Jonathan Nieder · lore

Re: "clean" filter breaks git-svn

Jonathan Nieder <jrnieder@gmail.com> writes:
> Interesting.  Yeah, that sounds like a bug.
>
> I am not convinced cleaning fetched files is the right thing to do in
> the first place (why not just trust the SVN repo?),...

My knee-jerk reaction was that it isn't even about _trusting_, but mirroring what happened on the other side of the world faithfully.

If you clean what you got from the other side, and then build on top of that result, how are you supposed to send your contributions back to the other side which does not have the same clean-up?

← back to recent threads