Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recountdiff sometimes corrupts headers on new files #49

Open
vapier opened this issue Mar 9, 2021 · 1 comment
Open

recountdiff sometimes corrupts headers on new files #49

vapier opened this issue Mar 9, 2021 · 1 comment

Comments

@vapier
Copy link

vapier commented Mar 9, 2021

test case from this repo itself

$ git format-patch -1 9b2c63001e046f46defa31a3552c144804421f20
0001-Patchview-addon-are-3-bash-and-1-python-scripts.patch

$ perl ./scripts/recountdiff 0001-Patchview-addon-are-3-bash-and-1-python-scripts.patch > new

$ diff -u 0001-Patchview-addon-are-3-bash-and-1-python-scripts.patch new
--- 0001-Patchview-addon-are-3-bash-and-1-python-scripts.patch  2021-03-08 19:45:06.264198350 -0500
+++ new 2021-03-08 19:46:13.017530685 -0500
@@ -202,7 +202,7 @@
 index 000000000000..d9e474d259e2
 --- /dev/null
 +++ b/patchview/svndiffview
-@@ -0,0 +1,20 @@
+@@ -1 +1,20 @@
 +#!/bin/sh
 +#
 +# Copyright (C) 2014-2019 Sérgio Basto <[email protected]>

$ git checkout 9b2c63001e046f46defa31a3552c144804421f20^
HEAD is now at 59182fb144a2 doc/patchutils.xml with patchview

$ patch -p1 --dry-run < 0001-Patchview-addon-are-3-bash-and-1-python-scripts.patch 
checking file Makefile.am
checking file patchview/README.patchview
checking file patchview/gitdiff
checking file patchview/gitdiffview
checking file patchview/svndiff
checking file patchview/svndiffview

$ patch -p1 --dry-run < new 
checking file Makefile.am
checking file patchview/README.patchview
checking file patchview/gitdiff
checking file patchview/gitdiffview
checking file patchview/svndiff
checking file patchview/svndiffview
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED
@ryanmoe-at-clinicomp-com

I can confirm this is still an issue. The patch file I am editing that adds a new file, when run against recountdiff, changes "-0,0" to "-1" and the patch can no longer apply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants