thebaselab / codeapp

Building a full-fledged code editor for iPad
https://code.thebaselab.com
MIT License
2.95k stars 202 forks source link

Git does not work properly when filename contains Chinese characters #43

Closed l61012345 closed 3 years ago

l61012345 commented 3 years ago

Hi, when I tapped massages and submitted my changes and pull to repo, the changes in code app still existed and I found I have submitted a commit without any changes on my GitHub repo. Thank you.

bummoblizard commented 3 years ago

Hello. Please first see if the article helps: https://github.com/thebaselab/codeapp/blob/main/documentation/working-with-version-control.md

Did you push to the repository? What do you mean the changes still existed in the app? What is the expected behavior? Any form of screenshots would also be appreciated.

l61012345 commented 3 years ago

Thank you for your light-speed response.

Plz let me tell you with the pics and an example. I have made some changes for the file "计算机结构基础.md" then I randomly typed "ddd" and tapped the "√" and "..." then push to the remote repo, but then I found this change is still on my iPad and not submitted onto the github like this pic shows.

l61012345 commented 3 years ago

After several tries, now a new issue comes: when I push to the remote, the git bash of Code App will error me "not a valid reference 'HEAD'".

bummoblizard commented 3 years ago

You are in detached head mode. When in detached head mode, you cannot make any commits to the repository.

Save your changes elsewhere and switch to the branch you are working on (usually named main or master): AAEDDF1B-BB4F-4F52-AF54-C6847ABB7723

Commit your changes by tapping on the check button and push. 5ED802DC-B1B7-4074-8C08-0D01CAC72522

l61012345 commented 3 years ago

Thank you for your support. Finally I retored the app and reclone my repo then it is now OK. I find before my reinstallation, the buttom "+" is not working(cannot be tapped) which leads to the issue I reported firstly. After I reinstalled it, the temporary save buttom"+" can be tapped. Deeply, I found this issue "+" is not working(cannot be tapped) is caused by renaming the filename in simple Chinese Character. I can reiteration it. And this issue is permanent if I once tried to rename a file with simple Chinese Character. Really thank you.

l61012345 commented 3 years ago

Meanwhile, if you try to rename a file in simple Chinese characters, the file change will permanently not disappear even you submit and pull the changes to the remote.

bummoblizard commented 3 years ago

Thank you for your support. Finally I retored the app and reclone my repo then it is now OK. I find before my reinstallation, the buttom "+" is not working(cannot be tapped) which leads to the issue I reported firstly. After I reinstalled it, the temporary save buttom"+" can be tapped. Deeply, I found this issue "+" is not working(cannot be tapped) is caused by renaming the filename in simple Chinese Character. I can reiteration it. And this issue is permanent if I once tried to rename a file with simple Chinese Character. Really thank you.

不要客气! 😃 关于中文名字的bug我以后会修复的

l61012345 commented 3 years ago

The temporary solution is to reinstall this application.
感谢这么晚秒回我! 另外还有一个关于中文的bug是如果新建文件中文件名包含中文名字,则文件名会自动转换为乱码 如果强行修改为中文,那么文件名最多只支三个中文字符并触发上述提到的bug。(大学生党,因为用markdown做笔记所以才会用中文字符做文件名)

bummoblizard commented 3 years ago

Fixed in TestFlight build.