-
Notifications
You must be signed in to change notification settings - Fork 1
/
git-config-filters
68 lines (66 loc) · 2.1 KB
/
git-config-filters
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env bash
# Canonical : https://github.com/lduran2/git-clean-each-ipynb/blob/master/git-config-filters
# Configures the filters for Jupyter Notebooks.
# By : Leomar Durán <https://github.com/lduran2/>
# When : 2022-03-04t02:58R
# Where : Temple University
# For : CIS 4526
# Version : 1.3.0
#
# CHANGELOG :
# v1.3.0 - 2022-03-04t02:58R
# split from `git-setup-filters`
#
# v1.2.8 - 2022-01-31t22:13R
# added blank line before template
#
# v1.2.7 - 2022-01-31t20:57R
# staging configuration files automatically
#
# v1.2.6 - 2022-01-30t20:05R
# restored `git config ...`
#
# v1.2.5 - 2022-01-30t19:42R
# added `.gitattributes` to `tail_templates`
# removed parentheses from `echo 'Done.'`
#
# v1.2.4 - 2022-01-30t19:15R
# put templates in `for` loop
# accidentally removed `git config ...`
#
# v1.2.3 - 2022-01-30t19:01R
# templates copied to root
#
# v1.2.2 - 2022-01-30t17:18R
# filter will call `main` instead of `sed` directly
#
# v1.2.1 - 2021-12-05t03:57
# combined both filters in .gitattribute and renamed the
# combined filter in to `ipynb`
# now filtering successfully
#
# v1.2.0 - 2021-12-05t03:32
# /config-filters -> ./git-config-filters :
# combined both filters
#
# v1.1.2 - 2021-12-05t02:23
# hw4-sklearn_mlp/config-filters -> ../config-filters .
#
# v1.1.1 - 2021-12-05t02:14
# hw4-sklearn_mlp/config-filters :
# fixed typo in range for `cell_id` filter :
# [a-zA-Z0-9-_] -> [a-zA-Z0-9_]
#
# v1.1.0 - 2021-12-05t02:14
# hw4-sklearn_mlp/config-execution_count-filter.sh -> ./config-filters :
# added filter `cell_id` to ignore lines updating cell IDs
#
# v1.0.0 - 2021-12-05t01:55
# hw4-sklearn_mlp/config-execution_count-filter.sh :
# set filter `execution_count` to null out execution_count
# on `git add`
#
# working directories
declare -r SOURCE_DIR=$(dirname $0)
# configure the *.ipynb clean filter
git config filter.ipynb.clean $SOURCE_DIR/main