Skip to content

Instantly share code, notes, and snippets.

@bmcorser
Last active August 29, 2015 14:19
Show Gist options
  • Save bmcorser/9f73a4a7b428a65cd26b to your computer and use it in GitHub Desktop.
Save bmcorser/9f73a4a7b428a65cd26b to your computer and use it in GitHub Desktop.

Revisions

  1. bmcorser revised this gist Apr 24, 2015. 1 changed file with 4 additions and 26 deletions.
    30 changes: 4 additions & 26 deletions gistfile1.mak
    Original file line number Diff line number Diff line change
    @@ -1,26 +1,4 @@
    $ git log --format=%H > git-log # normal log
    $ cat git-log
    b4da36d7eb5e4f167bd269ec29c3f26e8f799c9e
    34283291e1f2e71f8540d03b2c73eb2b04bbc1aa
    35b8a229a984ef99841eb701da9258abf4a4ce60
    3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    b2f524d66720671d4a16ba35f88bf20c3830479c
    $ shuf git-log > git-log-shuf # shuffle the log
    $ cat git-log-shuf
    b4da36d7eb5e4f167bd269ec29c3f26e8f799c9e
    b2f524d66720671d4a16ba35f88bf20c3830479c
    3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    34283291e1f2e71f8540d03b2c73eb2b04bbc1aa
    35b8a229a984ef99841eb701da9258abf4a4ce60
    $ git rev-list --no-walk $(< git-log-shuf) > git-rev-list # pass shuffled log to rev-list
    cat git-rev-list
    b4da36d7eb5e4f167bd269ec29c3f26e8f799c9e
    34283291e1f2e71f8540d03b2c73eb2b04bbc1aa
    35b8a229a984ef99841eb701da9258abf4a4ce60
    b2f524d66720671d4a16ba35f88bf20c3830479c
    3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    $ diff git-log git-rev-list # why is it different?
    4d3
    < 3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    5a5
    > 3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    git log --format=%H > git-log
    shuf git-log > git-log-shuf
    git rev-list --no-walk $(< git-log-shuf) > git-rev-list
    diff git-log git-rev-list
  2. bmcorser renamed this gist Apr 23, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. bmcorser revised this gist Apr 23, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,25 +1,25 @@
    $ git log --format=%H > git-log
    $ git log --format=%H > git-log # normal log
    $ cat git-log
    b4da36d7eb5e4f167bd269ec29c3f26e8f799c9e
    34283291e1f2e71f8540d03b2c73eb2b04bbc1aa
    35b8a229a984ef99841eb701da9258abf4a4ce60
    3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    b2f524d66720671d4a16ba35f88bf20c3830479c
    $ shuf git-log > git-log-shuf
    $ shuf git-log > git-log-shuf # shuffle the log
    $ cat git-log-shuf
    b4da36d7eb5e4f167bd269ec29c3f26e8f799c9e
    b2f524d66720671d4a16ba35f88bf20c3830479c
    3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    34283291e1f2e71f8540d03b2c73eb2b04bbc1aa
    35b8a229a984ef99841eb701da9258abf4a4ce60
    $ git rev-list --no-walk $(< git-log-shuf) > git-rev-list
    $ git rev-list --no-walk $(< git-log-shuf) > git-rev-list # pass shuffled log to rev-list
    cat git-rev-list
    b4da36d7eb5e4f167bd269ec29c3f26e8f799c9e
    34283291e1f2e71f8540d03b2c73eb2b04bbc1aa
    35b8a229a984ef99841eb701da9258abf4a4ce60
    b2f524d66720671d4a16ba35f88bf20c3830479c
    3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    $ diff git-log git-rev-list
    $ diff git-log git-rev-list # why is it different?
    4d3
    < 3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    5a5
  4. bmcorser created this gist Apr 23, 2015.
    26 changes: 26 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    $ git log --format=%H > git-log
    $ cat git-log
    b4da36d7eb5e4f167bd269ec29c3f26e8f799c9e
    34283291e1f2e71f8540d03b2c73eb2b04bbc1aa
    35b8a229a984ef99841eb701da9258abf4a4ce60
    3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    b2f524d66720671d4a16ba35f88bf20c3830479c
    $ shuf git-log > git-log-shuf
    $ cat git-log-shuf
    b4da36d7eb5e4f167bd269ec29c3f26e8f799c9e
    b2f524d66720671d4a16ba35f88bf20c3830479c
    3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    34283291e1f2e71f8540d03b2c73eb2b04bbc1aa
    35b8a229a984ef99841eb701da9258abf4a4ce60
    $ git rev-list --no-walk $(< git-log-shuf) > git-rev-list
    cat git-rev-list
    b4da36d7eb5e4f167bd269ec29c3f26e8f799c9e
    34283291e1f2e71f8540d03b2c73eb2b04bbc1aa
    35b8a229a984ef99841eb701da9258abf4a4ce60
    b2f524d66720671d4a16ba35f88bf20c3830479c
    3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    $ diff git-log git-rev-list
    4d3
    < 3dcd39064a39c4a49c4439402c2a9b9dd26b38ef
    5a5
    > 3dcd39064a39c4a49c4439402c2a9b9dd26b38ef