Svn – short diff without context

Using svn command line option

Use the following diff command to avoid diff context

$ svn diff --diff-cmd=diff -x -U0

Option -x passes option -U0 to the diff command which make 0 line context.

Using alias

Set the following svndiff alias in ~/.bash_profile

alias svndiff='svn diff --diff-cmd=diff -x -U0 -x -w'

Now source the ~/.bash_profile. It is not needed when we login again.

$ source ~/.bash_profile

After that we can simply use svndiff

$ svndiff
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments