project-stats

keep track of your projects
git clone https://git.ce9e.org/project-stats.git

commit
676f0ee8788261a4f9077b67bb960f5decadc916
parent
f7a0e9ec32f448d3047d92cb5b291d78600f70a0
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2015-03-22 14:57
extract additional information from git status

Diffstat

M projects.py 8 ++++++--

1 files changed, 6 insertions, 2 deletions


diff --git a/projects.py b/projects.py

@@ -30,7 +30,9 @@ KEYS = [
   30    30     'tests',
   31    31     'commit_count',
   32    32     'file_count',
   33    -1     'unstaged_files',
   -1    33     'unstaged_changes',
   -1    34     'uncommited_changes',
   -1    35     'up_to_date',
   34    36     'contributors',
   35    37     'downloads',
   36    38     'open_issues',
@@ -256,7 +258,9 @@ def get_local(path):
  256   258     return {
  257   259         'name': os.path.basename(path.rstrip('/')),
  258   260         'file_count': len(git('ls-files').splitlines()),
  259    -1         'unstaged_files': 'Changes not staged for commit' in git('status'),
   -1   261         'unstaged_changes': 'Changes not staged for commit' in git('status'),
   -1   262         'uncommited_changes': 'Changes to be committed' in git('status'),
   -1   263         'up_to_date': 'Your branch is up-to-date with' in git('status'),
  260   264         'commit_count': len(git('rev-list', 'HEAD').splitlines()),
  261   265         'version': get_latest_tag(),
  262   266         'contributors': len(git('shortlog', '-s').splitlines()),