All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Joshua Jensen <jjensen@workspacewhiz.com>
Subject: Re: [PATCH 1/2] sh-setup: Write a new require_clean_work_tree function
Date: Sun, 26 Sep 2010 20:46:06 +0200	[thread overview]
Message-ID: <vpqtylcgx75.fsf@bauges.imag.fr> (raw)
In-Reply-To: <20100926173956.GA15143@kytes> (Ramkumar Ramachandra's message of "Sun\, 26 Sep 2010 23\:09\:59 +0530")

Ramkumar Ramachandra <artagnon@gmail.com> writes:

>> Also, you probably want to give all the error before you "exit 1",
>> hence stg like:
>
> Hm, is that a good idea? We want the output to be functional and
> indicative: it should tell the user what to do immediately.

Yes, but I find this very painfull when you

$ git do-something
error: you need X before you can do-something
$ do X
$ git do-something
error: Ah, you also need Y before you can do-something

> I'm afraid that displaying both errors will make the output very
> verbose. We can just tell the user about the unstaged changes, and
> wait for them to commit or stash it. Either way, both commit and
> stash will affect the index by default :)

A plain commit will get rid of staged changes, not of unstaged ones.

Your patch shows unstaged changes first. If the only problem was
unstaged changes, then "git stash --keep-index" would be a good
solution. As a user, I prefer knowing both problems to find the right
solution (and avoid trying to solve only unstaged changes before
noticing I need to solve the other one too).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2010-09-26 18:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-25  5:18 What exactly does 'needs update' mean? Joshua Jensen
2010-09-25  6:06 ` Junio C Hamano
2010-09-25 14:16   ` Joshua Jensen
2010-09-25 14:31     ` Joshua Jensen
2010-09-26 15:21       ` [PATCH 0/2] Eliminate cryptic "needs update" error message Ramkumar Ramachandra
2010-09-26 15:21       ` [PATCH 1/2] sh-setup: Write a new require_clean_work_tree function Ramkumar Ramachandra
2010-09-26 16:28         ` Matthieu Moy
2010-09-26 17:39           ` Ramkumar Ramachandra
2010-09-26 18:46             ` Matthieu Moy [this message]
2010-09-26 18:51               ` Ramkumar Ramachandra
2010-09-26 15:21       ` [PATCH 2/2] Porcelain scripts: Rewrite cryptic "needs update" error message Ramkumar Ramachandra
2010-09-26 16:31         ` Matthieu Moy

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=vpqtylcgx75.fsf@bauges.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jjensen@workspacewhiz.com \
    --cc=jrnieder@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.