From: Junio C Hamano Date: Thu, 17 Jul 2008 19:10:00 GMT Subject: Re: Considering teaching plumbing to users harmful Message-ID: <7vmykgfhtj.fsf@gitster.siamese.dyndns.org> In-Reply-To: Johannes Schindelin writes: > On Thu, 17 Jul 2008, Junio C Hamano wrote: > >> Johannes Schindelin writes: >> >> >> Is there a way to commit the contents of a tarball without using >> >> plumbing? I occasionally want to track an upstream that I know only >> >> as a series of tarballs, so I do something like: >> >> >> >> cd repo/ >> >> git checkout upstream >> >> rm -rf * >> >> tar -xzvf ../new-version.tar.gz >> > >> > How about "git add -u" and "git add ."? >> >> It would work only if new version never removes files. > > You made me doubt for a second there. But "git add -u" updates the index > when a tracked files was deleted. So after "rm -rf *", "git add -u" would > empty the index. I thought everybody would react to my message like so after sending it ;-) What I failed to say was that the main uneasiness about the above command sequence Bruce or anybody would have felt would be that "rm -fr *" step, which in itself look scary and does not remove .frotz that came from older version.