Skip to content
  • Jeff King's avatar
    status: suggest "git rm --cached" to unstage for initial commit · ff58b9aa
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    It makes no sense to suggest "git reset HEAD" since we have
    no HEAD commit. This actually used to work but regressed in
    f26a0012
    
    .
    
    wt_status_print_cached_header was updated to take the whole
    wt_status struct rather than just the reference field.
    Previously the various code paths were sometimes sending in
    s->reference and sometimes sending in NULL, making the
    decision on whether this was an initial commit before we
    even got to this function. Now we must check the initial
    flag here.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    ff58b9aa