Skip to content

Commit 4c4f810

Browse files
committed
Update version to 1.0.5 and add configuration for Git HTTP version to support Azure LFS
1 parent f1e245c commit 4c4f810

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

VERSION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
1.0.4
1+
1.0.5
2+

internal/projectconfig/wizard.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bufio"
55
"fmt"
66
"os"
7+
"os/exec"
78
"path/filepath"
89
"strings"
910

@@ -49,6 +50,11 @@ func RunWizard() error {
4950
return err
5051
}
5152

53+
// Git HTTP version configuration (required for Azure LFS)
54+
if err := configureGitHttpVersion(root); err != nil {
55+
return err
56+
}
57+
5258
// INI settings
5359
answers, err := promptIniAnswers()
5460
if err != nil {
@@ -88,3 +94,24 @@ func promptIncludeBinaries() (bool, error) {
8894
}
8995
return strings.HasPrefix(choice, "Include"), nil
9096
}
97+
98+
// configureGitHttpVersion sets git http.version to HTTP/1.1 (required for Azure LFS)
99+
func configureGitHttpVersion(root string) error {
100+
// Check if this is a git repository
101+
gitDir := filepath.Join(root, ".git")
102+
if _, err := os.Stat(gitDir); os.IsNotExist(err) {
103+
// Not a git repository, skip this step
104+
return nil
105+
}
106+
107+
// Run git config --local http.version HTTP/1.1
108+
cmd := exec.Command("git", "config", "--local", "http.version", "HTTP/1.1")
109+
cmd.Dir = root
110+
output, err := cmd.CombinedOutput()
111+
if err != nil {
112+
return fmt.Errorf("failed to configure git http.version: %v\nOutput: %s", err, string(output))
113+
}
114+
115+
fmt.Println("✅ Configured git http.version to HTTP/1.1 (required for Azure LFS)")
116+
return nil
117+
}

0 commit comments

Comments
 (0)