Re: [StGIT RFC PATCH] Activate rename detection by default.

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

 



On Tue, May 15, 2007 at 08:47:59PM +0200, Karl Hasselström wrote:
> On 2007-05-15 16:41:47 +0100, Catalin Marinas wrote:
> 
> > On 05/05/07, Yann Dirson <ydirson@xxxxxxxxxx> wrote:
> >
> > > This patch uses -M when generating diffs, which then looks fine,
> > > just like any other git-generated diff.
> >
> > I think we should only use -M for "files", "status", "show", "diff"
> > but not for "export" and "mail", maybe by adding an extra parameter
> > to git.diff() (or we could have this configurable or with an cmd
> > line option). The reason is that I send patches that might not be
> > applied with GIT.
> 
> Seems like a good idea to me: default to -M whenever the consumer is
> guaranteed to understand it, and have it as an option defaulting to
> off when we export data.

This option should probably be available through a config setting as
well: we want to use it everytime we send a git or StGIT patch to the
list :)

OTOH, using different conventions for different commands is guaranted
to confuse more than one user.  Eg, I customarily use "stg show >
../file.diff", assuming it will be readable by patch(1) - I even
issued today more than one "stg diff -r //bottom.old | (cd ../other &&
patch -p1)" - luckily, no rename there ;)

It makes sense to have it my default on for "files" and "status", but
it breaks the output format, and thus probably some user scripts.

Maybe we should add this behaviour as off by default, tunable from
config, and overridable from command-line (roughly what I suggested in
https://gna.org/task/?4773, with everything off by default).  Now the
question would be what command-line syntax to use to be usable.

-M/--renames <> --no-renames ?  -M would become useles when the
default, and --no-renames is cumbersome.  Also, adds 2 flags per
option, we have 3 of them (-M -C --find-copies-harder), and we may
want to allow other useful ones like -w and -b.

--diff-flags='-M -C' ?  Can't find a non-brain-damaging way of
negating that: --no-diff-flags='-C' to negate part of a
stgit.diff.defaultflags='-M -C' is likely to be confusing.

Better ideas anyone ?
-- 
Yann.
-
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