We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unconfigured git error
Git repository might be created but git might be not configured.
The results of this failure:
1. .gitignore file was not created.
2. change was not committed

```
c:\src\tmp>dvc init
Directories data/, .cache/ and .state/ were created
Error. Git command error (git commit -m DVC init. data dir data, cache dir .cache, state dir .state):
*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <(NULL)>) not allowed
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dvc/git_wrapper.py`
Content:
```
1 import os
2 
3 from dvc.logger import Logger
4 from dvc.config import Config
5 from dvc.executor import Executor, ExecutorError
6 from dvc.system import System
7 
8 
9 class GitWrapperI(object):
10     COMMIT_LEN = 7
11 
12     def __init__(self, git_dir=None, commit=None):
13         self._git_dir = git_dir
14         self._commit = commit
15 
16     @property
17     def git_dir(self):
18         return self._git_dir
19 
20     @property
21     def lock_file(self):
22         return os.path.join(self.git_dir_abs, '.' + Config.CONFIG + '.lock')
23 
24     @property
25     def git_dir_abs(self):
26         return System.realpath(self.git_dir)
27 
28     @property
29     def curr_dir_abs(self):
30         return os.path.abspath(os.curdir)
31 
32     @property
33     def curr_commit(self):
34         return self._commit
35 
36     def is_ready_to_go(self):
37         return True
38 
39     @staticmethod
40     def git_file_statuses():
41         Logger.debug('[dvc-git] Getting file statuses. Command: git status --porcelain')
42         code, out, err = Executor.exec_cmd(['git', 'status', '--porcelain'])
43         if code != 0:
44             raise ExecutorError('[dvc-git] File status command error - {}'.format(err))
45         Logger.debug('[dvc-git] Getting file statuses. Success.')
46 
47         return GitWrapper.parse_porcelain_files(out)
48 
49     @staticmethod
50     def git_path_to_system_path(path):
51         if os.name == 'nt':
52             return path.replace('/', '\\')
53         return path
54 
55     @staticmethod
56     def parse_porcelain_files(out):
57         result = []
58         if len(out) > 0:
59             lines = out.split('\n')
60             for line in lines:
61                 status = line[:2]
62                 file = GitWrapperI.git_path_to_system_path(line[3:])
63                 result.append((status, file))
64         return result
65 
66     def abs_paths_to_dvc(self, files):
67         result = []
68         for file in files:
69             result.append(os.path.relpath(os.path.abspath(file), self.git_dir_abs))
70 
71         return result
72 
73     def commit_all_changes_and_log_status(self, message):
74         pass
75 
76 
77 class GitWrapper(GitWrapperI):
78     def __init__(self):
79         super(GitWrapper, self).__init__()
80 
81     def is_ready_to_go(self):
82         statuses = self.git_file_statuses()
83         if len(statuses) > 0:
84             Logger.error('[dvc-git] Commit all changed files before running reproducible command. Changed files:')
85             for status, file in statuses:
86                 Logger.error("{} {}".format(status, file))
87             return False
88 
89         return True
90 
91     @property
92     def curr_dir_dvc(self):
93         return os.path.relpath(os.path.abspath(os.curdir), self.git_dir_abs)
94 
95     @property
96     def git_dir(self):
97         if self._git_dir:
98             return self._git_dir
99 
100         try:
101             Logger.debug('[dvc-git] Getting git directory. Command: git rev-parse --show-toplevel')
102             code, out, err = Executor.exec_cmd(['git', 'rev-parse', '--show-toplevel'])
103 
104             if code != 0:
105                 raise ExecutorError('[dvc-git] Git directory command error - {}'.format(err))
106             Logger.debug('[dvc-git] Getting git directory. Success.')
107 
108             self._git_dir = out
109             return self._git_dir
110         except ExecutorError:
111             raise
112         except Exception as e:
113             raise ExecutorError('Unable to run git command: {}'.format(e))
114         pass
115 
116     @property
117     def curr_commit(self):
118         Logger.debug('[dvc-git] Getting current git commit. Command: git rev-parse --short HEAD')
119 
120         code, out, err = Executor.exec_cmd(['git', 'rev-parse', '--short', 'HEAD'])
121         if code != 0:
122             raise ExecutorError('[dvc-git] Commit command error - {}'.format(err))
123         Logger.debug('[dvc-git] Getting current git commit. Success.')
124         return out
125 
126     @staticmethod
127     def commit_all_changes(message):
128         Logger.debug('[dvc-git] Commit all changes. Commands: {} && {} && {}'.format(
129             'git add --all', 'git status --porcelain', 'git commit -m'))
130 
131         Executor.exec_cmd_only_success(['git', 'add', '--all'])
132         out_status = Executor.exec_cmd_only_success(['git', 'status', '--porcelain'])
133         Executor.exec_cmd_only_success(['git', 'commit', '-m', message])
134         Logger.debug('[dvc-git] Commit all changes. Success.')
135 
136         return GitWrapper.parse_porcelain_files(out_status)
137 
138     def commit_all_changes_and_log_status(self, message):
139         statuses = self.commit_all_changes(message)
140         Logger.debug('[dvc-git] A new commit {} was made in the current branch. Added files:'.format(
141             self.curr_commit))
142         for status, file in statuses:
143             Logger.debug('[dvc-git]\t{} {}'.format(status, file))
144         pass
145 
146     @staticmethod
147     def abs_paths_to_relative(files):
148         cur_dir = System.realpath(os.curdir)
149 
150         result = []
151         for file in files:
152             result.append(os.path.relpath(System.realpath(file), cur_dir))
153 
154         return result
155 
156     def dvc_paths_to_abs(self, files):
157         results = []
158 
159         for file in files:
160             results.append(os.path.join(self.git_dir_abs, file))
161 
162         return results
163 
164     def were_files_changed(self, code_dependencies, path_factory, changed_files):
165         code_files, code_dirs = self.separate_dependency_files_and_dirs(code_dependencies)
166         code_files_set = set([path_factory.path(x).dvc for x in code_files])
167         for changed_file in changed_files:
168             if changed_file in code_files_set:
169                 return True
170 
171             for dir in code_dirs:
172                 if changed_file.startswith(dir):
173                     return True
174 
175         return False
176 
177     @staticmethod
178     def get_changed_files(target_commit):
179         Logger.debug('[dvc-git] Identify changes. Command: git diff --name-only HEAD {}'.format(
180             target_commit))
181 
182         changed_files_str = Executor.exec_cmd_only_success(['git', 'diff', '--name-only', 'HEAD', target_commit])
183         changed_files = changed_files_str.strip('"').split('\n')
184 
185         Logger.debug('[dvc-git] Identify changes. Success. Changed files: {}'.format(
186             ', '.join(changed_files)))
187         return changed_files
188 
189     @staticmethod
190     def get_target_commit(file):
191         try:
192             commit = Executor.exec_cmd_only_success(['git', 'log', '-1', '--pretty=format:"%h"', file])
193             return commit.strip('"')
194         except ExecutorError:
195             return None
196 
197     def separate_dependency_files_and_dirs(self, code_dependencies):
198         code_files = []
199         code_dirs = []
200 
201         code_dependencies_abs = self.dvc_paths_to_abs(code_dependencies)
202         for code in code_dependencies_abs:
203             if os.path.isdir(code):
204                 code_dirs.append(code)
205             else:
206                 code_files.append(code)
207 
208         return code_files, code_dirs
209
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/dvc/git_wrapper.py b/dvc/git_wrapper.py
--- a/dvc/git_wrapper.py
+++ b/dvc/git_wrapper.py
@@ -46,6 +46,15 @@
 
         return GitWrapper.parse_porcelain_files(out)
 
+    @staticmethod
+    def git_config_get(name):
+        code, out, err = Executor.exec_cmd(['git', 'config', '--get', name])
+        Logger.debug('[dvc-git] "git config --get {}": code({}), out({}), err({})'.format(
+                                                               name, code, out, err))
+        if code != 0:
+            return None
+        return out
+
     @staticmethod
     def git_path_to_system_path(path):
         if os.name == 'nt':
@@ -86,6 +95,17 @@
                 Logger.error("{} {}".format(status, file))
             return False
 
+        # Sanity check to make sure we will be able to commit
+        name = self.git_config_get('user.name')
+        if name == None:
+            Logger.error('[dvc-git] Please setup user.name in git config')
+            return False
+
+        email = self.git_config_get('user.email')
+        if email == None:
+            Logger.error('[dvc-git] Please setup user.email in git config')
+            return False
+
         return True
 
     @property

{"golden_diff": "diff --git a/dvc/git_wrapper.py b/dvc/git_wrapper.py\n--- a/dvc/git_wrapper.py\n+++ b/dvc/git_wrapper.py\n@@ -46,6 +46,15 @@\n \n         return GitWrapper.parse_porcelain_files(out)\n \n+    @staticmethod\n+    def git_config_get(name):\n+        code, out, err = Executor.exec_cmd(['git', 'config', '--get', name])\n+        Logger.debug('[dvc-git] \"git config --get {}\": code({}), out({}), err({})'.format(\n+                                                               name, code, out, err))\n+        if code != 0:\n+            return None\n+        return out\n+\n     @staticmethod\n     def git_path_to_system_path(path):\n         if os.name == 'nt':\n@@ -86,6 +95,17 @@\n                 Logger.error(\"{} {}\".format(status, file))\n             return False\n \n+        # Sanity check to make sure we will be able to commit\n+        name = self.git_config_get('user.name')\n+        if name == None:\n+            Logger.error('[dvc-git] Please setup user.name in git config')\n+            return False\n+\n+        email = self.git_config_get('user.email')\n+        if email == None:\n+            Logger.error('[dvc-git] Please setup user.email in git config')\n+            return False\n+\n         return True\n \n     @property\n", "issue": "Unconfigured git error\nGit repository might be created but git might be not configured.\r\nThe results of this failure:\r\n1. .gitignore file was not created.\r\n2. change was not committed\r\n\r\n```\r\nc:\\src\\tmp>dvc init\r\nDirectories data/, .cache/ and .state/ were created\r\nError. Git command error (git commit -m DVC init. data dir data, cache dir .cache, state dir .state):\r\n*** Please tell me who you are.\r\n\r\nRun\r\n\r\n  git config --global user.email \"you@example.com\"\r\n  git config --global user.name \"Your Name\"\r\n\r\nto set your account's default identity.\r\nOmit --global to set the identity only in this repository.\r\n\r\nfatal: empty ident name (for <(NULL)>) not allowed\r\n```\n", "before_files": [{"content": "import os\n\nfrom dvc.logger import Logger\nfrom dvc.config import Config\nfrom dvc.executor import Executor, ExecutorError\nfrom dvc.system import System\n\n\nclass GitWrapperI(object):\n    COMMIT_LEN = 7\n\n    def __init__(self, git_dir=None, commit=None):\n        self._git_dir = git_dir\n        self._commit = commit\n\n    @property\n    def git_dir(self):\n        return self._git_dir\n\n    @property\n    def lock_file(self):\n        return os.path.join(self.git_dir_abs, '.' + Config.CONFIG + '.lock')\n\n    @property\n    def git_dir_abs(self):\n        return System.realpath(self.git_dir)\n\n    @property\n    def curr_dir_abs(self):\n        return os.path.abspath(os.curdir)\n\n    @property\n    def curr_commit(self):\n        return self._commit\n\n    def is_ready_to_go(self):\n        return True\n\n    @staticmethod\n    def git_file_statuses():\n        Logger.debug('[dvc-git] Getting file statuses. Command: git status --porcelain')\n        code, out, err = Executor.exec_cmd(['git', 'status', '--porcelain'])\n        if code != 0:\n            raise ExecutorError('[dvc-git] File status command error - {}'.format(err))\n        Logger.debug('[dvc-git] Getting file statuses. Success.')\n\n        return GitWrapper.parse_porcelain_files(out)\n\n    @staticmethod\n    def git_path_to_system_path(path):\n        if os.name == 'nt':\n            return path.replace('/', '\\\\')\n        return path\n\n    @staticmethod\n    def parse_porcelain_files(out):\n        result = []\n        if len(out) > 0:\n            lines = out.split('\\n')\n            for line in lines:\n                status = line[:2]\n                file = GitWrapperI.git_path_to_system_path(line[3:])\n                result.append((status, file))\n        return result\n\n    def abs_paths_to_dvc(self, files):\n        result = []\n        for file in files:\n            result.append(os.path.relpath(os.path.abspath(file), self.git_dir_abs))\n\n        return result\n\n    def commit_all_changes_and_log_status(self, message):\n        pass\n\n\nclass GitWrapper(GitWrapperI):\n    def __init__(self):\n        super(GitWrapper, self).__init__()\n\n    def is_ready_to_go(self):\n        statuses = self.git_file_statuses()\n        if len(statuses) > 0:\n            Logger.error('[dvc-git] Commit all changed files before running reproducible command. Changed files:')\n            for status, file in statuses:\n                Logger.error(\"{} {}\".format(status, file))\n            return False\n\n        return True\n\n    @property\n    def curr_dir_dvc(self):\n        return os.path.relpath(os.path.abspath(os.curdir), self.git_dir_abs)\n\n    @property\n    def git_dir(self):\n        if self._git_dir:\n            return self._git_dir\n\n        try:\n            Logger.debug('[dvc-git] Getting git directory. Command: git rev-parse --show-toplevel')\n            code, out, err = Executor.exec_cmd(['git', 'rev-parse', '--show-toplevel'])\n\n            if code != 0:\n                raise ExecutorError('[dvc-git] Git directory command error - {}'.format(err))\n            Logger.debug('[dvc-git] Getting git directory. Success.')\n\n            self._git_dir = out\n            return self._git_dir\n        except ExecutorError:\n            raise\n        except Exception as e:\n            raise ExecutorError('Unable to run git command: {}'.format(e))\n        pass\n\n    @property\n    def curr_commit(self):\n        Logger.debug('[dvc-git] Getting current git commit. Command: git rev-parse --short HEAD')\n\n        code, out, err = Executor.exec_cmd(['git', 'rev-parse', '--short', 'HEAD'])\n        if code != 0:\n            raise ExecutorError('[dvc-git] Commit command error - {}'.format(err))\n        Logger.debug('[dvc-git] Getting current git commit. Success.')\n        return out\n\n    @staticmethod\n    def commit_all_changes(message):\n        Logger.debug('[dvc-git] Commit all changes. Commands: {} && {} && {}'.format(\n            'git add --all', 'git status --porcelain', 'git commit -m'))\n\n        Executor.exec_cmd_only_success(['git', 'add', '--all'])\n        out_status = Executor.exec_cmd_only_success(['git', 'status', '--porcelain'])\n        Executor.exec_cmd_only_success(['git', 'commit', '-m', message])\n        Logger.debug('[dvc-git] Commit all changes. Success.')\n\n        return GitWrapper.parse_porcelain_files(out_status)\n\n    def commit_all_changes_and_log_status(self, message):\n        statuses = self.commit_all_changes(message)\n        Logger.debug('[dvc-git] A new commit {} was made in the current branch. Added files:'.format(\n            self.curr_commit))\n        for status, file in statuses:\n            Logger.debug('[dvc-git]\\t{} {}'.format(status, file))\n        pass\n\n    @staticmethod\n    def abs_paths_to_relative(files):\n        cur_dir = System.realpath(os.curdir)\n\n        result = []\n        for file in files:\n            result.append(os.path.relpath(System.realpath(file), cur_dir))\n\n        return result\n\n    def dvc_paths_to_abs(self, files):\n        results = []\n\n        for file in files:\n            results.append(os.path.join(self.git_dir_abs, file))\n\n        return results\n\n    def were_files_changed(self, code_dependencies, path_factory, changed_files):\n        code_files, code_dirs = self.separate_dependency_files_and_dirs(code_dependencies)\n        code_files_set = set([path_factory.path(x).dvc for x in code_files])\n        for changed_file in changed_files:\n            if changed_file in code_files_set:\n                return True\n\n            for dir in code_dirs:\n                if changed_file.startswith(dir):\n                    return True\n\n        return False\n\n    @staticmethod\n    def get_changed_files(target_commit):\n        Logger.debug('[dvc-git] Identify changes. Command: git diff --name-only HEAD {}'.format(\n            target_commit))\n\n        changed_files_str = Executor.exec_cmd_only_success(['git', 'diff', '--name-only', 'HEAD', target_commit])\n        changed_files = changed_files_str.strip('\"').split('\\n')\n\n        Logger.debug('[dvc-git] Identify changes. Success. Changed files: {}'.format(\n            ', '.join(changed_files)))\n        return changed_files\n\n    @staticmethod\n    def get_target_commit(file):\n        try:\n            commit = Executor.exec_cmd_only_success(['git', 'log', '-1', '--pretty=format:\"%h\"', file])\n            return commit.strip('\"')\n        except ExecutorError:\n            return None\n\n    def separate_dependency_files_and_dirs(self, code_dependencies):\n        code_files = []\n        code_dirs = []\n\n        code_dependencies_abs = self.dvc_paths_to_abs(code_dependencies)\n        for code in code_dependencies_abs:\n            if os.path.isdir(code):\n                code_dirs.append(code)\n            else:\n                code_files.append(code)\n\n        return code_files, code_dirs\n", "path": "dvc/git_wrapper.py"}], "after_files": [{"content": "import os\n\nfrom dvc.logger import Logger\nfrom dvc.config import Config\nfrom dvc.executor import Executor, ExecutorError\nfrom dvc.system import System\n\n\nclass GitWrapperI(object):\n    COMMIT_LEN = 7\n\n    def __init__(self, git_dir=None, commit=None):\n        self._git_dir = git_dir\n        self._commit = commit\n\n    @property\n    def git_dir(self):\n        return self._git_dir\n\n    @property\n    def lock_file(self):\n        return os.path.join(self.git_dir_abs, '.' + Config.CONFIG + '.lock')\n\n    @property\n    def git_dir_abs(self):\n        return System.realpath(self.git_dir)\n\n    @property\n    def curr_dir_abs(self):\n        return os.path.abspath(os.curdir)\n\n    @property\n    def curr_commit(self):\n        return self._commit\n\n    def is_ready_to_go(self):\n        return True\n\n    @staticmethod\n    def git_file_statuses():\n        Logger.debug('[dvc-git] Getting file statuses. Command: git status --porcelain')\n        code, out, err = Executor.exec_cmd(['git', 'status', '--porcelain'])\n        if code != 0:\n            raise ExecutorError('[dvc-git] File status command error - {}'.format(err))\n        Logger.debug('[dvc-git] Getting file statuses. Success.')\n\n        return GitWrapper.parse_porcelain_files(out)\n\n    @staticmethod\n    def git_config_get(name):\n        code, out, err = Executor.exec_cmd(['git', 'config', '--get', name])\n        Logger.debug('[dvc-git] \"git config --get {}\": code({}), out({}), err({})'.format(\n                                                               name, code, out, err))\n        if code != 0:\n            return None\n        return out\n\n    @staticmethod\n    def git_path_to_system_path(path):\n        if os.name == 'nt':\n            return path.replace('/', '\\\\')\n        return path\n\n    @staticmethod\n    def parse_porcelain_files(out):\n        result = []\n        if len(out) > 0:\n            lines = out.split('\\n')\n            for line in lines:\n                status = line[:2]\n                file = GitWrapperI.git_path_to_system_path(line[3:])\n                result.append((status, file))\n        return result\n\n    def abs_paths_to_dvc(self, files):\n        result = []\n        for file in files:\n            result.append(os.path.relpath(os.path.abspath(file), self.git_dir_abs))\n\n        return result\n\n    def commit_all_changes_and_log_status(self, message):\n        pass\n\n\nclass GitWrapper(GitWrapperI):\n    def __init__(self):\n        super(GitWrapper, self).__init__()\n\n    def is_ready_to_go(self):\n        statuses = self.git_file_statuses()\n        if len(statuses) > 0:\n            Logger.error('[dvc-git] Commit all changed files before running reproducible command. Changed files:')\n            for status, file in statuses:\n                Logger.error(\"{} {}\".format(status, file))\n            return False\n\n        # Sanity check to make sure we will be able to commit\n        name = self.git_config_get('user.name')\n        if name == None:\n            Logger.error('[dvc-git] Please setup user.name in git config')\n            return False\n\n        email = self.git_config_get('user.email')\n        if email == None:\n            Logger.error('[dvc-git] Please setup user.email in git config')\n            return False\n\n        return True\n\n    @property\n    def curr_dir_dvc(self):\n        return os.path.relpath(os.path.abspath(os.curdir), self.git_dir_abs)\n\n    @property\n    def git_dir(self):\n        if self._git_dir:\n            return self._git_dir\n\n        try:\n            Logger.debug('[dvc-git] Getting git directory. Command: git rev-parse --show-toplevel')\n            code, out, err = Executor.exec_cmd(['git', 'rev-parse', '--show-toplevel'])\n\n            if code != 0:\n                raise ExecutorError('[dvc-git] Git directory command error - {}'.format(err))\n            Logger.debug('[dvc-git] Getting git directory. Success.')\n\n            self._git_dir = out\n            return self._git_dir\n        except ExecutorError:\n            raise\n        except Exception as e:\n            raise ExecutorError('Unable to run git command: {}'.format(e))\n        pass\n\n    @property\n    def curr_commit(self):\n        Logger.debug('[dvc-git] Getting current git commit. Command: git rev-parse --short HEAD')\n\n        code, out, err = Executor.exec_cmd(['git', 'rev-parse', '--short', 'HEAD'])\n        if code != 0:\n            raise ExecutorError('[dvc-git] Commit command error - {}'.format(err))\n        Logger.debug('[dvc-git] Getting current git commit. Success.')\n        return out\n\n    @staticmethod\n    def commit_all_changes(message):\n        Logger.debug('[dvc-git] Commit all changes. Commands: {} && {} && {}'.format(\n            'git add --all', 'git status --porcelain', 'git commit -m'))\n\n        Executor.exec_cmd_only_success(['git', 'add', '--all'])\n        out_status = Executor.exec_cmd_only_success(['git', 'status', '--porcelain'])\n        Executor.exec_cmd_only_success(['git', 'commit', '-m', message])\n        Logger.debug('[dvc-git] Commit all changes. Success.')\n\n        return GitWrapper.parse_porcelain_files(out_status)\n\n    def commit_all_changes_and_log_status(self, message):\n        statuses = self.commit_all_changes(message)\n        Logger.debug('[dvc-git] A new commit {} was made in the current branch. Added files:'.format(\n            self.curr_commit))\n        for status, file in statuses:\n            Logger.debug('[dvc-git]\\t{} {}'.format(status, file))\n        pass\n\n    @staticmethod\n    def abs_paths_to_relative(files):\n        cur_dir = System.realpath(os.curdir)\n\n        result = []\n        for file in files:\n            result.append(os.path.relpath(System.realpath(file), cur_dir))\n\n        return result\n\n    def dvc_paths_to_abs(self, files):\n        results = []\n\n        for file in files:\n            results.append(os.path.join(self.git_dir_abs, file))\n\n        return results\n\n    def were_files_changed(self, code_dependencies, path_factory, changed_files):\n        code_files, code_dirs = self.separate_dependency_files_and_dirs(code_dependencies)\n        code_files_set = set([path_factory.path(x).dvc for x in code_files])\n        for changed_file in changed_files:\n            if changed_file in code_files_set:\n                return True\n\n            for dir in code_dirs:\n                if changed_file.startswith(dir):\n                    return True\n\n        return False\n\n    @staticmethod\n    def get_changed_files(target_commit):\n        Logger.debug('[dvc-git] Identify changes. Command: git diff --name-only HEAD {}'.format(\n            target_commit))\n\n        changed_files_str = Executor.exec_cmd_only_success(['git', 'diff', '--name-only', 'HEAD', target_commit])\n        changed_files = changed_files_str.strip('\"').split('\\n')\n\n        Logger.debug('[dvc-git] Identify changes. Success. Changed files: {}'.format(\n            ', '.join(changed_files)))\n        return changed_files\n\n    @staticmethod\n    def get_target_commit(file):\n        try:\n            commit = Executor.exec_cmd_only_success(['git', 'log', '-1', '--pretty=format:\"%h\"', file])\n            return commit.strip('\"')\n        except ExecutorError:\n            return None\n\n    def separate_dependency_files_and_dirs(self, code_dependencies):\n        code_files = []\n        code_dirs = []\n\n        code_dependencies_abs = self.dvc_paths_to_abs(code_dependencies)\n        for code in code_dependencies_abs:\n            if os.path.isdir(code):\n                code_dirs.append(code)\n            else:\n                code_files.append(code)\n\n        return code_files, code_dirs\n", "path": "dvc/git_wrapper.py"}]}