From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
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 23:09:59 +0530 [thread overview]
Message-ID: <20100926173956.GA15143@kytes> (raw)
In-Reply-To: <vpqmxr4piyf.fsf@bauges.imag.fr>
Hi Matthieu,
Matthieu Moy writes:
> I totally agree on the idea, and the implementation is OK. On the
> format of the message, you can try to make it more consistent with
> other error messages, like:
Thanks for the review.
> $ git merge branch
> error: The following untracked working tree files would be overwritten by merge:
> one
> two
> Please move or remove them before you can merge.
>
> That would give stg like:
>
> echo >&2 "error: The following files have unstaged changes:"
> git diff-files --name-status -r --ignore-submodules -- >&2
> echo >&2 "Please commit or stash them to proceed."
Ok, sounds good.
> 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. 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 :)
-- Ram
next prev parent reply other threads:[~2010-09-26 17:41 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 [this message]
2010-09-26 18:46 ` Matthieu Moy
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=20100926173956.GA15143@kytes \
--to=artagnon@gmail.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--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 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).