Skip to content

Commit d79a70a

Browse files
committed
update git sort for git 2.x
1 parent 1e04784 commit d79a70a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

git-sort

100644100755
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
#!/bin/bash
22

3-
git rev-list HEAD --topo-sort -n 100 | grep -f shas.txt
3+
if [ -t 0 ]; then
4+
hashes="$@"
5+
else
6+
hashes=$(cat)
7+
fi
8+
9+
git rev-list HEAD --topo-order --abbrev-commit -n ${N:-1000} | grep -f <(echo "$hashes" | tr ' ' '\n')

0 commit comments

Comments
 (0)