]> git.ipfire.org Git - thirdparty/git.git/commit - remote.c
remote: remove dead code in read_branches_file()
authorRamkumar Ramachandra <artagnon@gmail.com>
Sat, 22 Jun 2013 07:58:12 +0000 (13:28 +0530)
committerJunio C Hamano <gitster@pobox.com>
Sun, 23 Jun 2013 07:33:57 +0000 (00:33 -0700)
commit55cfde251b4bee36f64f2067cccc4ba346aaf1b0
tree76d11db51d104818c557f7ba054a7eeaef42476b
parentfe3c1956e2289f083cf6777b3ff22fe628c92951
remote: remove dead code in read_branches_file()

The first line of the function checks that the remote-name contains a
slash ('/'), and sets the "slash" variable accordingly.  The only caller
of read_branches_file() is remote_get_1(); the calling codepath is
guarded by valid_remote_nick(), which checks that the remote does not
contain a slash.  Therefore, the "slash" variable can never be set:
remove the dead code that assumes otherwise.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c