projects
/
forks
/
stagit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df3ea10
)
refs_cmp: simplify check, functionally the same
author
Hiltjo Posthuma
<hiltjo@codemadness.org>
Sat, 21 May 2016 16:37:53 +0000
(18:37 +0200)
committer
Hiltjo Posthuma
<hiltjo@codemadness.org>
Sat, 21 May 2016 16:37:53 +0000
(18:37 +0200)
stagit.c
patch
|
blob
|
history
diff --git
a/stagit.c
b/stagit.c
index f97ade984f8a08cbd370f4d39e878f999e0e9d56..e20c3706658d5173b05dac026b2b91d1ba6b683c 100644
(file)
--- a/
stagit.c
+++ b/
stagit.c
@@
-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));