Lighting Normals

In a custom surface + custom lighting shader I visualized raw Normals and saw world space normals. When I modified the normal with something like

o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_BumpMap));

suddenly the normals are tangent space (mostly blue). How does unity's lighting handle this difference?

Turns out if SurfaceOutput.Normal is assigned to... the lighting's based on tangent normals... doh.