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

Re: [PATCH] Test "git log --diff-filter"

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 5, 2008, 23:33 UTC
Message-ID
<200801060033.03672.jnareb@gmail.com>
In-Reply-To
<7vsl1b7vhb.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
Show 11 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
> > Add test to check "git log --diff-filter" works correctly with and
> > without diff generation by git-log; the main purpose of this test is
> > to check if "git log --diff-filter" filters revisions correctly.
> >
> > This is a companion test to commit 0faf2da7e5ee5c2f472d8a7afaf8616101f34e80
> > (Fix "git log --diff-filter" bug) by Arjen Laarhoven.
> 
> If you look at the commit, you'd notice that I've added
> necessary test when I accepted the patch from Arjen already ;-).
Sorry for the noise, then.
> Does this new set of tests check something new?

My test checks all --diff-filter filters relevant to git-diff-tree, i.e. ADMRCBT, and not only AMD.

Also it checks if the diff is shown correctly for --diff-filter=M and for --diff-filter=M*, but I think this should be a separate test, and use only git-diff-something, and not git-log.

P.S. By the way, it is IMHO a bit strange that --pretty=oneline uses newline as a terminator (it means that there is a newline at the end of "git log --pretty=oneline), while --pretty="format:%s" uses newline as a separator (meaning that there is no newline at the end) when redirected to file.

 # git log --pretty="format:%s" -B -C -C >current

The 'current' file doesn't end with newline (with --pretty=oneline it does), when log ends at root commit. Strange.

-- 
Jakub Narebski
Poland
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 9 in “Fix "git log --diff-filter" bug”
  1. Fix "git log --diff-filter" bugArjen Laarhoven, Dec 25, 2007
  2. Jakub NarebskiDec 25, 2007
  3. Junio C HamanoDec 26, 2007
  4. Test "git log --diff-filter"Jakub Narebski, Jan 5, 2008
  5. Junio C HamanoJan 5, 2008
  6. Jakub NarebskiJan 5, 2008
  7. Junio C HamanoJan 6, 2008
  8. Jakub NarebskiJan 7, 2008
  9. Junio C HamanoJan 7, 2008

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.