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

Re: Re: git log -M -- filename is not working?

From
Eli Barzilay <eli@barzilay.org>
Date
May 12, 2010, 14:35 UTC
Message-ID
<19434.48308.815673.263230@winooski.ccs.neu.edu>
In-Reply-To
<20100512124948.GA11761@coredump.intra.peff.net>
On May 12, Jeff King wrote:
Show 9 quoted lines
> On Wed, May 12, 2010 at 08:01:59AM -0400, Eli Barzilay wrote:
> 
> > > I have no opinion on moving --follow around, but I definitely agree that
> > > more clearly marking the diff-options (and including them after
> > > revision traversal options) is much better.
> > 
> > Should I send that reorganization as a proper patch then?
> 
> Yes, please.
Done.
Show 10 quoted lines
> > > This ":git-log: 1" magic should probably follow the include. It sets up
> > > an attribute for diff-options.txt to conditionally include some
> > > log-specific bits.
> > 
> > It seemed like it's a definition that could be used elsewhere too (eg,
> > in other includes that could be added in the future).
> 
> Yeah, I considered that, too. So maybe it is best at the top of the
> options list (but in that case, perhaps it should go at the very top
> of the file).

Since I don't know, I just dragged it along with the include. (Moving it to the top would be better better done with the other files, so it's a different thing...)

> Anyway, here is the patch. My testing so far has been very simple,
> so please try it on a few repos and let me know if it does what you
> expect in all cases. Note that is based on "next", as it has Bo's
> find_copies_harder patch.

I tried it with our repository -- it does what I expected it to do wrt showing the log messages, and at a very small penalty (~0.9s vs ~0.7s for scanning a history of about 20k commits).

But with `-p' it was doing something confusing: I used two files that were recently renamed, and the result was the correct log history, but the first patch that was shown (the rename) showed the two files as added. (That's even when I added `-C' and `-M'.) This happens even with a single path. OTOH, using `--follow' with `-p' and a single path without your patch produces the expected result where the first patch is a rename (even without `-C'/`-M').

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
Previous: Jeff KingNext: Bo Yang
Message 16 of 26 in “git log -M -- filename is not working?”
  1. Eugene SajineMay 7, 2010
  2. Jacob HelwigMay 7, 2010
  3. Eugene SajineMay 7, 2010
  4. Eli BarzilayMay 7, 2010
  5. Matthieu MoyMay 7, 2010
  6. Jakub NarebskiMay 7, 2010
  7. Jeff KingMay 8, 2010
  8. Eli BarzilayMay 8, 2010
  9. Jeff KingMay 8, 2010
  10. Junio C HamanoMay 8, 2010
  11. Eli BarzilayMay 8, 2010
  12. Jeff KingMay 12, 2010
  13. Eli BarzilayMay 12, 2010
  14. Jeff KingMay 12, 2010
  15. Jeff KingMay 12, 2010
  16. Eli BarzilayMay 12, 2010
  17. Bo YangMay 12, 2010
  18. Jeff KingMay 12, 2010
  19. Bo YangMay 13, 2010
  20. Eli BarzilayMay 13, 2010
  21. Jeff KingMay 14, 2010
  22. Eli BarzilayMay 14, 2010
  23. Bo YangMay 12, 2010
  24. Jeff KingMay 12, 2010
  25. Eli BarzilayMay 12, 2010
  26. Bo YangMay 12, 2010

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.