This might be the same issue as the other open issue.
I can call shell_exec commands directly in the plugin. I mocked this up:
<?php
echo shell_exec( 'cd ' . 'c://xampp/htdocs/normal_site_dev/wp-content/plugins/my-plugin' . ' && git rev-parse --abbrev-ref HEAD' );
and navigated directly to the script (shell.php, located in c://xampp/htdocs/normal_site_dev/wp-content/display-git-status/shell.php).
And got the desired output. It seems there is something missing in the chain, but I haven’t figured that out yet.
UPDATE:
by removing escapeshellcmd in dgs_get_branch_name and dgs_is_up_to_date, the plugin then displayed the branch name correctly.
]]>Hi,
I just installed the plugin “Display Git Status” and I wanted to try it out. But all the time I get the message
The saved location is not a git repository! The git status menu item will be hidden from view.
In the text field “Git Repository Location” I entered the value /var/www/html/wp-content
. This directory is a local git repository. When I change into that directory and enter the command git rev-parse --abbrev-ref HEAD
, I get master
as result. “ls -al” in that directory gives me this
root@beb35a1d43af:/var/www/html/wp-content# ls -al
total 36
drwxrwxrwx 8 www-data www-data 4096 Jan 19 22:31 .
drwxrwxrwx 5 www-data www-data 4096 Jan 19 22:24 ..
drwxr-xr-x 8 www-data www-data 4096 Jan 19 22:30 .git
drwxrwxrwx 2 www-data www-data 4096 Jan 12 22:50 cache
-rw-r–r– 1 www-data www-data 28 Jan 8 2012 index.php
drwxrwxrwx 4 www-data www-data 4096 Jan 19 21:56 languages
drwxr-xr-x 4 www-data www-data 4096 Jan 19 21:56 plugins
drwxr-xr-x 5 www-data www-data 4096 Dec 8 22:13 themes
drwxrwxrwx 2 www-data www-data 4096 Jan 19 21:56 upgrade
So, as far as I know I should something else than the error message above. So, why is that ?
]]>