git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git diff --chunk-pickaxe?

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jun 22, 2009, 13:04 UTC
Message-ID
<fcaeb9bf0906220604ubb9db7v9ea37416080eecd7@mail.gmail.com>
In-Reply-To
<4A3F7DAC.3090709@lsrfire.ath.cx>

On Mon, Jun 22, 2009 at 10:48 PM, René Scharfe<rene.scharfe@lsrfire.ath.cx> wrote:

Show 12 quoted lines
> Nguyen Thai Ngoc Duy schrieb:
>> What I want is only show diff chunks that add or remove a line that
>> does not start with '#', something like a chunk-level pickaxe. Any
>> pointer where to start? It looks like I can start from
>> xdi_diff_outf(). Just wanted to make sure I won't follow a wrong way
>> from the beginning.
>
> How about creating an external diff driver instead?  It could remove all
> lines starting with '#', or normalize such lines to just '#' in case you
> need the line numbers to remain unchanged, then write the filtered
> result into temporary files and compare them with diff.  Perhaps this is
> sufficient for your purposes?  It should be easier to implement.

Yep. Jakub mentioned textconv privately, which should be enough for review purpose. However I'm not completely satisfied with it. Let's say I'm done review and happy with most of the translated strings. I'd like to commit those strings only (whether comments are committed does not really matter because I can filter them out with textconv). If I start "git add -p" up, I'm in trouble again.

-- 
Duy
Previous: René Scharfe
Message 4 of 4 in “git diff --chunk-pickaxe?”
  1. Nguyen Thai Ngoc DuyJun 22, 2009
  2. Jakub NarebskiJun 22, 2009
  3. René ScharfeJun 22, 2009
  4. Nguyen Thai Ngoc DuyJun 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.