diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2016-05-21 18:37:53 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2016-05-21 18:37:53 +0200 |
commit | 837427b09ea3a592e9b364b180c2011b517ab2c8 (patch) | |
tree | 01a6661061fd02d1150d0955f06a35d8d1f23c8d /stagit.c | |
parent | df3ea10eca41a20aed38a12d9189fb745075e913 (diff) |
refs_cmp: simplify check, functionally the same
Diffstat (limited to 'stagit.c')
-rw-r--r-- | stagit.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -883,13 +883,10 @@ refs_cmp(const void *v1, const void *v2) { git_reference *r1 = (*(git_reference **)v1); git_reference *r2 = (*(git_reference **)v2); - int t1, t2; - - t1 = git_reference_is_branch(r1); - t2 = git_reference_is_branch(r2); + int r; - if (t1 != t2) - return t1 - t2; + if ((r = git_reference_is_branch(r1) - git_reference_is_branch(r2))) + return r; return strcmp(git_reference_shorthand(r1), git_reference_shorthand(r2)); |