This works by checking if any of the (immediate) files being listed are under Git, and hiding the column if all aren’t.