6

I'm currently using the following command:

git diff --no-prefix -w trunk > my_beautiful_code.patch

but get the following error when I upload the diff in reviewboard:

No valid separator after the filename was found in the diff header

Is there a way to wrangle git into doing the right thing? The reviewboard is looking for the exact svn format, I believe. I could clone the svn repo, apply the patch, then make the patch with svn but that is tedious and I'd like a cleaner workflow...

Thanks!

Donal Lafferty
  • 5,807
  • 7
  • 43
  • 60
A Question Asker
  • 3,339
  • 7
  • 31
  • 39
  • have you solved the problem? I have the same one – Ivan G. Jun 16 '14 at 09:08
  • 1
    This particular issue is most probably caused by RB accepting **tab character** only **as the separator between file name and revision**. After you fix this, you will face RB requesting revision number already present in the tree. Then it will accept the patch. I can’t possibly express how much pain has SVN and RB caused and how much I appreciate GIT with pull requests. – Mr. Tao Nov 29 '18 at 11:09

1 Answers1

5

This is not a real answer but partially explains the problem.

This is caused by an unexpected (from the RB server point of view) diff syntax. You are missing some extra information which is normally present in the subversion RB diffs.

See this bug for a workaround:

https://hellosplat.com/s/beanbag/tickets/1918/

The bug description suggests you could switch to git-svn or you can write a simple find/replace script to have the diff prepared and fixed for you before uploading to RB.

xverges
  • 4,608
  • 1
  • 39
  • 60
bcelary
  • 1,827
  • 1
  • 17
  • 17