Re: [PATCH v2 3/4] show-ref: Optimize show_ref a bit

2017-01-22 Thread Junio C Hamano
Junio C Hamano writes: > Having to do this change probably is an indication that the division > of labour between show_ref() and show_one() up to this step needs to > be rethought. > > Conceptually, "git show-ref" works in two ways: > > * When in --verify mode, the end user gives which refnames

Re: [PATCH v2 3/4] show-ref: Optimize show_ref a bit

2017-01-22 Thread Junio C Hamano
Vladimir Panteleev writes: > The inner `if (verify)' check was not being used before the preceding > commit, as show_ref was never being called from a code path where > verify was non-zero. > > Adding a `!verify' check to the outer if skips an unnecessary string > comparison when verify is non-ze

[PATCH v2 3/4] show-ref: Optimize show_ref a bit

2017-01-20 Thread Vladimir Panteleev
The inner `if (verify)' check was not being used before the preceding commit, as show_ref was never being called from a code path where verify was non-zero. Adding a `!verify' check to the outer if skips an unnecessary string comparison when verify is non-zero, and show_ref is already called with