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

Re: Remove unneeded packs

From
Lukas Sandström <lukass@etek.chalmers.se>
Date
Nov 13, 2005, 12:31 UTC
Message-ID
<4377323B.4000203@etek.chalmers.se>
In-Reply-To
<20051113122017.GA9996@procyon.home>
Sergey Vlasov wrote:
Show 45 quoted lines
> On Sun, Nov 13, 2005 at 01:07:50PM +0100, Lukas Sandstr?m wrote:
> 
>>Sergey Vlasov wrote:
>>
>>>On Sun, 13 Nov 2005 11:58:11 +0100 Lukas Sandstr?m wrote:
> 
> 
>>>>-if test "$remove_redandant" = t
>>>>+if test "$all_into_one" = t
>>>
>>>
>>>This should be
>>>
>>>if test "$all_into_one$remove_redandant" = tt
>>>
>>>(otherwise "git repack -a" becomes the same as "git repack -a -d").
>>>
>>>
>>
>>This was the behaviour before git-pack-redundant, I just restored it.
> 
> 
> But the old code was:
> 
> if test "$remove_redandant" = t
> then
> 	# We know $existing are all redandant only when
> 	# all-into-one is used.
> 	if test "$all_into_one" != '' && test "$existing" != ''
> 	then
> 		sync
> 		( cd "$PACKDIR" &&
> 		  for e in $existing
> 		  do
> 			case "$e" in
> 			./pack-$name.pack | ./pack-$name.idx) ;;
> 			*)	rm -f $e ;;
> 			esac
> 		  done
> 		)
> 	fi
> fi
> 
> So without the -d option nothing was removed, even with -a.
> 

True. I forgot to look at the context around the changed lines... Btw, remove_redundant is misspellt.

Show 9 quoted lines
> (And test "$existing" != '' might also be needed for some shells which
> are confused by the empty list in the for statement.)
> 
> 
>>Someone else gets to decide if git repack -a implies "remove all old packs".
> 
> 
> If there is a separate -d option for this, just using -a probably
> should not remove anything.

True, but you will have trouble removing stale packfiles if they contain unreachable objects unless you remove them when you create the -a pack.

Anyway, ignore the patch above.
Previous: Sergey VlasovNext: Craig Schlenter
Message 11 of 18 in “Remove unneeded packs”
  1. Marcel HoltmannNov 12, 2005
  2. Andreas EricssonNov 12, 2005
  3. Marcel HoltmannNov 12, 2005
  4. Lukas SandströmNov 12, 2005
  5. Marcel HoltmannNov 12, 2005
  6. Junio C HamanoNov 13, 2005
  7. Lukas SandströmNov 13, 2005
  8. Sergey VlasovNov 13, 2005
  9. Lukas SandströmNov 13, 2005
  10. Sergey VlasovNov 13, 2005
  11. Lukas SandströmNov 13, 2005
  12. Craig SchlenterNov 12, 2005
  13. Balanced packing strategyPetr Baudis, Nov 12, 2005
  14. Craig SchlenterNov 12, 2005
  15. Junio C HamanoNov 13, 2005
  16. Petr BaudisNov 13, 2005
  17. Josef WeidendorferNov 13, 2005
  18. Junio C HamanoNov 13, 2005

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.