commit | 887f3533fd764722ffb6e4ea34c01ad9256f0186 | [log] [tgz] |
---|---|---|
author | Junio C Hamano <gitster@pobox.com> | Fri Aug 15 11:37:01 2014 -0700 |
committer | Junio C Hamano <gitster@pobox.com> | Mon Sep 15 13:23:19 2014 -0700 |
tree | cb7084c019f7fc0036703328022e9dd89c27b991 | |
parent | 64de20a1265b676f9cc0e5f46379a017560fa333 [diff] |
send-pack: factor out capability string generation A run of 'var ? " var" : ""' fed to a long printf string in a deeply nested block was hard to read. Move it outside the loop and format it into a strbuf. As an added bonus, the trick to add "agent=<agent-name>" by using two conditionals is replaced by a more readable version. Signed-off-by: Junio C Hamano <gitster@pobox.com>