[darcs-users] What if darcs is generating too inclusive of hunks?

Yuval Kogman nothingmuch at woobling.org
Sun Nov 12 14:18:29 UTC 2006


On Fri, Nov 10, 2006 at 09:39:08 -0800, David Roundy wrote:

> What do you mean by noisy? Or "false" changes? I have no idea what you are
> talking about (which would make it hard to fix).

Here is an example I get often:

hunk ./lib/MO/Compile/Attribute/Simple/Compiled.pm 75
-sub _generate_accessor_method {
+sub slot {
Shall I record this change? (7/?)  [ynWsfqadjkc], or ? for help: y
hunk ./lib/MO/Compile/Attribute/Simple/Compiled.pm 78
-       my $slot = ( $self->slots )[0];
+       my @slots = $self->slots;
+
+       warn "Attribute $self has more than one slot, but the
generated accessor will only use the first one" if @slots > 1;
+
+       return $slots[0];
+}
+
+sub _generate_accessor_method {
+       my $self = shift;


The patch I would have expected is [hand typed]:


+sub slot {
+       my @slots = $self->slots;
+
+       warn "Attribute $self has more than one slot, but the
generated accessor will only use the first one" if @slots > 1;
+
+       return $slots[0];
+}
 
 sub _generate_accessor_method {
        my $self = shift;
-       my $slot = ( $self->slots )[0];
+       my $slot = $self->slot;


which represents much more closely the actual change. Since this
always seemed to me like nitpicking which is very hard to solve I
never complained.

-- 
  Yuval Kogman <nothingmuch at woobling.org>
http://nothingmuch.woobling.org  0xEBD27418

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20061112/33d1cea3/attachment.pgp 


More information about the darcs-users mailing list