Skip to content

Commit

Permalink
git: partial transparent git status if repo is clean
Browse files Browse the repository at this point in the history
  • Loading branch information
ibressler committed Sep 28, 2020
1 parent 95e7851 commit b2fc0e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def checkRepo():
# currentNB = os.path.basename(currentNBpath())
editedOn = repo.git.show(no_patch=True, format="%cd, version %h by %cn", date="iso")
editedOn = editedOn.split(', ')
display(HTML('<h3>Document updated on {}</h3><h4>({})</h4>'.format(*editedOn)))
opacity = 1.0 if repo.is_dirty() else 0.5
display(HTML('<div style="opacity: {opacity};">'
'<h3>Document updated on {}</h3>'
'<h4>({})</h4></div>'.format(*editedOn, opacity=opacity)))
if repo.is_dirty():
edits = repo.git.diff(stat=True)
import re
Expand Down

0 comments on commit b2fc0e9

Please sign in to comment.