Skip to content

Instantly share code, notes, and snippets.

@hilbix
Last active December 29, 2015 17:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hilbix/7703225 to your computer and use it in GitHub Desktop.
Save hilbix/7703225 to your computer and use it in GitHub Desktop.
GIT "relate" ALIAS to quickly show how all branches relate to HEAD (or given branch). GIT "graph" ALIAS to show the graph between two commits (from HEAD to it origin, or given branch, by default). `graph` Improved to highlight starting point (which is not always obvious).
~/mirror2git/svn/libdvdread(master u=)$ git graph1 debian/master
< eb96342 Free `cached_dir_base` to fix memory leak
= aa65bd3 Clear pf_temp to make sure it is initialized
< 32e7d70 Add an error message
< 6b1f63c Document warnings generated by DVDs made with the VDR-to-DVD device LG RC590M.
< 05d2760 Bump version for release.
< 215a339 Update changelog for release.
< 0fadece Fix packed structures with mingw gcc >= 4.7
= 124da75 Add ax_check_compile_flag to the m4 files
= 52182c8 Actually write WORDS_BIGENDIAN define into config.h if big endian is detected.
< 1e8bbde List interesting changes for next release.
= 1ef042e Fix undefined variable warning in md5.h.
< dc0dd74 Fix spelling errors.
= dce1b0a Use correct name of the libdvdcss DLL on Windows.
= 832dc6b If the start offset points past the last_byte (outside the region read) stop reading PTTs and adjust nr_of_srpts.
< 10db0e5 Add #define for DVDCSS_SEEK_KEY to allow compilation without dvdcss.h.
< fadfa15 Do not extract libdvdcss version via dvdcss_interface_2.
< b67445d Replace deprecated dvdcss_title() function by dvdcss_seek().
< 489754e Replace uses of the deprecated dvdcss_handle type by dvdcss_t.
< b60c530 Add missing strings.h #include for strcasecmp() / strncasecmp().
< 7591a58 Remove erroneous free().
= 7904d94 This patch fixes a segmentation fault hit when reading the DVD 'The Express'. It prevents a read/write beyond end of an array due to using a length value taken from the DVD, which can exceed the allocated size.
< 33c820d Accommodate duplicate language units and pgcs.
| > 3762e09 Fix packed structures with mingw gcc >= 4.7
| = 026f519 Add ax_check_compile_flag to the m4 files
| > 5a0463e Make libdvdread compile under QNX
| > b2646d8 Merge pull request #2 from hilbix/tino
| |\
| | > 75e7360 Remove erroneous free().
| | > 9455870 Revert "Remove erroneous free().", this code no more compiles
| |/
| > a2147c8 Remove the need for mkinstalldirs
| > 804ccb1 ignore generated files
| = 3230393 Fix undefined variable warning in md5.h
| > 83c7ad9 Remove unuseful debug message
| > 3d2e9fe Remove erroneous free().
| > e2eb3f8 Merge pull request #1 from bkerensa/master
| |\
| | > c3b37b8 Update src/ifo_print.c
| |/
| > 961d00d Detect physical drive or image on Windows w/ mingw
| > 91254aa Improve dlopen support on mingw
| = d200e21 Fix out of array pointer access
| > 35864eb Change the message output to match the severity of the condition
| > 24dee60 Add libdvdread prefix to the error message
| > 83904f3 Make sure the input device is closed on failure.
| > e5f391e Believe config.h instead of trying to detect endianness
| = 18de500 Fix endian detection output
| > 0d3327e Remove dvdread_incdir
| > a73110e Fix mount point -> device name on OSX
| > e05697b libdvdread uses internal dlfcn on W32, unconditionally
| = 85dd0d5 Change the dvdcss dll file name to libdvdcss-2.dll
| > d0f36a6 Add --enable-libdvdcss to the autotools install
| > f1f3eea dvd_udf.h and bitreader.h are not in src
| > e1b9832 Remove an over aggressive 0 -> NULL change
| > de40cb2 Revert "Use a macro instead of a magic constant"
| > c3fcb56 Comment to explain the need of config.h
| > d8b7c4e Replace tab w/ spaces
| > f03c4d0 Revert "Remove unnecessary config include in dvd_input.c"
| = 6e63166 Sanitize PTT start offsets
| > 77b4521 Remove unnecessary config include in dvd_input.c
| > 5a6374c Update the TODO file
| > e170cbc Use NULL instead of 0, this is C kids
| > 946ba2e Check ifoRead_VTS before continuing
| = 28a0e2d Clear pf_temp to make sure it is initialized
| > e6a378b Use a macro instead of a magic constant
| > a0b584d Check the return value for potential errors
|/
o 83c2783 Update version number in changelogs.
The "quick" (but perhaps misleading) interpretation of following is:
"you have to go 15 commits backward and then 33 commits forward
to go from HEAD to debian/master
both have 7 (=14/2) commits in common (cherry-picks)"
~/mirror2git/svn/libdvdread(master u=)$ git relate
debian
master
1- 15< 14= 33> debian/master
git-svn
1- 15< 14= 33> origin/debian
origin/master
git config --global --replace-all alias.relate '!f(){ git for-each-ref --format="%(refname:short) %(upstream:short)" refs | while read -r l r; do printf "%24s %s\\n" "$(git rev-list --cherry-mark --dense --left-right --boundary --oneline "${r:-${1:-HEAD}}...$l" -- | sed "s/^\\(.\\).*/\\1/" | sort | uniq -c | tr -d " " | tr "\\n" " ")" "$l"; done; }; f'
git config --global --replace-all alias.graph '!f(){ case "$#:$1" in 0:) r="HEAD...HEAD@{u}";; 1:*...*) r="$1";; 1:*) r="HEAD...$1";; *) r="$1...$2";; esac; git rev-list --cherry-mark --dense --left-right --boundary --pretty --graph "$r" -- | less -XFp "$(git rev-parse "${r%...*}")"; }; f'
git config --global --replace-all alias.graph1 '!f(){ case "$#:$1" in 0:) r="HEAD...HEAD@{u}";; 1:*...*) r="$1";; 1:*) r="HEAD...$1";; *) r="$1...$2";; esac; git rev-list --cherry-mark --dense --left-right --boundary --oneline --graph "$r" -- | less -XFp "$(git rev-parse "${r%...*}")"; }; f'
# THIS IS PUBLIC DOMAIN.
# Thanks to the makers of GIT for the extremely impressive and expressive commands which do all the hard work.
# Basic idea from https://gist.github.com/jehiah/1288596
# f() trick from http://stackoverflow.com/questions/7005513/pass-an-argument-to-a-git-alias-command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment