Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[che-dev] NativeGit Status fix

Hi,

 

I noticed that Che's implementation for 'git status' in the native git is incorrect.

 

Currently the code the parses the output lines of 'git status --porcelain' perform several hard-coded check for combinations of index-bound and working-tree-bound statuses of files and tries to match them with the status lists populated by native git (added, removed, modified, ...). This non-generalized approach leads to failing to catch several possible cases, consider these two standard git status lines:

<M><D> file1

file1 should appear as both changed and missing, but instead it appears as changed only.

< ><D> file2

file2 should appear as missing, but instead it appears as removed.

 

Also, current code doesn't detect the case a file is deleted by both parties in a conflict.

 

I made pull request for a fix proposal

www.github.com/codenvy/che-plugins/pull/133

Please review and merge if accepted.

 

thank you

Tareq Sharafy

Cloud Development Experience | SAP Labs Israel | 15 Hatidhar st, Raanana 43665, Israel

T +972-(0)7-4732-1647 | F +972-(0)9-777-5618

 


Back to the top