builtin-remote: refactor duplicated cleanup code
authorJay Soffian <jaysoffian@gmail.com>
Wed, 25 Feb 2009 08:32:19 +0000 (03:32 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Feb 2009 23:19:08 +0000 (15:19 -0800)
commit88733235615b24198599b533f9d02578ef739536
treed7917b0dc308fee526640a983caf56b20b2b1eb0
parentc6f5a7a916b36fc9dd00bb6dce3b68260579abe1
builtin-remote: refactor duplicated cleanup code

This patch moves identical lines of code into a cleanup function. The
function has two callers and is about to gain a third.

Also removed a bogus NEEDSWORK comment per Daniel Barkalow:

  Actually, the comment is wrong; "remote" comes from remote_get(),
  which returns things from a cache in remote.c; there could be a
  remote_put() to let the code know that the caller is done with the
  object, but it wouldn't presently do anything.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-remote.c