Re: What will happen to git.git in the near future
- From
Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
- Date
- Sep 24, 2006, 16:56 UTC
- Message-ID
- <4516B8A7.6010007@lsrfire.ath.cx>
- In-Reply-To
- <7v7iztbldm.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano schrieb:
Show 9 quoted lines
> - 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