Re: [PATCH 1/2] add--interactive: ignore mode change in 'p'atch command

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

 



On Thu, Mar 27, 2008 at 11:29:58AM -0700, Junio C Hamano wrote:

> Yeah, but the user is really into microcommits, like "separate mode
> change" thing really matters, maybe the user would want to make three
> commits (1) chmod +x, (2) pure rename, and (3) content changes.
> 
> I personally think that is not worth it, so I am agreeing with you on the
> "rename" one.

My feeling on the rename microcommit is that it is reasonable (though I
am not such a microcommitter), but that "git add -p" is probably not the
right tool for doing it. My view is that mode change and hunks are
_actual_ changes to the file, and you can pick and choose the changes
you have made. "rename" is not a change you made, but rather something
we infer from the changes that are available.

But I can also see how one has the opposite view. I dunno. It's hard to
speculate since I don't actually want to _use_ rename. ;)

> Even though your two patches make perfect sense at the philosophical level
> and I very much like it, I doubt "separating mode change" is so useful
> from the practical point of view for that matter.
> [...]
> ...then a patch came to make it the current "not asking
> about mode change separately and if the user chooses to add anything from
> the patch hunks, stage the mode change along with it" behaviour, people
> might even think that such a patch is an improvement in usability by
> asking one less question.  I dunno.

I don't think I would probably use mode change very often, but I found
the current behavior quite non-intuitive, and I think I would prefer if
it were explicit (and in 99% of cases, it won't come up at all, since
you haven't changed the mode!).

But this is all clearly post-1.5.5, so hopefully we can let it stew and
get some more comments from the list on what makes sense to people.

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

  Powered by Linux