Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Commit problems with German characters using SourceTree

j_krawczyk October 4, 2015

Hello to everyone,

I have one problem with SourceTree since months. I am Delphi programmer and my IDE saves source files in standard ASCII format. In lines, where I am writing German comments (containing non-Latin letters like ö, ß, ä) there is not possible to commit them using "Stage hunk" button. I see the following error message then:

'git apply' failed with code 1: Checking patch xxx...
error: while searching for:

OVNI_PREFIX = 'ovni_'; // Standardname f�r Videoschnittstellen-DLL

error: patch failed: xxx:148
error: xxx: patch does not apply

I could commit the whole file and then everything is done, but committing only few lines is sometimes very useful for me.

I tried to change the file encoding into UTF8, but it does not help.

I am using embedded version of git (1.9.5).

7 answers

2 votes
j_krawczyk October 8, 2015

Thanks, I published the issue and it is active on this address: https://jira.atlassian.com/browse/SRCTREEWIN-3810

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2015

Or stage/commit those hunks from the command line.

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2015

Still might be a git bug, but SourceTree's not giving enough info about what commands it is running. I think you should post a bug report at jira.atlassian.com, and put a link here as an answer so others can find it. In the meantime, you may need to avoid non-Latin characters in your code.

0 votes
j_krawczyk October 8, 2015

Sorry, I meant "git add -p filename". I've corrected it in my comment later. It works in git without errors as I've mentioned, in SourceTree I receive the error on staging or discarding the hunk. Please look on this screenshot: http://i.imgur.com/8wTsJx0.png.

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2015

What if you try "git add -p"? This is more like the command sourcetree is running when you stage hunks.

0 votes
j_krawczyk October 5, 2015

Thank for your comment Seth. Yes, I tried with command "git add -p filename" and "git reset -p filename" and it does work without any error.

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 5, 2015

Try to commit from the command line. That'll clear up whether the bug is with SourceTree or Git.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events