title: gitpython to check for if there are any changes in files using PYTHON
body: <p>I am experimenting with gitpython and I am new to it. I am trying to detect if there are any changes staged for commit.</p>
  
  <p>Currently, I have a function that looks like this:</p>
  
  <pre><code>def commit(dir):
  r = Repo(dir)
  r.git.add(A=True)
  r.git.commit(m='commit all')
  </code></pre>
  
  <p>But this is just the code to commit the directory. I wanna do something like, if there are changes, then display some message, else, display another message.</p>
  
  <p>Anybody have any idea how do I do it in python ?</p>