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

Re: [Alt. PATCH 1/2] repack: add -F flag to let user choose between --no-reuse-delta/object

From
Nicolas Pitre <nico@fluxnic.net>
Date
Sep 27, 2010, 14:10 UTC
Message-ID
<alpine.LFD.2.00.1009271009490.1146@xanadu.home>
In-Reply-To
<20100927141936.590d71b3@jk.gs>
On Mon, 27 Sep 2010, Jan Krüger wrote:
Show 20 quoted lines
> In 479b56ba ('make "repack -f" imply "pack-objects --no-reuse-object"'),
> git repack -f was changed to include recompressing all objects on the
> zlib level on the assumption that if the user wants to spend that much
> time already, some more time won't hurt (and recompressing is useful if
> the user changed the zlib compression level).
> 
> However, "some more time" can be quite long with very big repositories,
> so some users are going to appreciate being able to choose. If we are
> going to give them the choice, --no-reuse-object will probably be
> interesting a lot less frequently than --no-reuse-delta. Hence, this
> reverts -f to the old behaviour (--no-reuse-delta) and adds a new -F
> option that replaces the current -f.
> 
> Measurements taken using this patch on a current clone of git.git
> indicate a 17% decrease in time being made available to users:
> 
> git repack -Adf  34.84s user 0.56s system 145% cpu 24.388 total
> git repack -AdF  38.79s user 0.56s system 133% cpu 29.394 total
> 
> Signed-off-by: Jan Krüger <jk@jk.gs>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Show 72 quoted lines
> ---
> 
> --- Nicolas Pitre <nico@fluxnic.net> wrote:
> 
> > I personally don't find --no-reuse-object particularly useful.  I
> > hardly imagine that people are changing the pack compression level
> > that often if at all.  So I doubt moving the current
> > --no-reuse-object behavior to -F and reverting -f to
> > --no-reuse-delta would cause any serious inconvenience.  It certainly
> > won't _break_ anything.  So you have my ACK to do that change.
> 
> Here we go.
> 
>  Documentation/git-repack.txt |    6 +++++-
>  git-repack.sh                |    6 ++++--
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
> index 8c67d17..9566727 100644
> --- a/Documentation/git-repack.txt
> +++ b/Documentation/git-repack.txt
> @@ -8,7 +8,7 @@ git-repack - Pack unpacked objects in a repository
>  
>  SYNOPSIS
>  --------
> -'git repack' [-a] [-A] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]
> +'git repack' [-a] [-A] [-d] [-f] [-F] [-l] [-n] [-q] [--window=N] [--depth=N]
>  
>  DESCRIPTION
>  -----------
> @@ -62,6 +62,10 @@ other objects in that pack they already have locally.
>  	linkgit:git-pack-objects[1].
>  
>  -f::
> +	Pass the `--no-reuse-delta` option to `git-pack-objects`, see
> +	linkgit:git-pack-objects[1].
> +
> +-F::
>  	Pass the `--no-reuse-object` option to `git-pack-objects`, see
>  	linkgit:git-pack-objects[1].
>  
> diff --git a/git-repack.sh b/git-repack.sh
> index 1eb3bca..769baaf 100755
> --- a/git-repack.sh
> +++ b/git-repack.sh
> @@ -10,7 +10,8 @@ git repack [options]
>  a               pack everything in a single pack
>  A               same as -a, and turn unreachable objects loose
>  d               remove redundant packs, and run git-prune-packed
> -f               pass --no-reuse-object to git-pack-objects
> +f               pass --no-reuse-delta to git-pack-objects
> +F               pass --no-reuse-object to git-pack-objects
>  n               do not run git-update-server-info
>  q,quiet         be quiet
>  l               pass --local to git-pack-objects
> @@ -34,7 +35,8 @@ do
>  		unpack_unreachable=--unpack-unreachable ;;
>  	-d)	remove_redundant=t ;;
>  	-q)	GIT_QUIET=t ;;
> -	-f)	no_reuse=--no-reuse-object ;;
> +	-f)	no_reuse=--no-reuse-delta ;;
> +	-F)	no_reuse=--no-reuse-object ;;
>  	-l)	local=--local ;;
>  	--max-pack-size|--window|--window-memory|--depth)
>  		extra="$extra $1=$2"; shift ;;
> -- 
> 1.7.2.3.392.g02377.dirty
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
Previous: Nicolas PitreNext: Junio C Hamano
Message 6 of 9 in “repack: add -F option that passes --no-reuse-delta to pack-objects”
  1. repack: add -F option that passes --no-reuse-delta to pack-objectsJan Krüger, Sep 27, 2010
  2. Nicolas PitreSep 27, 2010
  3. 1/2 repack: add -F flag to let user choose between --no-reuse-delta/objectJan Krüger, Sep 27, 2010
  4. 2/2 Documentation: pack.compression: explain how to recompressJan Krüger, Sep 27, 2010
  5. Nicolas PitreSep 27, 2010
  6. Nicolas PitreSep 27, 2010
  7. Junio C HamanoSep 27, 2010
  8. Jan KrügerSep 28, 2010
  9. Junio C HamanoSep 28, 2010

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.