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

Re: Remove unneeded packs

From
Sergey Vlasov <vsu@altlinux.ru>
Date
Nov 13, 2005, 12:20 UTC
Message-ID
<20051113122017.GA9996@procyon.home>
In-Reply-To
<43772C96.9030805@etek.chalmers.se>
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:
Show 13 quoted lines
> >>-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.

(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.

Previous: Lukas SandströmNext: Lukas Sandström
Message 10 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.