diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2017-09-27 02:56:19 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-27 04:07:44 +0300 |
commit | 0cd83283dfd2a22b3f95cbee6eaef196e6bde77d (patch) | |
tree | 29ad92cff6879bb372b459ce6e71cbedb91b75e5 /pkt-line.h | |
parent | 7451fcdc0d3cffdb9aa79d2651830b44a8e052d6 (diff) |
connect: in ref advertisement, shallows are last
Currently, get_remote_heads() parses the ref advertisement in one loop,
allowing refs and shallow lines to intersperse, despite this not being
allowed by the specification. Refactor get_remote_heads() to use two
loops instead, enforcing that refs come first, and then shallows.
This also makes it easier to teach get_remote_heads() to interpret other
lines in the ref advertisement, which will be done in a subsequent
patch.
As part of this change, this patch interprets capabilities only on the
first line in the ref advertisement, printing a warning message when
encountering capabilities on other lines.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pkt-line.h')
0 files changed, 0 insertions, 0 deletions