[Top][All Lists]

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

Re: Is it time to drop ChangeLogs? (Was: bug#21998: Run 'make change-his

From: Yuri Khan
Subject: Re: Is it time to drop ChangeLogs? (Was: bug#21998: Run 'make change-history' on release branch)
Date: Thu, 10 Mar 2016 00:52:53 +0600

On Mon, Mar 7, 2016 at 10:24 PM, Eli Zaretskii <address@hidden> wrote:

> "git log -p" cannot do the job for changes in many types of files.
> For example, try it on Lisp or Texinfo files.

I assume you are talking about the function header that is displayed
in the hunk headers, and by default contains the nearest preceding
line that starts in the zeroth column.

Git can in fact be configured to recognize “functions” differently,
per file type. The gitattributes(5) manual page describes this:

   Defining a custom hunk-header

       First, in .gitattributes, you would assign the diff attribute for

           *.tex   diff=tex

       Then, you would define a "diff.tex.xfuncname" configuration to
       specify a regular expression that matches a line that you would
       want to appear as the hunk header "TEXT". Add a section to your
       $GIT_DIR/config file (or $HOME/.gitconfig file) like this:

           [diff "tex"]
               xfuncname = "^(\\\\(sub)*section\\{.*)$"

reply via email to

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