#!/usr/bin/env bash
#
# Add new file to a GIT repository.
# Copyright (c) Petr Baudis, 2005
#
# Takes a list of file names at the command line, and schedules them
# for addition to the GIT repository at the next commit.

. ${COGITO_LIB}cg-Xlib

[ "$1" ] || die "usage: cg-add FILE..."

for file in "$@"; do
	if [ -f "$file" ]; then
		echo "Adding file $file"
	else
		die "$file does not exist"
	fi
done

git-update-cache --add -- "$@"
