You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Uses git log to create a comma separated values (CSV) file containing all commits, their author, email address, date and all the file names that were changed with it. The CSV is then imported into Neo4j.
4
+
5
+
# Note: This script needs the path to a git repository directory. It defaults to SOURCE_DIRECTORY ("source").
6
+
# Note: Import will be skipped without an error if the directory is not a git repository.
7
+
# Note: This script needs git to be installed.
8
+
9
+
# Fail on any error ("-e" = exit on first error, "-o pipefail" exist on errors within piped commands)
10
+
set -o errexit -o pipefail
11
+
12
+
# Overrideable Defaults
13
+
NEO4J_EDITION=${NEO4J_EDITION:-"community"}# Choose "community" or "enterprise"
14
+
NEO4J_VERSION=${NEO4J_VERSION:-"5.16.0"}
15
+
TOOLS_DIRECTORY=${TOOLS_DIRECTORY:-"tools"}# Get the tools directory (defaults to "tools")
16
+
SOURCE_DIRECTORY=${SOURCE_DIRECTORY:-"source"}# Get the source repository directory (defaults to "source")
17
+
18
+
# Default and initial values for command line options
# Prints the git log in CSV format including the changed files.
85
+
# Includes quoted strings, double quote escaping and supports commas in strings.
86
+
# - --pretty=format starts with a space that is needed to detect the start of a line.
87
+
# gsub(/^ /, "", a[1]); removes that space then afterwards
88
+
# - 3 commas (,,,) should be very unlikely to appear in names, email addresses and commit messages so they are used as an intermediate separator (see split)
89
+
# - gsub(/"/, "\"\"", a[6]) escapes double quotes with two of them (CSV standard)
0 commit comments