Skip to content

Commit

Permalink
Better "Changed but not updated" message in git-status
Browse files Browse the repository at this point in the history
Older Gits talked about "updating" a file to add its content to the
index, but this terminology is confusing for new users. "to stage" is far
more intuitive and already used in e.g. the "git stage" command name.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Matthieu Moy authored and Junio C Hamano committed Nov 3, 2010
1 parent 7ebee44 commit 8009d83
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Documentation/gittutorial-2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ $ git status
#
# new file: closing.txt
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
#
# modified: file.txt
Expand Down
34 changes: 17 additions & 17 deletions t/t7508-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cat >expect <<\EOF
#
# new file: dir2/added
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -73,7 +73,7 @@ cat >expect <<\EOF
# Changes to be committed:
# new file: dir2/added
#
# Changed but not updated:
# Changes not staged for commit:
# modified: dir1/modified
#
# Untracked files:
Expand Down Expand Up @@ -140,7 +140,7 @@ cat >expect <<EOF
#
# new file: dir2/added
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand All @@ -167,7 +167,7 @@ cat >expect <<EOF
# Changes to be committed:
# new file: dir2/added
#
# Changed but not updated:
# Changes not staged for commit:
# modified: dir1/modified
#
# Untracked files not listed
Expand Down Expand Up @@ -202,7 +202,7 @@ cat >expect <<EOF
#
# new file: dir2/added
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -260,7 +260,7 @@ cat >expect <<EOF
#
# new file: dir2/added
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -320,7 +320,7 @@ cat >expect <<\EOF
#
# new file: ../dir2/added
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -392,7 +392,7 @@ cat >expect <<\EOF
#
# <GREEN>new file: dir2/added<RESET>
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -521,7 +521,7 @@ cat >expect <<\EOF
#
# new file: dir2/added
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -614,7 +614,7 @@ cat >expect <<EOF
# new file: dir2/added
# new file: sm
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -673,7 +673,7 @@ cat >expect <<EOF
# new file: dir2/added
# new file: sm
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -718,7 +718,7 @@ test_expect_success 'status -s submodule summary' '

cat >expect <<EOF
# On branch master
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -766,7 +766,7 @@ cat >expect <<EOF
# new file: dir2/added
# new file: sm
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -819,7 +819,7 @@ cat > expect << EOF
#
# modified: sm
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -931,7 +931,7 @@ cat > expect << EOF
#
# modified: sm
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
Expand Down Expand Up @@ -989,7 +989,7 @@ cat > expect << EOF
#
# modified: sm
#
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down Expand Up @@ -1067,7 +1067,7 @@ test_expect_success ".git/config ignore=dirty doesn't suppress submodule summary

cat > expect << EOF
# On branch master
# Changed but not updated:
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
Expand Down
2 changes: 1 addition & 1 deletion wt-status.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static void wt_status_print_dirty_header(struct wt_status *s,
{
const char *c = color(WT_STATUS_HEADER, s);

color_fprintf_ln(s->fp, c, "# Changed but not updated:");
color_fprintf_ln(s->fp, c, "# Changes not staged for commit:");
if (!advice_status_hints)
return;
if (!has_deleted)
Expand Down

0 comments on commit 8009d83

Please sign in to comment.