|
28 | 28 | fi
|
29 | 29 | bash+:import :std can
|
30 | 30 |
|
31 |
| -VERSION=0.4.1 |
| 31 | +VERSION=0.4.2-LFS |
32 | 32 | REQUIRED_GIT_VERSION=2.7.0
|
33 | 33 | GIT_TMP="$(git rev-parse --git-common-dir 2> /dev/null || echo .git)/tmp"
|
34 | 34 |
|
@@ -572,9 +572,15 @@ subrepo:pull() {
|
572 | 572 |
|
573 | 573 | o "Create ref '$refs_subrepo_branch' for branch '$branch_name'."
|
574 | 574 | git:make-ref "$refs_subrepo_branch" "$branch_name"
|
575 |
| - |
| 575 | + |
576 | 576 | o "Commit the new '$subrepo_commit_ref' content."
|
577 | 577 | CALL subrepo:commit
|
| 578 | + |
| 579 | + o "git lfs pull $subrepo_remote then commit" |
| 580 | + RUN git lfs pull "$subrepo_remote" |
| 581 | + RUN git add . |
| 582 | + RUN git add . |
| 583 | + RUN git commit -m "Changes implied by LFS pull" |
578 | 584 | }
|
579 | 585 |
|
580 | 586 | # Push a properly merged subrepo branch upstream:
|
@@ -653,18 +659,17 @@ subrepo:push() {
|
653 | 659 | fi
|
654 | 660 |
|
655 | 661 | if ! $force_wanted; then
|
656 |
| - o "Make sure '$branch_name' contains the '$refs_subrepo_fetch' HEAD." |
| 662 | + o "Make sure '$branch_name' contains the '$refs_subrepo_fetch' HEAD, i.e. '$upstream_head_commit'." |
657 | 663 | if ! git:commit-in-rev-list "$upstream_head_commit" "$branch_name"; then
|
658 |
| - error "Can't commit: '$branch_name' doesn't contain upstream HEAD: " \ |
659 |
| - "$upstream_head_commit" |
| 664 | + error "Can't commit: '$branch_name' doesn't contain upstream HEAD: '$upstream_head_commit'" |
660 | 665 | fi
|
661 | 666 | fi
|
662 | 667 |
|
663 | 668 | local force=''
|
664 | 669 | "$force_wanted" && force=' --force'
|
665 | 670 |
|
666 | 671 | o "Push$force branch '$branch_name' to '$subrepo_remote' ($subrepo_branch)."
|
667 |
| - RUN git push$force "$subrepo_remote" "$branch_name":"$subrepo_branch" |
| 672 | + RUN git push$force --no-verify "$subrepo_remote" "$branch_name":"$subrepo_branch" |
668 | 673 |
|
669 | 674 | o "Create ref '$refs_subrepo_push' for branch '$branch_name'."
|
670 | 675 | git:make-ref "$refs_subrepo_push" "$branch_name"
|
@@ -805,7 +810,7 @@ subrepo:branch() {
|
805 | 810 | o "Remove the .gitrepo file from $first_gitrepo_commit..$branch"
|
806 | 811 | local filter="$branch"
|
807 | 812 | [[ -n "$first_gitrepo_commit" ]] && filter="$first_gitrepo_commit..$branch"
|
808 |
| - FAIL=false RUN git filter-branch -f --prune-empty --tree-filter \ |
| 813 | + FAIL=false RUN git filter-branch -f --tree-filter \ |
809 | 814 | "rm -f .gitrepo" "$filter"
|
810 | 815 |
|
811 | 816 | git:create-worktree "$branch"
|
@@ -1772,8 +1777,17 @@ git:is_merge_commit() {
|
1772 | 1777 |
|
1773 | 1778 | git:create-worktree() {
|
1774 | 1779 | local branch="$1"
|
| 1780 | + local pwd=$(pwd) |
1775 | 1781 | worktree="$GIT_TMP/$branch"
|
| 1782 | + o "git worktree add '$worktree' '$branch'" |
1776 | 1783 | RUN git worktree add "$worktree" "$branch"
|
| 1784 | + |
| 1785 | + cd "$worktree" |
| 1786 | + o "git lfs pull from folder '$(pwd)' then commit" |
| 1787 | + RUN git lfs pull |
| 1788 | + RUN git add . |
| 1789 | + RUN git commit -m "Changes implied by LFS pull" |
| 1790 | + cd "$pwd" |
1777 | 1791 | }
|
1778 | 1792 |
|
1779 | 1793 | git:remove-worktree() {
|
|
0 commit comments