git tag - Get tags below a particular tag in git -


i trying find out tags less given number. have assigned numbers 1 2000 tags git . now, want display tags below particular tag number.

for example, query number (tag) 1234 , want git display tags less 1234. how can that?

to make sure understand, want compare tag names numerically? don't want compare tags in terms of commit ancestry?

if so, following shell code should work:

git tag | grep '^[0-9]*$' | while ifs= read -r tag;     [ "${tag}" -ge 1234 ] || printf %s\\n "${tag}" done 

the above tells git print tags, filters out non-number tags, loops on each numerical tag comparing numerical value. if it's less value, tag name printed.


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -

jquery - jqGrid update specific column data with out refreshing the entire column? -