You are not logged in.

#1 2012-08-22 01:21:37

synthetic
Member
Registered: 2012-06-20
Posts: 16

[SOLVED] __git_ps1 isn't found anymore

Hi,
with the recent update of git to 1.7.12-1 the __git_ps1 prompting function can't be found anymore (needed in my command prompt). I had a look into the changelog:
https://raw.github.com/gitster/git/mast … 1.7.12.txt
and it seems this has been refactored into another script (/usr/share/git/git-prompt.sh).

I think the function was stored in the environment (I could see it before when typing in "set"), but after the update it isn't anymore. This could be a bug, but since I'm a relative noob, I'm not sure. So my question is, how do I get a function into the "set" list? Do I have to source something in my .bashrc?

Thanks for any help.

Last edited by synthetic (2012-08-22 02:02:47)

Offline

#2 2012-08-22 01:25:44

synthetic
Member
Registered: 2012-06-20
Posts: 16

Re: [SOLVED] __git_ps1 isn't found anymore

I just tried sourcing /usr/share/git/git-prompt.sh, and that works. But shouldn't there be a way to include this with the other git functions?

Offline

#3 2012-08-22 01:38:29

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,472
Website

Re: [SOLVED] __git_ps1 isn't found anymore

bash completion has moved to being on demand rather than completely source all completion functions at once.  That means that the git prompt would not be set and it was split into the separate file.  Read the note at the start of that file you found.

Offline

#4 2012-08-22 02:02:23

synthetic
Member
Registered: 2012-06-20
Posts: 16

Re: [SOLVED] __git_ps1 isn't found anymore

If I had just gone one little step further...

Thanks!

Offline

#5 2012-09-19 20:04:22

mloskot
Member
From: London, United Kingdom
Registered: 2012-06-01
Posts: 86
Website

Re: [SOLVED] __git_ps1 isn't found anymore

There seem to be need for Git wiki update. I've linked this thread to the Git Talk.


Mateusz Loskot | github | archlinux-config
Arch (x86-64) | ThinkPad T400  | Intel P8600| Intel i915
Arch (x86-64) | ThinkPad W700 | Intel T9600 | NVIDIA Quadro FX 2700M

Offline

Board footer

Powered by FluxBB