Review Request 115121: Change the command to get the current branch name for git, to make it also work for empty repositories

Heinz Wiesinger pprkut at liwjatan.at
Sun Jan 19 12:51:55 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115121/
-----------------------------------------------------------

Review request for KDevelop.


Repository: kdevplatform


Description
-------

- Change the command to get the current branch name for git.

"git sumbolic-ref" also provides a valid branch name when the
repository is empty. In detached HEAD state it has an empty
output, which is exactly what we did before manually. However,
in that case it also returns with a non-zero exit code which
we need to ignore.

- Add an ignoreError flag to the DVcsJob class.

This allows ignoring non-zero exit codes and treat the Job as though
it completed successfully. This is useful if the output of the Job
already contains sufficient information so that handling a special
error code is no longer necessary.


Diffs
-----

  plugins/git/gitplugin.cpp 4b5e54b12a7c54604e8c99de0418c7c4bbe82b3b 
  vcs/dvcs/dvcsjob.h 2a45ab1b4abb4c23176b74144c477a49cb8cb8b8 
  vcs/dvcs/dvcsjob.cpp 6b5a645b3ee63d10c890b35bdb85e459f5278ccc 

Diff: https://git.reviewboard.kde.org/r/115121/diff/


Testing
-------

Local testing with empty repository, detached HEAD and standard branches.


Thanks,

Heinz Wiesinger

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140119/dd11e757/attachment.html>


More information about the KDevelop-devel mailing list