fetch: move 'head' so it's visible to the whole function Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>