bug-standards
[Top][All Lists]
Advanced

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

Re: Script to generate ChangeLogs automatically


From: Richard Stallman
Subject: Re: Script to generate ChangeLogs automatically
Date: Mon, 03 Dec 2018 19:07:03 -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. ]]]

  > > If there is no way to name these entities, then what do hand-written
  > > GCC change log entries say about them?  Can the script do as well as that?

  > They use descriptions like (unnamed splitter) or (unnamed conditional 
  > branch define_insn).

It might be an improvement to give those constructs names just to
distinguish them.  But that is a different issue.  If the script
handles those constructs no worse than humans do, it is good enough.

  > When the command is "git diff" (or "git show" or something else showing 
  > diffs), there is the issue discussed before that the name on the diff hunk 
  > header comes from the last funcname line before that diff hunk - so it 
  > doesn't correctly name the entity changed in the (common) case where the 
  > funcname line is within the diff context.  (Which is only an issue for 
  > automated tools, not for a human looking at the diff because they can see 
  > the funcname line within the diff context in that case.)

It is no great problem for a human looking at ONE diff.  But when it comes
to trying to look thru many diffs to find what changed a given entity,
it is a total screw.

                                                              It's easy for 
  > the script to avoid that particular issue.

Yes, I expect the new script will handle this fine.

  > When the command is "git blame", no such issue arises because the human 
  > has already identified what function they want to look at, and the git 
  > blame output reliably shows the last commit to change each line in that 
  > function (but that doesn't help if some relevant change only removed lines 
  > from the function without changing any lines that remained after the 
  > change).

If I understand right, "git blame" works when nothing unusual has
happened, such as moving things around in the file.  But it is
advanced use of git.

  > When the command is "git log -L", ultimately it's for the user deciding 
  > what argument to pass to -L to define the entity involved.  The 
  > :<funcname> form is reliable when GNU-formatted C functions and file-scope 
  > variables are involved (even when the function name is generated by a 
  > macro, if the <funcname> you use is text that literally appears in the 
  > source file on the funcname line); when macro definitions are involved, 
  > the form with regular expressions can be used

It is not so simple.  The regexps that are easy to right may not show
the whole of the entity -- because they may find the line with the name
of the entity, and that may not be the beginning.

Basically, this way of specifying how to find entities is too rigid
and unnatural.  To make it give fully accurate results is difficult.

A different way of specifying what to search for might work better.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





reply via email to

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