Skip to content
  • Kaartic Sivaraam's avatar
    status: contextually notify user about an initial commit · 4ddb1354
    Kaartic Sivaraam authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The existing message, "Initial commit", makes sense for the commit template
    notifying users that it's their initial commit, but is confusing when
    merely checking the status of a fresh repository (or orphan branch)
    without having any commits yet.
    
    Change the output of "status" to say "No commits yet" when "git
    status" is run on a fresh repo (or orphan branch), while retaining the
    current "Initial commit" message displayed in the template that's
    displayed in the editor when the initial commit is being authored.
    
    Correspondingly change the output of "short status" to "No commits yet
    on " when "git status -sb" is run on a fresh repo (or orphan branch).
    
    A few alternatives considered were,
    
     * Waiting for initial commit
     * Your current branch does not have any commits
     * Current branch waiting for initial commit
    
    The most succint one among the alternatives was chosen.
    
    [with help on tests from Ævar]
    
    Helped-by: default avatarJunio C Hamano <gitster@pobox.com>
    Signed-off-by: default avatarÆvar Arnfjörð Bjarmason <avarab@gmail.com>
    Signed-off-by: default avatarKaartic Sivaraam <kaarticsivaraam91196@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    4ddb1354