Re: Considering teaching plumbing to users harmful
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 17, 2008, 19:10 UTC
- Message-ID
- <7vmykgfhtj.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.DEB.1.00.0807171940160.8986@racer>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 20 quoted lines
> On Thu, 17 Jul 2008, Junio C Hamano wrote: > >> Johannes Schindelin <Johannes.Schindelin@gmx.de> 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.