Lines Matching +full:bare +full:- +full:os
13 import os, warnings, logging
58 repo is up-to-date, if not update. It delegates the install to
71 in the current working directory for non bare repos.
72 In such repos the -git-dir option should point to
73 the .git directory and -work-tree should point to
75 Note: a bare reposotory is one which contains all the
77 (.git) in the same directory. This class assumes non-bare
90 self.gitpath = utils.sh_escape(os.path.join(self.repodir,'.git'))
97 self._build = os.path.dirname(self.repodir)
107 raise ValueError('Unsupported operation -- this object was not'
118 gitcmdbase = '%s --git-dir=%s' % (self.git_base_cmd,
121 gitcmdbase += ' --work-tree=%s' % self.work_tree
186 cmd += '-b %s' % remote_branch
188 cmd += '--depth 1'
213 cmd += '--rebase '
229 rv = self.gitcmd('commit -a -m \'%s\'' % msg)
287 self.gitcmd('reset --hard %s' % branch_or_sha,
294 Reset repo to HEAD@{0} by running git reset --hard HEAD.
301 rv = self.gitcmd('reset --hard HEAD')
315 rv = self.gitcmd('fetch --all')
336 # Re-stat all files before comparing index. This is needed for
337 # diff-index to work properly in cases when the stat info on files is
340 rv = self.gitcmd('update-index --refresh -q',
344 'diff-index --quiet HEAD --',
358 self.gitcmd('checkout -f',
361 self.gitcmd('clean -qxdf',
372 this method will leave an up-to-date version of git repo at
382 # exiting repo, check if we're up-to-date
385 logging.info('repo up-to-date')
397 cmd = 'log --pretty=format:"%H" -1'
410 cmd2 = 'log --pretty=format:"%H" -1 ' + origin_name_cmd.stdout.strip()
424 # local is out-of-date, pull
436 repo is empty. Assumes non-bare reposotories like the rest of this file.
440 cmd = 'count-objects'
458 cmd = 'rev-list -n 1 --all'
486 cmd = 'rev-parse --verify HEAD'
510 cmd = 'checkout -b %s %s' % (local, remote)
525 @param all: List both remote-tracking branches and local branches (True)
527 @param remote_tracking: Lists the remote-tracking branches.
532 cmd = 'branch --no-color'
534 cmd = " ".join([cmd, "-a"])
536 cmd = " ".join([cmd, "-r"])
554 @param short: Whether to give the output in the short-format.
559 cmd += ' -s'