Re: Consistent terminology: cached/staged/index
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Feb 14, 2011, 14:17 UTC
- Message-ID
- <AANLkTikWsNgL6dSHueGCXw0jH4hnvai81X=EQERuw3Qi@mail.gmail.com>
- In-Reply-To
- <4D59316E.5090203@drmicha.warpmail.net>
On Mon, Feb 14, 2011 at 3:43 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:
Show 8 quoted lines
> Nguyen Thai Ngoc Duy venit, vidit, dixit 14.02.2011 14:14: >> On Mon, Feb 14, 2011 at 5:42 PM, Michael J Gruber >> <git@drmicha.warpmail.net> wrote: >>> Full disclaimer: I have an alias "staged" for "diff --cached" myself... >> >> Be careful with your fingers. There's a command named "git stage". > > I know. Can we remove it as part of 1.8.0? It's our only builtin alias.
I have proposed before to extend 'git stage', so you can do 'git stage diff', or if you alias 'git stage' to 'git s', just 'git s diff'. This would not conflict with the old behavior of 'git stage $file'.
case "$1" in
add)
shift
git add $@
;;
rm)
shift
git rm --cached $@
;;
diff)
shift
git diff --cached $@
;;
import)
shift
git ls-files --modified --others --exclude-standard -z $@ | \
git update-index --add --remove -z --stdin
;;
ls)
shift
git ls-files --stage $@
;;
*)
git add $@
;;
esacCheers.
-- Felipe Contreras