Skip to content
  • davvid's avatar
    refs: make rev-parse --quiet actually quiet · c41a87dd
    davvid authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    When a reflog is deleted, e.g. when "git stash" clears its stashes,
    "git rev-parse --verify --quiet" dies:
    
    	fatal: Log for refs/stash is empty.
    
    The reason is that the get_sha1() code path does not allow us
    to suppress this message.
    
    Pass the flags bitfield through get_sha1_with_context() so that
    read_ref_at() can suppress the message.
    
    Use get_sha1_with_context1() instead of get_sha1() in rev-parse
    so that the --quiet flag is honored.
    
    Signed-off-by: default avatarDavid Aguilar <davvid@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    c41a87dd