From: David Aguilar <davvid@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, Johannes Sixt <j6t@kdbg.org>,
bill lam <cbill.lam@gmail.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH v2] status: list unmerged files last
Date: Wed, 2 Sep 2009 03:07:32 -0700 [thread overview]
Message-ID: <20090902100730.GA18226@gmail.com> (raw)
In-Reply-To: <7vljkxdiil.fsf@alter.siamese.dyndns.org>
On Tue, Sep 01, 2009 at 10:26:26PM -0700, Junio C Hamano wrote:
>
> Here is how I would justify the change (the patch is the same as Hannes's
> first version.
>
> From: Johannes Sixt <j6t@kdbg.org>
> Date: Tue, 1 Sep 2009 22:13:53 +0200
> Subject: [PATCH] status: list unmerged files much later
>
> When resolving a conflicted merge, two lists in the status output need
> more attention from the user than other parts.
>
> - the list of updated paths is useful to review the amount of changes the
> merge brings in (the user cannot do much about them other than
> reviewing, though); and
>
> - the list of unmerged paths needs the most attention from the user; the
> user needs to resolve them in order to proceed.
>
> Since the output of git status does not by default go through the pager,
> the early parts of the output can scroll away at the top. It is better to
> put the more important information near the bottom. During a merge, local
> changes that are not in the index are minimum, and you should keep the
> untracked list small in any case, so moving the unmerged list from the top
> of the output to immediately after the list of updated paths would give us
> the optimum layout..
I agree with all of this but would also add that we can have
our cake and eat it too with respect to wanting to "keep
similar things together" and having "unmerged near bottom".
No one has suggested this, so I figured I would.
What do you think about this layout?
- untracked
- staged
- modified
- unmerged
This isn't the first thing someone would think of, but here's
why it is intuitive:
- untracked entries come first because in the git world they
are weird. We don't like to see these things and we tend to
.gitignore them away.
- staged entries come next, though we know that in practice
staged is often shown first since we tend to not care about
untracked files. This often contains entries when merging
but we do not often do much with these besides review them.
- modified entries come next because they need our attention.
When merging this list is often small or non-existant,
thus unmerged often follows immediately after staged.
- unmerged comes last for all of the reasons listed above.
We give these special treatment because they often
require even more attention than modified files.
What do you guys think?
While I've got you guys.. I have a patch for the new 1.7
status that makes it:
git status [<tree-ish>] [--] [pathspec]
(it adds support for tree-ish)
I added that because I thought that the porcelain-ish short
status output could be useful for "what does commit --amend
do" from a script-writers' pov, and thus adding <tree-ish>
enables git status -s HEAD^.
Is this a good idea? I'll send the patch if others are
interested. It seemed useful to me; my rationale was that
right now git-status is hardcoded to HEAD and thus exposing
that variable seemed useful.
BTW is status -s intended to be something plumbing-like;
something we can build upon and expect to be stable?
I'm just curious because other commands have a --porcelain
option and I wasn't sure if this was the intent.
Thanks,
--
David
next prev parent reply other threads:[~2009-09-02 10:07 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 ` [PATCH v2] status: list unmerged files last Johannes Sixt
2009-09-02 0:18 ` 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 [this message]
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=20090902100730.GA18226@gmail.com \
--to=davvid@gmail.com \
--cc=cbill.lam@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=peff@peff.net \
/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).