git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "John Lin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 0/1] status: remove the empty line after hints
Date: Tue, 04 Jun 2019 07:02:20 -0700 (PDT)	[thread overview]
Message-ID: <pull.196.v2.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.196.git.gitgitgadget@gmail.com>

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

  parent reply	other threads:[~2019-06-04 14:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 10:54 [PATCH 0/1] status: remove the empty line after hints John Lin via GitGitGadget
2019-05-15 10:54 ` [PATCH 1/1] " John Lin via GitGitGadget
2019-05-28  7:42   ` 林自均
2019-05-28 20:40     ` Junio C Hamano
2019-05-28 23:08       ` 林自均
2019-05-29 11:51         ` Johannes Schindelin
2019-06-01  1:12           ` 林自均
2019-06-03 14:17             ` Johannes Schindelin
2019-06-03 15:06               ` 林自均
2019-06-04 13:37                 ` Johannes Schindelin
2019-06-04 14:02 ` John Lin via GitGitGadget [this message]
2019-06-04 14:02   ` [PATCH v2 " John Lin via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.196.v2.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).