about summary refs log tree commit diff
path: root/functions
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2017-01-06T01·39-0500
committerWilliam Carroll <wpcarro@gmail.com>2017-01-06T01·39-0500
commit328d4b246bb16f89cadbb9eb4836a41a655fc0e4 (patch)
treefa5a88b760a85eadd324e87f55afd338d3f13abb /functions
parentf2663c5b371c6832ddef23cd985d4930d1867a5c (diff)
Extends configs and colorschemes
Diffstat (limited to 'functions')
-rw-r--r--functions/git_functions.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/functions/git_functions.sh b/functions/git_functions.sh
index 02be2ff5fbae..e387e1ea3ede 100644
--- a/functions/git_functions.sh
+++ b/functions/git_functions.sh
@@ -4,6 +4,16 @@ function wgbranch {
 }
 
 
+# compare file with another branch
+function wgcompare_file {
+  file_path="$1"
+  compare_branch_a="master"
+  compare_branch_b="$(wgbranch)"
+
+  git diff "${compare_branch_a}:${file_path}" "${compare_branch_b}:${file_path}"
+}
+
+
 # output the stash ticket number to STDOUT
 function wgtix {
   wgbranch | perl -p -e 's/(?:feature|bugfix|refactor)\/(\w+-\d+).+$/\1/'