Subject: Re: What will happen to git.git in the near future

From: Rene Scharfe <[email-masked]>
Date: Sun, 24 Sep 2006 18:56:07 +0200

Junio C Hamano schrieb:
>  - We should deprecate git-tar-tree.  However, it has been
>    around and advertised for quite some time, so we need to make
>    sure people would not get burned too badly.  It might be
>    worthwhile to rewrite git-tar-tree as a thin wrapper to
>    "git-archive --format=tar" and remove git-upload-tar now (in
>    other words, "git-tar-tree --remote" will continue to work,
>    but it will talk with "git-upload-archive", not with
>    "git-upload-tar" on the other end), release 1.4.3 with it
>    with a deprecation warning, and then remove it in 1.4.5.

Hmm.  The local case in git-tar-tree is already a thin wrapper.
How about something like this shell script as a replacement for
the entire command?

René

--- snip! --
#!/bin/sh
#
# Copyright (C) 2006 Rene Scharfe

USAGE='[--remote=<repo>] <tree-ish> [basedir]'
. git-sh-setup

case "$1" in
--remote=*)	remote=1;;
*)		remote=0;;
esac

case "$#,$remote" in
1,0)	exec git-archive --format=tar                     "$1";;
2,0)	exec git-archive --format=tar --prefix="$2"/      "$1";;
2,1)	exec git-archive --format=tar                "$1" "$2";;
3,1)	exec git-archive --format=tar --prefix="$3"/ "$1" "$2";;
*)	usage;;
esac