Skip to content

Instantly share code, notes, and snippets.

@shivamMg
Last active September 4, 2018 09:26
Show Gist options
  • Select an option

  • Save shivamMg/7ee191901af2db2107436379574a85fd to your computer and use it in GitHub Desktop.

Select an option

Save shivamMg/7ee191901af2db2107436379574a85fd to your computer and use it in GitHub Desktop.
git bisect
git clone github.com/go-openapi/spec && cd spec
# we need to know what commit was `PathLoader` added to the `spec` pkg
git bisect start --term-old not-defined --term-new defined
git bisect not-defined cb9ba12 # first commit
git bisect defined master
git bisect run isdefined.sh
#!/bin/bash
grep -r 'var PathLoader' .
if [ $? -eq 0 ]; then
# defined
exit 1
else
# not defined
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment