Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Better way to find commit from tarball?

From: Todd A. Jacobs <hidden>
Date: 2016-06-15 22:49:30

Someone handed me a tarball that represented an unknown release from a
project. Here's what I came up with to identify the commit:

    cd $SOME_WORK_DIR
    find . -path ./.git -prune -o -print0 | xargs -0 rm
    tar xvfz $TARBALL
    for commit in {0..100}; do
        id="master~${commit}"
        if git diff --quiet --exit-code "$id"
        then
            echo "Matched on commit $id"
            break
        fi
    done

Someone please tell me there's an easier way to find a matching tree
when handed a tarball. This works, but seems cumbersome.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help