[Top][All Lists]

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

Re: Using VC for change descriptions

From: Richard Stallman
Subject: Re: Using VC for change descriptions
Date: Mon, 01 Jan 2018 20:14:42 -0500

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > However, if people write a set of scripts to search for all changes in 
  > > a particular kind fo C entity, and likewise for each other language,
  > > that would deal with the complexity once and for all.  That might be an
  > > ok solution.

  > It's "git log -L :<funcname>:<file>".

It tries to do that job, and will work in most cases, but it won't
reliably do the whole job.  It doesn't try.  Here's the documentation
of that option:

           If “:<regex>” is given in place of <start> and <end>, it denotes
           the range from the first funcname line that matches <regex>, up to
           the next funcname line. “:<regex>” searches from the end of the
           previous -L range, if any, otherwise from the start of file.
           “^:<regex>” searches from the start of file.

So you have to specify the context that belongs to a particular _kind_
of definition, and if that has changed, you won't find anything from
before that.

Another shortcoming is that you can't get a list of the entities
changed in a given commit.  You can only ask about one name you are
interested in.

When you're doing maintenance and accessing the repo, that is no
problem, because specifying one entity name is what you want.
But this means we can't use -L to make a replacement for the info
that people propose to stop putting in change log files.

                                           (If a particular project is using a 
  > language for which that does not work well by default, that project can 
  > add a .gitattributes file and provide instructions on what to add to 
  > .git/config in your checkout to make -L work better for that language.)

Would you please email me the documentation for .gitattributes and
these changes in .git/config?  I would like to see what this feature
can and can't do.

Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Skype: No way! See https://stallman.org/skype.html.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]