##// END OF EJS Templates
subrepo: bare git repos considered dirty...
Paul Molodowitch -
r14440:96f1c1b1 default
parent child Browse files
Show More
@@ -761,6 +761,9 b' class gitsubrepo(abstractsubrepo):'
761 761 base = self._gitcommand(['merge-base', r1, r2])
762 762 return base == r1
763 763
764 def _gitisbare(self):
765 return self._gitcommand(['config', '--bool', 'core.bare']) == 'true'
766
764 767 def _gitbranchmap(self):
765 768 '''returns 2 things:
766 769 a map from git branch to revision
@@ -823,6 +826,8 b' class gitsubrepo(abstractsubrepo):'
823 826 def dirty(self, ignoreupdate=False):
824 827 if self._gitmissing():
825 828 return True
829 if self._gitisbare():
830 return True
826 831 if not ignoreupdate and self._state[1] != self._gitstate():
827 832 # different version checked out
828 833 return True
@@ -834,7 +839,7 b' class gitsubrepo(abstractsubrepo):'
834 839 source, revision, kind = state
835 840 self._fetch(source, revision)
836 841 # if the repo was set to be bare, unbare it
837 if self._gitcommand(['config', '--bool', 'core.bare']) == 'true':
842 if self._gitisbare():
838 843 self._gitcommand(['config', 'core.bare', 'false'])
839 844 if self._gitstate() == revision:
840 845 self._gitcommand(['reset', '--hard', 'HEAD'])
General Comments 0
You need to be logged in to leave comments. Login now