Details

    • Similar Issues:

      Description

      Hello guys!

      Would be great if you can add natural sorting. Currently sorting tags digits looks like this:

      refs/tags/ver-2.2.0
      refs/tags/ver-2.2.1
      refs/tags/ver-2.2.10
      refs/tags/ver-2.2.11
      refs/tags/ver-2.2.12
      refs/tags/ver-2.2.13
      refs/tags/ver-2.2.14
      refs/tags/ver-2.2.15
      refs/tags/ver-2.2.16
      refs/tags/ver-2.2.17
      refs/tags/ver-2.2.18
      refs/tags/ver-2.2.19
      refs/tags/ver-2.2.2
      refs/tags/ver-2.2.20
      refs/tags/ver-2.2.21
      refs/tags/ver-2.2.3
      

      as you guess its confusing a bit

      expected output:

      refs/tags/ver-2.2.3
      refs/tags/ver-2.2.4
      refs/tags/ver-2.2.5
      refs/tags/ver-2.2.6
      refs/tags/ver-2.2.7
      refs/tags/ver-2.2.8
      refs/tags/ver-2.2.9
      refs/tags/ver-2.2.10
      refs/tags/ver-2.2.11
      refs/tags/ver-2.2.12
      refs/tags/ver-2.2.13
      refs/tags/ver-2.2.14
      refs/tags/ver-2.2.15
      refs/tags/ver-2.2.16
      refs/tags/ver-2.2.17
      refs/tags/ver-2.2.18
      refs/tags/ver-2.2.19
      

      Usefull command:

      git ls-remote -t <repository> "$tagFilter". | sort -t '/' -k 3 -V
      

      The best option would be sort by create tag date (git tag --sort=-creatordate), but I dont know git ls-remote allows his possibility.

        Attachments

          Activity

          Hide
          klimas7 Boguslaw Klimas added a comment -

          Hi,

          Please use sort options: 

          • ascending smart
          • descending smart

          This sort use natural order. About sort with 'creatordate' I have a few issue for this but this requires changes in git plugin.

          Show
          klimas7 Boguslaw Klimas added a comment - Hi, Please use sort options:  ascending smart descending smart This sort use natural order. About sort with 'creatordate' I have a few issue for this but this requires changes in git plugin.
          Hide
          rafalll r s added a comment - - edited

          oh, my bad.. I thought this doesn't work properly but semms to be ok.

          Thanks for quick reply Boguslaw!

          Show
          rafalll r s added a comment - - edited oh, my bad.. I thought this doesn't work properly but semms to be ok. Thanks for quick reply Boguslaw!

            People

            • Assignee:
              klimas7 Boguslaw Klimas
              Reporter:
              rafalll r s
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: