• A
    graph API: fix "git log --graph --first-parent" · a0ebe573
    Adam Simpkins 提交于
    This change teaches the graph API that only the first parent of each
    commit is interesting when "--first-parent" was specified.
    
    This change also consolidates the graph parent walking logic into two
    new internal functions, first_interesting_parent() and
    next_interesting_parent().  A simpler fix would have been to simply
    break at the end of the 2 existing for loops when
    graph->revs->first_parent_only is set.  However, this change seems
    nicer, especially if we ever need to add any new loops over the parent
    list in the future.
    Signed-off-by: NAdam Simpkins <adam@adamsimpkins.net>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    a0ebe573
graph.c 28.4 KB