The breadth of git commands keeps us busy enough, I figured Hyperbole could
help take away the complexity of some basic operations and let you refer to
git elements in your documents.  So here is a very nice first pass at git
and github references, and the new git-reference and github-reference
implicit button types.  This is in the latest savannah and github pushes of
Hyperbole: https://github.com/rswgnu/hyperbole or with our new syntax,
gh#/rswgnu/hyperbole.

For local git references, Hyperbole automatically uses `locate' to build an
index of git repository locations for later lookup by repository/project
name.

The code is in the hib-social.el file, since git and Github are
socially-related services too.

Still need to come up with a syntax for referring to different branches.

A bit about this is in the DEMO file but none of it is yet covered in the
Hyperbole Manual since this isn't yet a release.

Action Key presses on all of the following work as described:

;;;
;;; Github (remote) reference links
;;;

;; Display user's Github home page
gh@rswgnu

;; Display user's project
github#/rswgnu/hyperbole

;; Display user project's commit diff
gh#rswgnu/hyperbole/55a1f0

(setq hibtypes-github-default-user "rswgnu")
;; Display default user's project
github#/hyperbole

;; Display default user commit diff
gh#hyperbole/55a1f0

;; Display default user and default project commit diff
(setq hibtypes-github-default-project "hyperbole")
gh#55a1f0

;; Invalid, use gh@rswgnu
gh#rswgnu

;;;
;;; Github (local) reference links
;;;

;; From any buffer, dired on the top directory of the local hyperbole
;; repository
git#/hyperbole

;; From any buffer, display hyperbole local git commit diff
git#/hyperbole/55a1f0 or git#hyperbole/55a1f0

;; Based on current default-directory, display current repo's local
;; git commit diff; works when default-directory is inside a git
;; repository with commit hashtag 55a1f0
gt#55a1f0

(setq hibtypes-git-default-project "hyperbole")
;; From any buffer once the above default is set,
;; display current repo's local git commit diff
git#55a1f0

-- The End --

Reply via email to