• [^] # Re: C'est bon

    Posté par (site web personnel) . En réponse au message Historique de la taille du code avec git. Évalué à 3.

    Ah, le problème, c'est que ça bug alors j'ai pas voulu le mettre ici :-)

    Donc, je viens de trouver ce qui n'allait pas...

    #!/bin/bash
    > stat.txt
    previous_commit=""
    previous_date=""
    while true
    do
     commit=$(git log --oneline|head -n2|tail -n1 |cut -d ' ' -f1)
     if [[ "$commit" == "$previous_commit" ]]
     then
     break
     fi
     date=$(git show --date=format:'%Y-%m' $commit|grep Date|awk '{ print 2ドル }')
     git reset --hard $commit
     previous_commit=$commit
     if [[ "$date" == "$previous_date" ]]
     then
     continue
     fi
     count=$(find . -name '*.py' | xargs grep -v '#'| wc -l)
     echo $date $count >> stat.txt
     previous_date=$date
    done

    Et après j'ai fait un graph dans Libreoffice.