From a388e54a9244e553cb51179ed5eefe22a5ce21d6 Mon Sep 17 00:00:00 2001
From: CoprDistGit <infra@openeuler.org>
Date: Wed, 12 Mar 2025 01:45:04 +0000
Subject: automatic import of git-lfs

---
 0001-use-vendor-dir-for-build.patch | 64 +++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 0001-use-vendor-dir-for-build.patch

(limited to '0001-use-vendor-dir-for-build.patch')

diff --git a/0001-use-vendor-dir-for-build.patch b/0001-use-vendor-dir-for-build.patch
new file mode 100644
index 0000000..48a1c85
--- /dev/null
+++ b/0001-use-vendor-dir-for-build.patch
@@ -0,0 +1,64 @@
+--- Makefile.orig	2024-11-21 07:04:33
++++ Makefile	2025-01-14 17:39:55
+@@ -28,7 +28,7 @@
+ # BUILTIN_LD_FLAGS are the internal flags used to pass to the linker. By default
+ # the config.GitCommit variable is always set via this variable, and
+ # DWARF-stripping is enabled unless DWARF=YesPlease.
+-BUILTIN_LD_FLAGS =
++BUILTIN_LD_FLAGS = "-linkmode=external"
+ ifneq ("$(VENDOR)","")
+ BUILTIN_LD_FLAGS += -X 'github.com/git-lfs/git-lfs/v3/config.Vendor=$(VENDOR)'
+ endif
+@@ -202,8 +202,8 @@
+ #
+ # It uses BUILD_MAIN as defined above to specify the entrypoint for building Git
+ # LFS.
+-BUILD = GOOS=$(1) GOARCH=$(2) \
+-	$(GO) build \
++BUILD = GO111MODULE=on GOOS=$(1) GOARCH=$(2) \
++	$(GO) build -mod=vendor \
+ 	-ldflags="$(LD_FLAGS)" \
+ 	-gcflags="$(GC_FLAGS)" \
+ 	-trimpath \
+@@ -237,7 +237,7 @@
+ # 'commands' of Git LFS. It depends upon the contents of the 'docs' directory
+ # and converts those manpages into code.
+ commands/mancontent_gen.go : $(wildcard docs/man/*.adoc)
+-	GOOS= GOARCH= $(GO) generate github.com/git-lfs/git-lfs/v3/commands
++	@echo "delete this step"
+ 
+ # trgen is a shorthand for ensuring that tr/tr_gen.go is kept up-to-date with
+ # the contents of po/build/*.mo.
+@@ -248,7 +248,7 @@
+ # 'tr' of Git LFS. It depends upon the contents of the 'po' directory
+ # and converts the .mo files.
+ tr/tr_gen.go : $(MO)
+-	GOOS= GOARCH= $(GO) generate github.com/git-lfs/git-lfs/v3/tr
++	@echo "delete this step"
+ 
+ po/build:
+ 	mkdir -p po/build
+@@ -628,7 +628,7 @@
+ .PHONY : fmt
+ ifeq ($(shell test -x "`command -v $(GOIMPORTS)`"; echo $$?),0)
+ fmt : $(SOURCES) | lint
+-	@$(GOIMPORTS) $(GOIMPORTS_EXTRA_OPTS) $?;
++	@echo "delete this step"
+ else
+ fmt : $(SOURCES) | lint
+ 	@echo "git-lfs: skipping fmt, no goimports found at \`$(GOIMPORTS)\` ..."
+@@ -638,13 +638,7 @@
+ # are vendored in via vendor (see: above).
+ .PHONY : lint
+ lint : $(SOURCES)
+-	@! $(GO) list -f '{{ join .Deps "\n" }}' . \
+-	| $(XARGS) $(GO) list -f \
+-		'{{ if and (not .Standard) (not .Module) }} \
+-			{{ .ImportPath }} \
+-		{{ end }}' \
+-	| $(GREP) -v "github.com/git-lfs/git-lfs" \
+-	| $(GREP) "."
++	@echo "delete this step"
+ 
+ # MAN_ROFF_TARGETS is a list of all ROFF-style targets in the man pages.
+ MAN_ROFF_TARGETS = man/man1/git-lfs-checkout.1 \
-- 
cgit v1.2.3