Merge topic 'setup-lfs'

e71412c64 Update file CONTRIBUTING.md
6df195ed0 Update file CONTRIBUTING.md
fc9085367 cmake: only set lfs.url when using ssh URL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3068
This commit is contained in:
Vicente Bolea 2023-05-29 23:47:08 +00:00 committed by Kitware Robot
commit 61f123be22
2 changed files with 16 additions and 9 deletions

@ -19,7 +19,7 @@ Before you begin, perform initial setup:
3. Use Git to create a local clone of the main VTK repository:
$ git clone https://gitlab.kitware.com/vtk/vtk-m.git
$ git clone git@gitlab.kitware.com:vtk/vtk-m.git
$ cd vtk-m
The main repository will be configured as your `origin` remote.
@ -32,19 +32,24 @@ Before you begin, perform initial setup:
This will prompt for your GitLab user name and configure a remote
called `gitlab` to refer to it.
5. (Optional but highly recommended.)
5. (Required to use Git LFS.)
[Using the SSH URL for the origin remote] is needed for Git LFS to work.
Do not forget to run `$ ./Utilities/SetupForDevelopment.sh` after changing
the remote URL.
6. (Optional but highly recommended.)
[Disabling git-lfs in your fork] is needed to add/modify git-lfs files.
Find the setting to disable git-lfs in your fork through your fork web UI:
Settings/General/Project Features/Git LFS; set it to off; and _save changes_.
6. (Optional but highly recommended.)
7. (Optional but highly recommended.)
[Register with the VTK-m dashboard] on Kitware's CDash instance to
better know how your code performs in regression tests. After
registering and signing in, click on "All Dashboards" link in the upper
left corner, scroll down and click "Subscribe to this project" on the
right of VTK-m.
7. (Optional but highly recommended.)
8. (Optional but highly recommended.)
[Sign up for the VTK-m mailing list] to communicate with other
developers and users.

@ -29,16 +29,18 @@ git config alias.gitlab-sync '!bash Utilities/GitSetup/git-gitlab-sync' &&
echo "Set up git gitlab-sync" &&
true
# shellcheck disable=SC2034
SetupForDevelopment=1
git config hooks.SetupForDevelopment ${SetupForDevelopment_VERSION}
# shellcheck disable=SC2154
git config hooks.SetupForDevelopment "${SetupForDevelopment_VERSION}"
# Setup VTK-m-specifc LFS config
#
# Disable lfsurl if our origin points to the main repo
OriginURL=$(git remote get-url origin)
if [[ "$OriginURL" =~ ^(https://|git@)gitlab\.kitware\.com(/|:)vtk/vtk-m\.git$ ]]
# Only set lfs.url to the ssh url
OriginURL="$(git remote get-url origin)"
if [[ "$OriginURL" =~ ^git@gitlab\.kitware\.com:vtk/vtk-m\.git$ ]]
then
# Disable this setting which overrides every remote/url lfs setting
# This setting overrides every remote/url lfs setting
git config --local lfs.url "${OriginURL}"
# Those settings are only available for newer git-lfs releases