From 18f9aaf8e7c14ef42470c779d96aa56a1198560c Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Mon, 18 Jul 2016 23:57:18 +0000 Subject: file regex can be a rule. * git-difme (build-stage-regex): remove function. (difme-stage-commit?): new function. (difme): use `difme-stage-commit?` * README.org: add info about file regex as a rule. --- README.org | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'README.org') diff --git a/README.org b/README.org index 5395516..969bb15 100644 --- a/README.org +++ b/README.org @@ -18,12 +18,14 @@ it always does a =git push= on each repo that it visits. ** rules the rules specify what type of files to stage and commit. -file types: +a rule can either be a regex that matches a file or a file mod type. - - modified file (M). - - deleted file (D). - - untracked file (?). - - all files (.). +the following file mod types are recognized: + + - =M= :: modified file. + - =D= :: deleted file. + - =?= :: untracked file. + - =.= :: all files. the rules are defined per git repository in the config file. @@ -40,17 +42,21 @@ function: (define (difme-repos) (list '("/path/to/git/repo/foo" "M" "D" "?") '("/path/to/git/repo/bar" "M") - '("/path/to/git/repo/baz" "M" "?") - '("/path/to/git/repo/frb" "."))) + '("/path/to/git/repo/baz" ".") + '("/path/to/git/repo/frb" "\\.txt" "personal/log.org" "?") + '("/path/to/git/repo/dot" ".config/"))) #+END_SRC - for repo ~foo~, git-difme will stage and commit modified (M), deleted (D) and untracked (?) files. - for repo ~bar~, git-difme will only stage and commit modified (M) files. -- for repo ~baz~, git-difme will only stage and commit modified (M) and - untracked (?) files. -- for repo ~frb~, git-difme will stage and commit all files. +- for repo ~baz~, git-difme will stage and commit all files (.). +- for repo ~frb~, git-difme will stage and commit all files that have + =.txt= extension, file(s) whose path matches =personal/log.org=, and + all untracked files (?). +- for repo ~dot~, git-difme will stage and commit all files under the + =.config= directory. ** installing *** the script -- cgit v1.2.3