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

Re: RCS Keywords in Git done right

From
Derek Moore <derek.p.moore@gmail.com>
Date
Dec 2, 2014, 17:03 UTC
Message-ID
<CAMsgyKbd8Eq07LUktaVy7zyFQwOJ3KOrkJCipp6P9F1_W=OYCg@mail.gmail.com>
In-Reply-To
<CAMsgyKZWr-1isLvRXMFdzOYu0Yfm3vN_bdk4oRg6UhzSOMq_yQ@mail.gmail.com>
Show 9 quoted lines
> My current approach is:
> 1) find files common between @ & @{-1}, "ls-tree --full-tree
> --name-only -r" both branches, take the intersection
> 2) find current branch's commits for common files, for each file in
> intersection "log -1 --format=%H $current_branch -- $file"
> 3) find common files where latest commits differ, for each file in
> intersection keep the file if current branche's latest commit does not
> equal prior branch's latest commit
> 4) overwrite all kept files with the results of git-archive
PS: In large repos, I can dump the entire contents of the repo out of
git-archive faster than I can look up the commits of common files
between two branches for a more limited and surgical dump from
git-archive (say, 30 seconds to dump everything out of git-archive vs.
1 minute 30 seconds to find the intersection of files and look up the
latest commits).
Previous: Derek MooreNext: Derek Moore
Message 6 of 7 in “RCS Keywords in Git done right”
  1. Derek MooreNov 26, 2014
  2. Stefan BellerNov 26, 2014
  3. Derek MooreNov 26, 2014
  4. Stefan BellerNov 26, 2014
  5. Derek MooreDec 2, 2014
  6. Derek MooreDec 2, 2014
  7. Derek MooreDec 2, 2014

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.