Skip to content

Commit 71b9f20

Browse files
committed
Filter out all git branches except for the selected one
1 parent a3f54e8 commit 71b9f20

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

COMMANDS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ Here is the resulting schema:
264264

265265
#### Parameter
266266

267-
The optional parameter `--source directory-path-to-the-source-folder-containing-git-repositories` can be used to select a different directory for the repositories. By default, the `source` directory within the analysis workspace directory is used. This command only needs the git history to be present. Therefore, `git clone --bare` is sufficient. If the `source` directory is also used for code analysis (like for Typescript) then a full git clone is of course needed.
267+
The optional parameter `--source directory-path-to-the-source-folder-containing-git-repositories` can be used to select a different directory for the repositories. By default, the `source` directory within the analysis workspace directory is used. This command only needs the git history to be present. Therefore, `git clone --bare` is sufficient. If the `source` directory is also used for code analysis (like for Typescript) then a full git clone is of course needed. Additionally, if you want to focus on a specific version or branch, use `--branch branch-name` to checkout the branch and `--single-branch` to exclude other branches before importing the git log data.
268268

269269
#### Environment Variable
270270

GETTING_STARTED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Use these optional command line options as needed:
6666

6767
- If you want to analyze Typescript code, create a symbolic link inside the `source` directory that points to the Typescript project. Alternatively you can also copy the project into the `source` directory.
6868

69-
- If you want to include git data like changed files and authors, create a symbolic link inside the `source` directory that points to the repository or clone it into the `source` directory. If you already have your Typescript project in there, you of course don't have to do it twice. If you are analyzing Java artifacts (full source not needed), it is sufficient to use a bare clone that only contains the git history without the sources using `git clone --bare`.
69+
- If you want to include git data like changed files and authors, create a symbolic link inside the `source` directory that points to the repository or clone it into the `source` directory. If you already have your Typescript project in there, you of course don't have to do it twice. If you are analyzing Java artifacts (full source not needed), it is sufficient to use a bare clone that only contains the git history without the sources using `git clone --bare`. If you want to focus on one branch, use `--branch branch-name` to checkout the branch and `--single-branch` to only fetch the history of that branch.
7070
7171
- Alternatively to the steps above, run an already predefined download script
7272

scripts/downloader/downloadAxonFramework.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ source "${SCRIPTS_DIR}/downloadMavenArtifact.sh" -g "${ARTIFACTS_GROUP}" -a "axo
5757
# This makes it possible to additionally import the git log into the graph
5858
if [ ! -d "${SOURCE_DIRECTORY}/AxonFramework-${ARTIFACTS_VERSION}/.git" ]; then
5959
echo "download${ANALYSIS_NAME}: Getting bare git history of source code repository..."
60-
git clone --bare https://github.com/AxonFramework/AxonFramework.git --branch "axon-${ARTIFACTS_VERSION}" "${SOURCE_DIRECTORY}/AxonFramework-${ARTIFACTS_VERSION}/.git"
60+
git clone --bare https://github.com/AxonFramework/AxonFramework.git --branch "axon-${ARTIFACTS_VERSION}" --single-branch "${SOURCE_DIRECTORY}/AxonFramework-${ARTIFACTS_VERSION}/.git"
6161
fi
6262
################################################################

scripts/downloader/downloadTypescriptProject.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ if [ ! -d "${fullSourceDirectory}" ]; then # source doesn't exist
115115
if [ -n "${cloneUrl}" ]; then # only clone if url is specified and source doesn't exist
116116
echo "downloadTypescriptProject: Cloning ${cloneUrl} with version ${projectVersion}..."
117117
# A full clone is done since not only the source is scanned, but also the git log/history.
118-
git clone --branch "${projectTag}" "${cloneUrl}" "${fullSourceDirectory}"
118+
git clone --branch "${projectTag}" --single-branch "${cloneUrl}" "${fullSourceDirectory}"
119119
else
120120
# Source doesn't exist and no clone URL is specified.
121121
echo "downloadTypescriptProject: Error: Source directory ${fullSourceDirectory} for project ${projectName} not found."

0 commit comments

Comments
 (0)