[PATCH v2 0/1] status: remove the empty line after hints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Before this patch, there is inconsistency between the status messages with
hints and the ones without hints: there is an empty line between the title
and the file list if hints are presented, but there isn't one if there are
no hints.

This patch remove the inconsistency by removing the empty lines even if
hints are presented.

John Lin (1):
  status: remove the empty line after hints

 t/t7060-wtstatus.sh    |  5 ----
 t/t7508-status.sh      | 62 ------------------------------------------
 t/t7512-status-help.sh | 14 ----------
 wt-status.c            |  4 ---
 4 files changed, 85 deletions(-)


base-commit: 4e43b7ff1ea4b6f16b93a432b6718e9ab38749bd
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-196%2Fjohnlinp%2Ffix-status-empty-line-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-196/johnlinp/fix-status-empty-line-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/196

Range-diff vs v1:

 1:  468be8f854 ! 1:  7dfb9a4b1a status: remove the empty line after hints
     @@ -59,13 +59,13 @@
      @@
       #
       # Changes to be committed:
     - #   (use "git reset HEAD <file>..." to unstage)
     + #   (use "git restore --staged <file>..." to unstage)
      -#
       #	new file:   dir2/added
       #
       # 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)
     + #   (use "git restore <file>..." to discard changes in working directory)
      -#
       #	modified:   dir1/modified
       #
     @@ -78,13 +78,13 @@
      @@
       #
       # Changes to be committed:
     - #   (use "git reset HEAD <file>..." to unstage)
     + #   (use "git restore --staged <file>..." to unstage)
      -#
       #	new file:   dir2/added
       #
       # 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)
     + #   (use "git restore <file>..." to discard changes in working directory)
      -#
       #	modified:   dir1/modified
       #
     @@ -97,13 +97,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	new file:   dir2/added
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -121,13 +121,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	new file:   dir2/added
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -140,13 +140,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	new file:   dir2/added
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -154,13 +154,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	new file:   dir2/added
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -173,13 +173,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	new file:   dir2/added
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -192,13 +192,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	new file:   ../dir2/added
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   modified
       
     @@ -211,13 +211,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	<GREEN>new file:   dir2/added<RESET>
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	<RED>modified:   dir1/modified<RESET>
       
     @@ -230,13 +230,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	new file:   dir2/added
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -249,7 +249,7 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	modified:   dir1/modified
       
     @@ -262,14 +262,14 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	new file:   dir2/added
       	new file:   sm
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -282,14 +282,14 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	new file:   dir2/added
       	new file:   sm
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -305,7 +305,7 @@
      @@
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -318,14 +318,14 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD^1 <file>..." to unstage)
     +   (use "git restore --source=HEAD^1 --staged <file>..." to unstage)
      -
       	new file:   dir2/added
       	new file:   sm
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -341,13 +341,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	modified:   sm
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -363,13 +363,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	modified:   sm
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
         (commit or discard the untracked or modified content in submodules)
      -
       	modified:   dir1/modified
     @@ -386,13 +386,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	modified:   sm
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       	modified:   sm (new commits)
     @@ -408,13 +408,13 @@
      @@
       ;
       ; Changes to be committed:
     - ;   (use "git reset HEAD <file>..." to unstage)
     + ;   (use "git restore --staged <file>..." to unstage)
      -;
       ;	modified:   sm
       ;
       ; 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)
     + ;   (use "git restore <file>..." to discard changes in working directory)
      -;
       ;	modified:   dir1/modified
       ;	modified:   sm (new commits)
     @@ -430,7 +430,7 @@
      @@
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -443,13 +443,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	modified:   sm
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -462,13 +462,13 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	modified:   sm
       
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   dir1/modified
       
     @@ -495,7 +495,7 @@
       Untracked files not listed (use -u option to show untracked files)
      @@
       Unmerged paths:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
         (use "git add <file>..." to mark resolution)
      -
       	both modified:   main.txt
     @@ -504,14 +504,14 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	modified:   main.txt
       
       Untracked files not listed (use -u option to show untracked files)
      @@
       Unmerged paths:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
         (use "git add <file>..." to mark resolution)
      -
       	both modified:   main.txt
     @@ -520,7 +520,7 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	modified:   main.txt
       
     @@ -528,7 +528,7 @@
      @@
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   main.txt
       
     @@ -536,7 +536,7 @@
      @@
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   main.txt
       
     @@ -544,7 +544,7 @@
      @@
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   main.txt
       
     @@ -552,7 +552,7 @@
      @@
       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)
     +   (use "git restore <file>..." to discard changes in working directory)
      -
       	modified:   main.txt
       
     @@ -575,7 +575,7 @@
       Untracked files not listed (use -u option to show untracked files)
      @@
       Unmerged paths:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
         (use "git add <file>..." to mark resolution)
      -
       	both modified:   to-revert.txt
     @@ -584,7 +584,7 @@
      @@
       
       Changes to be committed:
     -   (use "git reset HEAD <file>..." to unstage)
     +   (use "git restore --staged <file>..." to unstage)
      -
       	modified:   to-revert.txt
       
     @@ -602,15 +602,15 @@
       
       static void wt_longstatus_print_cached_header(struct wt_status *s)
      @@
     - 		status_printf_ln(s, c, _("  (use \"git reset %s <file>...\" to unstage)"), s->reference);
     - 	else
     + 					 s->reference);
     + 	} else
       		status_printf_ln(s, c, _("  (use \"git rm --cached <file>...\" to unstage)"));
      -	status_printf_ln(s, c, "%s", "");
       }
       
       static void wt_longstatus_print_dirty_header(struct wt_status *s,
      @@
     - 	status_printf_ln(s, c, _("  (use \"git checkout -- <file>...\" to discard changes in working directory)"));
     + 	status_printf_ln(s, c, _("  (use \"git restore <file>...\" to discard changes in working directory)"));
       	if (has_dirty_submodules)
       		status_printf_ln(s, c, _("  (commit or discard the untracked or modified content in submodules)"));
      -	status_printf_ln(s, c, "%s", "");

-- 
gitgitgadget



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux