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

Re: [PATCH 0/6] "git repack -a -d" improvements

From
KBKjetil Barvik <barvik@broadpark.no>
Date
Feb 28, 2009, 12:29 UTC
Message-ID
<8663iuwxrb.fsf@broadpark.no>
In-Reply-To
<cover.1235812035.git.gitster@pobox.com>
* Junio C Hamano <gitster@pobox.com> writes:
| [2/6] refactors public interface has_sha1_pack() that takes an optional
| "ignore_packed" list.  Most callers pass NULL, so it introduces a new
| function has_sha1_kept_pack() and migrate the minority caller to this
| interface while losing the argument from the original function and callers
| that currently pass NULL.
  [...]
| [4/6] identifies three places that use "ignore_packed" list to tell if a
| pack is on the list or not, and introduces a helper function to do so.
| The helper is conveniently called is_kept_pack(), even though at this
| stage the list does not necessarily mean a list of "unkept" packs yet.
  OK, patch 2/6 failed for me when I was doing 'git am' to import the
  patch-series, so sorry if do not see all bits of the patch correctly.
  Would it be an improvment to change the signature of the currently
  find_sha1_pack() function to:
    struct packed_git *
    find_pack_entry(const unsigned char *sha1, off_t *sha1_pack_offset,
                    struct packed_git *packs)
    - The currently existing 'struct pack_entry *e' parameter is only
      used to retrn the offset, so make it more clear.  The struct
      pack_entry can probably be deleted from the sha1_file.c file.
    - When the 'git repack -a -d' command is used, one has to compute
      the list of allowed pack-files to look into, and give this list to
      find_pack_entry().
    - The currently named find_sha1_pack() function can then be deleted.
    - For example, when this function is now used in sha1_object_info()
      it can be called like this:
          found_pack = find_pack_entry(sha1, &offset, packed_git);
  -- kjetil
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 17 in “"git repack -a -d" improvements”
  1. 0/6 "git repack -a -d" improvementsJunio C Hamano, Feb 28, 2009
  2. 1/6 git-repack: resist stray environment variableJunio C Hamano, Feb 28, 2009
  3. 2/6 has_sha1_pack(): refactor "pretend these packs do not exist" interfaceJunio C Hamano, Feb 28, 2009
  4. 3/6 has_sha1_kept_pack(): take "struct rev_info"Junio C Hamano, Feb 28, 2009
  5. 4/6 Consolidate ignore_packed logic moreJunio C Hamano, Feb 28, 2009
  6. 5/6 Simplify is_kept_pack()Junio C Hamano, Feb 28, 2009
  7. 6/6 is_kept_pack(): final clean-upJunio C Hamano, Feb 28, 2009
  8. Kjetil BarvikFeb 28, 2009
  9. Junio C HamanoFeb 28, 2009
  10. Brandon CaseyMar 18, 2009
  11. 0/5 repack improvementsBrandon Casey, Mar 20, 2009
  12. 1/5 t7700-repack: add two new tests demonstrating repacking flawsBrandon Casey, Mar 20, 2009
  13. 2/5 git-repack.sh: don't use --kept-pack-only option to pack-objectsBrandon Casey, Mar 20, 2009
  14. 3/5 pack-objects: only repack or loosen objects residing in "local" packsBrandon Casey, Mar 20, 2009
  15. 4/5 t7700-repack: repack -a now works properly, expect success from testBrandon Casey, Mar 20, 2009
  16. 5/5 Remove --kept-pack-only option and associated infrastructureBrandon Casey, Mar 20, 2009
  17. Brandon CaseyMar 20, 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.