Skip to content

Commit 9aad5b5

Browse files
authored
Merge branch 'master' into report-errs
2 parents 0a40ef2 + fa56460 commit 9aad5b5

8 files changed

+38
-62
lines changed

appveyor.yml

+12-51
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,17 @@
1-
version: 1.0.{build}
2-
init:
3-
- cmd: >-
4-
set REPO_DIR=%cd%
5-
6-
7-
mkdir %BASHROOT%
8-
9-
cd %BASHROOT%
10-
11-
12-
curl -LOk https://github.com/git-for-windows/git/releases/download/v2.6.2.windows.1/PortableGit-2.6.2-64-bit.7z.exe
13-
14-
15-
7z x PortableGit-2.6.2-64-bit.7z.exe > nul
16-
17-
18-
mkdir c:\go15
19-
20-
cd \go15
21-
22-
23-
curl -LO https://storage.googleapis.com/golang/go1.5.1.windows-amd64.zip
24-
25-
unzip -o go1.5.1.windows-amd64.zip > nul
26-
27-
28-
set PATH=%BASHROOT%\bin;%GOROOT%\bin;%PATH%
29-
30-
31-
cd %REPO_DIR%
32-
environment:
33-
GOROOT: c:\go15\go
34-
BASHROOT: c:\bash2
351
install:
36-
- cmd:
37-
build_script:
38-
- cmd: >-
39-
mkdir src\github.com\github
40-
41-
42-
mklink /J src\github.com\github\git-lfs .
2+
- cinst InnoSetup -y
3+
- set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
434

5+
build_script:
6+
- bash -c 'GOARCH=386 script/bootstrap'
7+
- mv bin\git-lfs git-lfs-x86.exe
8+
- bash -c 'GOARCH=amd64 script/bootstrap'
9+
- mv bin\git-lfs git-lfs-x64.exe
4410

45-
set GOPATH=%CD%
46-
47-
48-
go version
49-
50-
51-
bash script\bootstrap
52-
11+
after_build:
12+
- iscc script\windows-installer\inno-setup-git-lfs-installer.iss
5313

54-
mv bin\git-lfs bin\git-lfs.exe
5514
artifacts:
56-
- path: bin\git-lfs.exe
15+
- path: git-lfs-x86.exe
16+
- path: git-lfs-x64.exe
17+
- path: git-lfs-windows-*.exe

commands/command_fetch.go

+11-6
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,7 @@ func fetchCommand(cmd *cobra.Command, args []string) {
4242
}
4343
cfg.CurrentRemote = args[0]
4444
} else {
45-
// Actively find the default remote, don't just assume origin
46-
defaultRemote, err := git.DefaultRemote()
47-
if err != nil {
48-
Exit("No default remote")
49-
}
50-
cfg.CurrentRemote = defaultRemote
45+
cfg.CurrentRemote = ""
5146
}
5247

5348
if len(args) > 1 {
@@ -246,6 +241,16 @@ func fetchPointers(pointers []*lfs.WrappedPointer, include, exclude []string) bo
246241
// Fetch and report completion of each OID to a channel (optional, pass nil to skip)
247242
// Returns true if all completed with no errors, false if errors were written to stderr/log
248243
func fetchAndReportToChan(allpointers []*lfs.WrappedPointer, include, exclude []string, out chan<- *lfs.WrappedPointer) bool {
244+
// Lazily initialize the current remote.
245+
if len(cfg.CurrentRemote) == 0 {
246+
// Actively find the default remote, don't just assume origin
247+
defaultRemote, err := git.DefaultRemote()
248+
if err != nil {
249+
Exit("No default remote")
250+
}
251+
cfg.CurrentRemote = defaultRemote
252+
}
253+
249254
ready, pointers, totalSize := readyAndMissingPointers(allpointers, include, exclude)
250255
q := lfs.NewDownloadQueue(len(pointers), totalSize, false)
251256

docs/man/git-lfs-clean.1.ronn

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ LFS pointer file for that file to standard output.
1313
Clean is typically run by Git's clean filter, configured by the repository's
1414
Git attributes.
1515

16+
Clean is not part of the user-facing Git plumbing commands. To preview the
17+
pointer of a large file as it would be generated, see the git-lfs-pointer(1)
18+
command.
19+
1620
## SEE ALSO
1721

18-
git-lfs-install(1), git-lfs-push(1), gitattributes(5).
22+
git-lfs-install(1), git-lfs-push(1), git-lfs-pointer(1), gitattributes(5).
1923

2024
Part of the git-lfs(1) suite.

script/bootstrap

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
# Only set GOPATH on non-Windows platforms as Windows can't do the symlinking
5-
# that we need.
6-
if [ -z "$GOPATH" ] && uname -s | grep -vq "_NT-"; then
4+
if uname -s | grep -q "_NT-"; then
5+
# Tell Cygwin / MSYS to really create symbolic links.
6+
export CYGWIN="$CYGWIN winsymlinks:nativestrict"
7+
export MSYS="$MSYS winsymlinks:nativestrict"
8+
fi
9+
10+
if [ -z "$GOPATH" ]; then
711
export GOPATH="$(pwd)"
812
mkdir -p src/github.com/github
913
[ -h src/github.com/github/git-lfs ] ||

script/fmt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ hash goimports 2>/dev/null && {
66
}
77

88
# don't run gofmt in these directories
9-
ignored=(/bin/ /docs/ /log/ /man/ /tmp/ /vendor/ /rpm/ /docker/ /debian/)
9+
ignored=(/bin/ /docs/ /log/ /man/ /tmp/ /vendor/ /rpm/ /docker/ /debian/ /src/)
1010
for i in */ ; do
1111
if [[ ! ${ignored[*]} =~ "/$i" ]]; then
1212
$formatter -w -l "$@" "${i%?}"
6.41 KB
Binary file not shown.
33.7 KB
Binary file not shown.

script/windows-installer/inno-setup-git-lfs-installer.iss

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ DirExistsWarning=no
3030
DisableReadyPage=True
3131
ArchitecturesInstallIn64BitMode=x64
3232
ChangesEnvironment=yes
33+
SetupIconFile=git-lfs-logo.ico
34+
WizardSmallImageFile=git-lfs-logo.bmp
3335

3436
[Languages]
3537
Name: "english"; MessagesFile: "compiler:Default.isl"

0 commit comments

Comments
 (0)