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

Fix GotoDiff for single line only #493

Open
watergear opened this issue Sep 28, 2016 · 3 comments
Open

Fix GotoDiff for single line only #493

watergear opened this issue Sep 28, 2016 · 3 comments

Comments

@watergear
Copy link

watergear commented Sep 28, 2016

results in Git 2.10.0 and Beyond Compare 4.1.6

steps:

  1. add hello.txt with contain "hello world!" and make commit with it
  2. append "new line" into hello.txt
  3. run Git: Diff All Files
  4. stage changes by Git: Add All
  5. remove line "hello world!"
  6. run Git: Diff All Files
  7. stage changes by Git: Add All
  8. run Git: Diff Stages Files

output:

--- a/hello.txt
+++ b/hello.txt
@@ -1 +1,2 @@
-hello world!
\ No newline at end of file
+ hello world!
+ new line
\ No newline at end of file
--- a/hello.txt
+++ b/hello.txt
@@ -1,2 +1 @@
- hello world!
  new line
\ No newline at end of file
--- a/hello.txt
+++ b/hello.txt
@@ -1 +1 @@
-hello world!
\ No newline at end of file
+ new line
\ No newline at end of file

Press Enter Key on that - or + lines.
Dump error message:

No hunk info

@kemayo
Copy link
Owner

kemayo commented Sep 28, 2016

How's it broken?

@watergear
Copy link
Author

This code is failed for above diffs

hunk = re.match(r"^@@ -(\d+),(\d+) +(\d+),(\d+) @@.*", hunk_line)

I have fixed it and will make pull request later.

@watergear
Copy link
Author

watergear commented Sep 28, 2016

pull request #494

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