From: konglu@minatec.inpg.fr Date: Fri, 01 Jun 2012 09:16:51 GMT Subject: Re: [PATCHv5 1/3] wt-status.*: better advices for git status added Message-ID: <20120601111651.Horde.R0mdSHwdC4BPyIiDyUHhUVA@webmail.minatec.grenoble-inp.fr> In-Reply-To: <7vmx4o58zc.fsf@alter.siamese.dyndns.org> Junio C Hamano a écrit : > How is your development process work, by the way? Does everybody on > this list have code in this patch? Or are you just listing people > who are in the same class taught by Matthieu who reviewed and > commented on this patch? Basically, we 5 people are in the same group and work together on the same project. Some are more involved into improving the advices in git status, and some are more involved into the XDG configuration but we are all in the same room thus there're a lot of communication so everyone knows what's happening in each topics. Matthieu is helping us when we have technical questions but he doesn't review our code beforehand (he is very busy :p). Btw, we're also working on other small improvements such as the implementation of "git rebase -i --exec ". > And rename "output" to "actual" to match the existing practice > (unless there is a compelling reason not to). We based our coding-style on the t7508-status.sh script which seem to use out-of-date style (some instructions are not in test_expect_success for example). We will use the modern coding style from now on. >> + } else { >> + status_printf_ln(s, color, _("You are currently editing a commit >> during a rebase.")); >> + if (advice_status_hints) { >> + status_printf_ln(s, color, _(" You can amend the commit with")); >> + status_printf_ln(s, color, _(" git commit --amend")); >> + status_printf_ln(s, color, _(" Once you are satisfied with >> your changes, run")); >> + status_printf_ln(s, color, _(" git rebase --continue")); > > For an advice in "git status" output, the above may be appropriate, > but would the user see this in "git commit" template, and if so, > isn't it because the user typed "git commit --amend"? Does it make > sense to suggest to run "git commit --amend" in that context? True, the user will see the messages in the "git commit" template. We didn't take this case into account because we thought that not many people read the status in the "git commit" template. Anyway, just adding a condition if (advice_status_hints && !s->amend) does the job.