[wp-trac] [WordPress Trac] #41078: Detect if someone’s site is under version control, and suggest better ways to edit their sites
WordPress Trac
noreply at wordpress.org
Tue Sep 19 07:31:51 UTC 2017
#41078: Detect if someone’s site is under version control, and suggest better ways
to edit their sites
----------------------------+------------------
Reporter: karmatosed | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: close | Focuses:
----------------------------+------------------
Changes (by westonruter):
* keywords: => close
Comment:
One solution that comes to mind is that WordPress could detect whether or
not a theme or plugin's files are versioned by first locating the `.git`
or `.svn` directory to sniff the VCS type, and then it could run `svn info
%s` or `git ls-files --error-unmatch %s` to determine if it is versioned.
While that would work, it would also not work reliably across WordPress
installs because hosts will often disable shell commands. This is the same
issue we're facing in wanting to add a PHP linter for CodeMirror in
#41873. So unless there is a way to sniff inside of `.git` and `.svn`
directories to find out whether a given file is versioned (as @dd32
notes), I don't see this as being feasible. I also don't think we want to
write Git or SVN clients in PHP.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41078#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list