Remove unused variable.
Remove useless return statement.
Change PS2 symbol.
Use printf arguments for better readability.
Rename ps1_prompt to git_info_for_ps1. This tells more about what the function does.