diff --git a/git_deploy.module b/git_deploy.module
index e35ff7c..c3cb254 100644
--- a/git_deploy.module
+++ b/git_deploy.module
@@ -19,7 +19,7 @@
  *   Can be module or theme.
  */
 function git_deploy_system_info_alter(&$info, $file, $type = NULL) {
-  if (empty($info['version'])) {
+  if (empty($info['version']) || !preg_match('/^\d+\.x-\d+/', $info['version'])) {
     $directory = dirname($file->uri);
     // Check whether this belongs to core. Speed optimization.
     if (substr($directory, 0, strlen($type)) != $type) {
