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:00 UTC
Message-ID
<20051113150051.4a10365d.vsu@altlinux.ru>
In-Reply-To
<43771C43.7000104@etek.chalmers.se>
On Sun, 13 Nov 2005 11:58:11 +0100 Lukas Sandstr__m wrote:
Show 33 quoted lines
> Subject: [PATCH] Make sure all old packfiles are removed when doing a full repack
> 
> This is nessecary because unrachable objects in packfiles makes git-pack-redundant
> flag them as non-redundant.
> 
> Signed-off-by: Lukas Sandstr____m <lukass@etek.chalmers.se>
> 
> ---
> 
>  git-repack.sh |   16 +++++++++++++++-
>  1 files changed, 15 insertions(+), 1 deletions(-)
> 
> applies-to: 9a0f0c748316751fbf593a21f2b16bcdd975095a
> 08df1f641bd3f98a607a8413d647667adc18a633
> diff --git a/git-repack.sh b/git-repack.sh
> index f347207..293bb50 100755
> --- a/git-repack.sh
> +++ b/git-repack.sh
> @@ -32,6 +32,8 @@ case ",$all_into_one," in
>  	rev_list=
>  	rev_parse='--all'
>  	pack_objects=
> +	existing=`cd "$PACKDIR" && \
> +	    find . -type f \( -name '*.pack' -o -name '*.idx' \) -print`
>  	;;
>  esac
>  if [ "$local" ]; then
> @@ -60,7 +62,19 @@ mv .tmp-pack-$name.pack "$PACKDIR/pack-$
>  mv .tmp-pack-$name.idx  "$PACKDIR/pack-$name.idx" ||
>  exit
>  
> -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").
Show 17 quoted lines
> +then
> +	sync
> +	( cd "$PACKDIR" &&
> +		for e in $existing
> +		do
> +		case "$e" in
> +		./pack-$name.pack | ./pack-$name.idx) ;;
> +		*)	rm -f $e ;;
> +		esac
> +		done
> +	)
> +else if test "$remove_redandant" = t
>  then
>  	sync
>  	redundant=$(git-pack-redundant --all)
> ---
> 0.99.9.GIT
Previous: Lukas SandströmNext: Lukas Sandström
Message 8 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.