##// END OF EJS Templates
git: added identify command for checking the current checkout commit
marcink -
r2057:971549ce default
parent child Browse files
Show More
@@ -704,6 +704,19 b' class GitRepository(BaseRepository):'
704 cmd.append(branch_name)
704 cmd.append(branch_name)
705 self.run_git_command(cmd, fail_on_stderr=False)
705 self.run_git_command(cmd, fail_on_stderr=False)
706
706
707 def _identify(self):
708 """
709 Return the current state of the working directory.
710 """
711 if self.bare:
712 raise RepositoryError('Bare git repos do not have active branches')
713
714 if self.is_empty():
715 return None
716
717 stdout, _ = self.run_git_command(['rev-parse', 'HEAD'])
718 return stdout.strip()
719
707 def _local_clone(self, clone_path, branch_name):
720 def _local_clone(self, clone_path, branch_name):
708 """
721 """
709 Create a local clone of the current repo.
722 Create a local clone of the current repo.
General Comments 0
You need to be logged in to leave comments. Login now