summaryrefslogtreecommitdiffstats
path: root/articles/some_quick_git_diff_tips.org
diff options
context:
space:
mode:
Diffstat (limited to 'articles/some_quick_git_diff_tips.org')
-rw-r--r--articles/some_quick_git_diff_tips.org82
1 files changed, 43 insertions, 39 deletions
diff --git a/articles/some_quick_git_diff_tips.org b/articles/some_quick_git_diff_tips.org
index e9d3f39..beaf735 100644
--- a/articles/some_quick_git_diff_tips.org
+++ b/articles/some_quick_git_diff_tips.org
@@ -1,56 +1,60 @@
-#+TITLE: Some quick git diff tips
+#+TITLE:
+#+OPTIONS: toc:nil
+#+HTML_LINK_UP: ../blog.html
+
+* Some quick git diff tips :org:lisp:config:
A couple of quick tips. As you possibly know you can specify some
options to be used for diffs (and other things) per file type. The
one I'm interested in is the function name.
-* For org-mode
+** For org-mode
- The primary way of identifying which part of an org-mode document
- a change occurs in seems to me to be the heading. So, in your
- ~$HOME/.gitconfig~ put:
+ The primary way of identifying which part of an org-mode document
+ a change occurs in seems to me to be the heading. So, in your
+ ~$HOME/.gitconfig~ put:
- #+BEGIN_SRC conf
- [diff "org"]
- xfuncname = "^\\*+.*"
- #+END_SRC
+ #+BEGIN_SRC conf
+ [diff "org"]
+ xfuncname = "^\\*+.*"
+ #+END_SRC
- Which should show any lines starting with one or more ~*~
- characters. And then in ~$XDG_CONFIG_HOME/git/attributes~ or
- ~$HOME/.config/git/attributes~ put:
+ Which should show any lines starting with one or more ~*~
+ characters. And then in ~$XDG_CONFIG_HOME/git/attributes~ or
+ ~$HOME/.config/git/attributes~ put:
- #+BEGIN_EXAMPLE
- ,*.org diff=org
- #+END_EXAMPLE
+ #+BEGIN_EXAMPLE
+ ,*.org diff=org
+ #+END_EXAMPLE
-* For lisp and lisp-like langauges
+** For lisp and lisp-like langauges
- For anything that resembles lisp (so Common Lisp, Emacs Lisp, Hy,
- scheme, etc.) I would think that the easiest thing to do is just
- see the closes top-level form. So, in your ~$HOME/.gitconfig~ put:
+ For anything that resembles lisp (so Common Lisp, Emacs Lisp, Hy,
+ scheme, etc.) I would think that the easiest thing to do is just
+ see the closes top-level form. So, in your ~$HOME/.gitconfig~ put:
- #+BEGIN_SRC conf
- [diff "lisp"]
- xfuncname = "^\\([^ ]+ [^ ]+"
- #+END_SRC
+ #+BEGIN_SRC conf
+ [diff "lisp"]
+ xfuncname = "^\\([^ ]+ [^ ]+"
+ #+END_SRC
- Which should show the opening parenthesis and the first two words.
- For example:
+ Which should show the opening parenthesis and the first two words.
+ For example:
- #+BEGIN_EXAMPLE
- (defun some-function-name
- (defclass my-awesome-class
- (define-route this-strange-route
- #+END_EXAMPLE
+ #+BEGIN_EXAMPLE
+ (defun some-function-name
+ (defclass my-awesome-class
+ (define-route this-strange-route
+ #+END_EXAMPLE
- And then put in your ~$XDG_CONFIG_HOME/git/attributes~ or
- ~$HOME/.config/git/attributes~:
+ And then put in your ~$XDG_CONFIG_HOME/git/attributes~ or
+ ~$HOME/.config/git/attributes~:
- #+BEGIN_EXAMPLE
- ,*.lisp diff=lisp
- ,*.el diff=lisp
- ,*.hy diff=lisp
- ,*.scm diff=lisp
- #+END_EXAMPLE
+ #+BEGIN_EXAMPLE
+ ,*.lisp diff=lisp
+ ,*.el diff=lisp
+ ,*.hy diff=lisp
+ ,*.scm diff=lisp
+ #+END_EXAMPLE
- And possibly any other lisp-like language files you can think of.
+ And possibly any other lisp-like language files you can think of.