Re: [PATCHv2 1/2] wt-status: better advices for git status

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> These are not independent (you cannot be in bisect and am at the
> same time).

You should not, but it seems you can. At least, I just successfully
started a "git am" during a "git bisect".

Even if some checks may be added to actually prevent the situation, it
seems better to keep "git status" robust to this kind of situation. If
the user did something really wrong, nice advices in "git status" will
be particularly helpful.

>> +	int conflict = 0;
>
> How is this different from "unmerged"?
[...]
>> +	path = mkpath("%s/MERGE_HEAD", git_dir);
>> +	if (!access(path, R_OK))
>> +		unmerged_state = 1;
>
> Ahh, so "unmerged" is "conflicted during merge" (as opposed to
> rebase_state is "conflicted during rebase")?  Doesn't the naming
> sound odd?  If it were "merge_state", it might have made a bit more
> sense (but again, these are not independent conditions, so multiple
> variables do not make sense).

The variable naming is wrong (it could be s/conflicts/unmerged_present/
and s/unmerged_state/merge_in_progress/ for example). But these two
variables are indeed independant. You can have unmerged path without an
actual merge in progress (conflicts during "git am"), an you can have a
merge in progress without conflicts (if you've just "git add"-ed them).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]