Re: [PATCH] wt-status.c: Modified status message shown for a parent-less branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> .... But I'm not sure it's actually helping for
> some of these cases. E.g.:
>
>> -	status_printf_ln(s, c, _("Changes not staged for commit:"));
>> +	if (s->commit_template)
>> +		status_printf_ln(s, c, _("Changes not staged for commit:"));
>> +	else
>> +		status_printf_ln(s, c, _("Changes not yet in the index:"));
>
> I think "staged for commit" still makes perfect sense even when we are
> just asking "what's the current status" and not "what would it look like
> if I were to commit".
>
> And avoiding the word "index" is worth-while here, I think. I am not in
> general of the "let's hide the index" camp" but it is a technical term.
> If we can say the same thing in a way that is understood both by people
> who know what the index is and people who do not, that seems like a win.

I do not mind "Changes not staged yet:".  The point was not about
getting rid of "stage" but about not mentioning "commit", because
stepping back a bit, if the readers are prepared to accept these
messages in the mindset that they are guiding them toward their next
commit, "I find 'Initial commit' confusing" would not have been an
issue in the first place.

>> -	status_printf_ln(s, c, _("Changes to be committed:"));
>> +	if (s->commit_template)
>> +		status_printf_ln(s, c, _("Changes to be committed:"));
>> +	else
>> +		status_printf_ln(s, c, _("Changes already in the index:"));
>
> This one is less obvious, because "to be committed" more strongly
> implies making an actual commit.

Again, I do not mind "Changes already staged:" too much.

If we can get rid of 'yet' and 'already' from the above two, that
would be even better.  The point of the exercise is to be understood
by those who do not think in terms of 'preparing for the next commit',
so 'yet', 'already', 'to be committed' are all counter-productive
for that goal.  Those who accept the 'description of the current
state in the context of preparing for the next commit' are not the
ones we are trying to help with the suggested three changes.

>> @@ -1578,7 +1584,10 @@ static void wt_longstatus_print(struct wt_status *s)
>>  
>>  	if (s->is_initial) {
>>  		status_printf_ln(s, color(WT_STATUS_HEADER, s), "%s", "");
>> -		status_printf_ln(s, color(WT_STATUS_HEADER, s), _("Initial commit"));
>> +		status_printf_ln(s, color(WT_STATUS_HEADER, s),
>> +				 s->commit_template
>> +				 ? _("Initial commit")
>> +				 : _("No commit yet on the branch"));
>
> This one I think is an improvement. :)
>
> -Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]