From 6eaeb873d6dd9b9c216b2539aedb16d349176fe3 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Sat, 17 Dec 2011 11:05:18 +0800 Subject: [PATCH] It is often useful to exclude the basename of a file from status shortcuts. i.e. git_exclude_basename $e2 --- lib/git/tools.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/git/tools.sh b/lib/git/tools.sh index 23ca270..85efd99 100644 --- a/lib/git/tools.sh +++ b/lib/git/tools.sh @@ -54,6 +54,10 @@ git_ignore() { git_exclude() { git_ignore "$1" ".git/info/exclude" } +# Exclude basename of file +git_exclude_basename() { + git_exclude $(basename "$1") +} # Use git bisect to find where text was removed from a file.