title: Get latest git tag from the current commit
body: <p>I am trying to get the latest git tag from a certain point in my tree.</p>
  
  <p>The tree looks as follows:</p>
  
  <pre><code>* 334322c|2016-12-06| (tag: 0.1265, tag: 0.1264) (18 hours ago)
  * 739392e|2016-12-06| (HEAD -&gt; testbranch, tag: 0.1263, tag: 0.1262) (19 hours ago)
  * 8ec1add|2016-12-06| (tag: 0.1261, tag: 0.1260, tag: 0.1259) (20 hours ago)
  * 5b2667b|2016-12-06| (tag: 0.1258) (21 hours ago)
  * c7ff4bc|2016-12-06| (tag: 0.1257, tag: 0.1256) (22 hours ago)
  </code></pre>
  
  <p><code>0.1263</code> is the git tag I am looking for.</p>
  
  <p>When on <code>739392e</code> using <code>git describe --tags</code> returns only <code>0.1262</code> which is the first tag on that commit, and I'm not getting all the candidates.</p>
  
  <p>When on <code>739392e</code> using <code>git describe --tags $(git rev-list --tags --max-count=1)</code> returns <code>0.1265</code>, the latest tag on the tree (regardless of where the HEAD is).</p>