Skip to content

Commit c421840

Browse files
author
Sylvain
committed
Minimalist LFS support (add relevant git lfs pull command at the end of subrepo pull)
1 parent 60b484d commit c421840

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Meta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=meta: 0.0.2
22

33
name: git-subrepo
4-
version: 0.4.1
4+
version: 0.4.2-lfs
55
abstract: Git Submodule Alternative
66
homepage: https://github.com/ingydotnet/git-subrepo#readme
77
license: MIT

lib/git-subrepo

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ else
2828
fi
2929
bash+:import :std can
3030

31-
VERSION=0.4.1
31+
VERSION=0.4.2-LFS
3232
REQUIRED_GIT_VERSION=2.7.0
3333
GIT_TMP="$(git rev-parse --git-common-dir 2> /dev/null || echo .git)/tmp"
3434

@@ -575,6 +575,12 @@ subrepo:pull() {
575575

576576
o "Commit the new '$subrepo_commit_ref' content."
577577
CALL subrepo:commit
578+
579+
o "git lfs pull $subrepo_remote"
580+
RUN git lfs pull "$subrepo_remote"
581+
582+
o "git commit -a --amend --no-edit"
583+
RUN git commit -a --amend --no-edit
578584
}
579585

580586
# Push a properly merged subrepo branch upstream:
@@ -664,7 +670,7 @@ subrepo:push() {
664670
"$force_wanted" && force=' --force'
665671

666672
o "Push$force branch '$branch_name' to '$subrepo_remote' ($subrepo_branch)."
667-
RUN git push$force "$subrepo_remote" "$branch_name":"$subrepo_branch"
673+
RUN git push$force --no-verify "$subrepo_remote" "$branch_name":"$subrepo_branch"
668674

669675
o "Create ref '$refs_subrepo_push' for branch '$branch_name'."
670676
git:make-ref "$refs_subrepo_push" "$branch_name"

0 commit comments

Comments
 (0)