Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCHv3 1/2] wt-status.*: better advices for git status added

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:53:56

Kong Lucien [off-list ref] writes:
These messages can be shortened by setting
the new advice.* config key called advice.statushelp to false.
It may make sense to use the existing advice.statusHint here.
+	else {
+		if (!stat(git_path("rebase-apply"), &st)) {
"else { if" is usually spelt "else if", without an additional level of
indentation.
+			status_printf_ln(s, c, _("You have unmerged paths: fix conflicts and then commit the result."));
I'd even say

You have unmerged paths; fix conflicts and run "git commit"
+				status_printf_ln(s, c, _("One of the patches is empty or corrupted !"));
No space before !
+				status_printf_ln(s, c, _("When you have resolved this problem run \"git am --resolved\"."));
+				status_printf_ln(s, c, _("If you would prefer to skip this patch, instead run \"git am --skip\"."));
+				status_printf_ln(s, c, _("To restore the original branch and stop patching run \"git am --abort\"."));
You have overly long lines. I already suggested splitting the function
into smaller functions, and the presence of long lines is usually an
indication that the splitting should be done.

Documentation/CodingGuidelines says:

,----
| For C programs:
| 
|  - We use tabs to indent, and interpret tabs as taking up to
|    8 spaces.
| 
|  - We try to keep to at most 80 characters per line.
`----
+				status_printf_ln(s, c, _("You are currently rebasing%s"),
+				advice_status_help
+				? _(": fix conflicts and then run \"git rebase -- continue\".") : ".");
Weird indentation, it feels like 3 different statements.
+	if(bisect_state) {
Space between if and (.
+		if (advice_status_help)
+		status_printf_ln(s, c, _("To get back to the original branch run \"git bisect reset\""));
Broken indentation.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help