• 
      

    Fixes broken diffs posted by post-review in subdirs of a git svn work-tree

    Review Request #756 — Created March 2, 2009 and submitted

    Information

    llu
    Review Board SVN (deprecated)
    928

    Reviewers

    Fixes broken diffs posted by post-review in subdirs of a git svn work-tree
    Probably not elegant, but it's simple and works.
    
    There is a --relative option to the git diff command since 1.5.5.x, but many default installation of git for linux is still stuck at 1.5.2.x, so the cd approach is used. However, I want to point out that this is not bullet proof as git can have GIT_DIR defined elsewhere (outside the work tree). But my patch would work for typical installations. Suggestions are welcome, of course.
    
     
    SM
    1. ok
    2. 
        
    LL
    Review request changed
    Change Summary:
    Updated description with more background info.
    Description:
       

    Fixes broken diffs posted by post-review in subdirs of a git svn work-tree

        Probably not elegant, but it's simple and works.

      +
      +

    There is a --relative option to the git diff command since 1.5.5.x, but many default installation of git for linux is still stuck at 1.5.2.x, so the cd approach is used. However, I want to point out that this is not bullet proof as git can have GIT_DIR defined elsewhere (outside the work tree). But my patch would work for typical installations. Suggestions are welcome, of course.

    chipx86
    1. I haven't hit this issue, but I can see how it could cause problems. Looks good, except I changed the two chdirs to one, using the parent directory of the git directory.
      
      Committed as r1811. Thanks!
    2.