-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Stage selected lines broken on master #730
Comments
Would it be possible to reproduce this using a recipe or public repo? There's probably something particular about the specific diff that needs to be handled (for example, the diff's location within the file affects the diff header line). There's a temp file that cola writes that could be useful to inspect as well. The line where it does The diff writer probably has an edge case it needs to handle. I use stage selected all the time and it's been working reliably (for me) so there could be a usage pattern I'm not hitting. |
Unfortunately the repo is not public. I've verified that this happens only on one particular file, for other files the functionality is working well.
I'm on Mac, I launch git-cola from the shell and I've launched it from the repo root and from another directory: in both cases the issue is the same. |
I'm led to believe that git itself might be expecting a slightly different diff header for this hunk. The output above, I presume, is from cola's generated patch file. If you run |
I managed to trim down the issue and reproduce it into a public repo: |
Awesome.. how do I reproduce it, should I just edit the file to add that same line as above? I noticed that the file has CRLF when you edit, is your editor adding CRLF, or is it possibly adding LF Update: adding the line using CRLF just like the rest of the file reproduces the issue. We probably need to better handle files with CRLF line endings. |
Signed-off-by: David Aguilar <davvid@gmail.com>
Support files with CRLF line endings when staging interactively. * crlf: diffparse: properly handle files with CRLF line endings doc/relnotes/v3.0: update release notes draft to mention git-cola#730 doc: add Luca to the credits Closes git-cola#730 Helped-by: Luca Ottaviano <lottaviano@develer.com> Signed-off-by: David Aguilar <davvid@gmail.com>
The diff parser now retains the original line endings. Update tests to expect the new semantics. Related-to: git-cola#730 Signed-off-by: David Aguilar <davvid@gmail.com>
It looks like that stage selected lines is broken on master branch, as well as on version 2.11 as released on homebrew.
I'm trying to stage a single hunk, and I get an error while applying the patch, in cmds.py:235
The error returned is:
Backtrace:
I've verified that I can stage the same hunk using git gui.
The text was updated successfully, but these errors were encountered: