[darcs-devel] [patch1913] get rid of Invert instances for non-prim patch types

Ben Franksen bugs at darcs.net
Wed Sep 25 18:11:13 UTC 2019


Ben Franksen <ben.franksen at online.de> added the comment:

>>   * possible fix for D.UI.SelectChanges.selected
>>   
>>   This makes it actually do what the docs claim it does. I am not sure this is
>>   the correct behavior, though. It also renames it to getSelected to make its
>>   easier to see where it is used, since the word 'selected' appears in lots of
>>   places in this module, but getSelected is used only in printSelected.
> 
> Interesting. I agree that your new code is in line with the comment and
> that it's not obvious that it is actually the right thing to do. If
> we're showing the user what they've selected, showing it to them in the
> commuted context (i.e. what will actually happen if they accept the
> selection) would seem more natural to me.

I agree. A good example is (A=hunk ./a; B=move ./a ./b), where you
select A (i.e. the hunk) for e.g. amending, or even just to look at the
change: we want to see the change for ./b, not ./a.

Another good example is hunks in the same file: (A=hunk 3 [x] [y];
B=hunk 1 [] [z]), where we view/select A: it should be displayed at line
4, not the (uncommuted, original) line 3.

I will rollback and instead fix the docs.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1913>
__________________________________


More information about the darcs-devel mailing list