git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: bill lam <cbill.lam@gmail.com>, git <git@vger.kernel.org>
Subject: [PATCH v2] status: list unmerged files last
Date: Tue, 1 Sep 2009 23:25:45 +0200	[thread overview]
Message-ID: <200909012325.45739.j6t@kdbg.org> (raw)
In-Reply-To: <7vy6oy9z9r.fsf@alter.siamese.dyndns.org>

The list of unmerged files is considered rather important because after
a conflicted merge they need attention. Since the output of git status does
not go through the pager, the end of the output remains immediately visible
in the terminal window. By placing unmerge entries at the end of the list,
the user can see them immediately.

Moreover, keeping the unmerge entries at the top is inconvenient if a merge
touched many files, but only a few conflicted: After the conflicts were
resolved, the user will conduct a 'git add' command. In order to do that
with copy-and-paste, the user must scroll the terminal window up, and must
do so for each individual entry (because terminal windows commonly scroll
down automatically on the paste operation to make the cursor visible).

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
On Dienstag, 1. September 2009, Junio C Hamano wrote:
> Johannes Sixt <j6t@kdbg.org> writes:
> > Moreover, keeping the unmerge entries at the top is inconvenient if a
> > merge touched many files, but only a few conflicted: After the conflicts
> > were resolved, the user will conduct a 'git add' command. In order to do
> > that with copy-and-paste, the user must scroll the terminal window up,
> > and must do so for each individual entry (because terminal windows
> > commonly scroll down automatically on the paste operation to make the
> > cursor visible).
>
> I actually was expecting that you would move this at the very bottom after
> untracked list for the above reason, and also because this part is only
> shown while running status (that was a good point you made in the previous
> message) and never in commit.

So you would not mind a more "drastic" change?

This version 2 can be regarded as a real improvement with the argument
above, whereas version 1 would only correct something of some
sort of regression, compared to v1.6.4.

(Originally I didn't dare to change too much and thought keeping staged
files together would make sense.)

-- Hannes

 wt-status.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/wt-status.c b/wt-status.c
index 3395456..60d8425 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -561,7 +561,6 @@ void wt_status_print(struct wt_status *s)
 		color_fprintf_ln(s->fp, color(WT_STATUS_HEADER, s), "#");
 	}
 
-	wt_status_print_unmerged(s);
 	wt_status_print_updated(s);
 	wt_status_print_changed(s);
 	if (s->submodule_summary)
@@ -570,6 +569,7 @@ void wt_status_print(struct wt_status *s)
 		wt_status_print_untracked(s);
 	else if (s->commitable)
 		 fprintf(s->fp, "# Untracked files not listed (use -u option to show untracked 
files)\n");
+	wt_status_print_unmerged(s);
 
 	if (s->verbose)
 		wt_status_print_verbose(s);
-- 
1.6.4.2.280.gb16ab

  reply	other threads:[~2009-09-01 21:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01 14:52 unmerged files listed in the beginning of git-status bill lam
2009-09-01 16:42 ` Junio C Hamano
2009-09-01 19:40   ` Johannes Sixt
2009-09-01 20:13     ` [PATCH] status: list unmerged files after staged files Johannes Sixt
2009-09-01 20:38       ` Junio C Hamano
2009-09-01 21:25         ` Johannes Sixt [this message]
2009-09-02  0:18           ` [PATCH v2] status: list unmerged files last Junio C Hamano
2009-09-02  0:39             ` bill lam
2009-09-02  1:15             ` Jeff King
2009-09-02  4:26               ` Junio C Hamano
2009-09-02  5:12                 ` Jeff King
2009-09-02  5:26                   ` Junio C Hamano
2009-09-02  5:28                     ` Jeff King
2009-09-02 10:07                     ` David Aguilar
2009-09-02 17:59                       ` Jeff King
2009-09-03  1:12                         ` David Aguilar
2009-09-05  6:28                           ` Jeff King
2009-09-05  8:48                             ` Jeff King
2009-09-05  8:50                               ` [PATCH/RFC 1/6] status: typo fix in usage Jeff King
2009-09-05  8:52                               ` [PATCH/RFC 2/6] docs: note that status configuration affects only long format Jeff King
2009-09-06  8:04                                 ` Junio C Hamano
2009-09-05  8:53                               ` [PATCH/RFC 3/6] status: refactor short-mode printing to its own function Jeff King
2009-09-06  8:05                                 ` Junio C Hamano
2009-09-05  8:54                               ` [PATCH/RFC 4/6] status: refactor format option parsing Jeff King
2009-09-05  8:55                               ` [PATCH/RFC 5/6] status: add --porcelain output format Jeff King
2009-09-05  8:59                               ` [PATCH/RFC 6/6] commit: support alternate status formats Jeff King
2009-09-05  9:08                               ` [PATCH v2] status: list unmerged files last Jeff King
2009-09-02 19:19                       ` Johannes Sixt
2009-09-02 12:48                   ` Mark Brown
2009-09-02 18:00                     ` Jeff King
2009-09-02 18:39                       ` Mark Brown
2009-09-05  9:04                         ` Jeff King
2009-09-05 11:39                           ` Mark Brown
2009-09-02  9:04     ` unmerged files listed in the beginning of git-status bill lam

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

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

  git send-email \
    --in-reply-to=200909012325.45739.j6t@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=cbill.lam@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.
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 NNTP newsgroup(s).