Skip to content

Commit 86c0809

Browse files
committed
Merge branch 'vfs-2.44.0' into for-each-repo-stop-on-error
2 parents 1ae1155 + 96939fd commit 86c0809

File tree

306 files changed

+37500
-1061
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+37500
-1061
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.pm text eol=lf diff=perl
77
*.py text eol=lf diff=python
88
*.bat text eol=crlf
9+
*.png binary
910
CODE_OF_CONDUCT.md -whitespace
1011
/Documentation/**/*.txt text eol=lf
1112
/command-list.txt text eol=lf

.github/ISSUE_TEMPLATE.md

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
- [ ] I was not able to find an [open](https://github.com/microsoft/git/issues?q=is%3Aopen)
2+
or [closed](https://github.com/microsoft/git/issues?q=is%3Aclosed) issue matching
3+
what I'm seeing, including in [the `git-for-windows/git` tracker](https://github.com/git-for-windows/git/issues).
4+
5+
### Setup
6+
7+
- Which version of `microsoft/git` are you using? Is it 32-bit or 64-bit?
8+
9+
```
10+
$ git --version --build-options
11+
12+
** insert your machine's response here **
13+
```
14+
15+
Are you using Scalar or VFS for Git?
16+
17+
** insert your answer here **
18+
19+
If VFS for Git, then what version?
20+
21+
```
22+
$ gvfs version
23+
24+
** insert your machine's response here **
25+
```
26+
27+
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
28+
29+
```
30+
$ cmd.exe /c ver
31+
32+
** insert your machine's response here **
33+
```
34+
35+
- Any other interesting things about your environment that might be related
36+
to the issue you're seeing?
37+
38+
** insert your response here **
39+
40+
### Details
41+
42+
- Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
43+
44+
** insert your response here **
45+
46+
- What commands did you run to trigger this issue? If you can provide a
47+
[Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)
48+
this will help us understand the issue.
49+
50+
```
51+
** insert your commands here **
52+
```
53+
- What did you expect to occur after running these commands?
54+
55+
** insert here **
56+
57+
- What actually happened instead?
58+
59+
** insert here **
60+
61+
- If the problem was occurring with a specific repository, can you specify
62+
the repository?
63+
64+
* [ ] Public repo: **insert URL here**
65+
* [ ] Windows monorepo
66+
* [ ] Office monorepo
67+
* [ ] Other Microsoft-internal repo: **insert name here**
68+
* [ ] Other internal repo.

.github/PULL_REQUEST_TEMPLATE.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
Thanks for taking the time to contribute to Git! Please be advised that the
2-
Git community does not use github.com for their contributions. Instead, we use
3-
a mailing list ([email protected]) for code submissions, code reviews, and
4-
bug reports. Nevertheless, you can use GitGitGadget (https://gitgitgadget.github.io/)
5-
to conveniently send your Pull Requests commits to our mailing list.
1+
Thanks for taking the time to contribute to Git!
62

7-
For a single-commit pull request, please *leave the pull request description
8-
empty*: your commit message itself should describe your changes.
3+
This fork contains changes specific to monorepo scenarios. If you are an
4+
external contributor, then please detail your reason for submitting to
5+
this fork:
96

10-
Please read the "guidelines for contributing" linked above!
7+
* [ ] This is an early version of work already under review upstream.
8+
* [ ] This change only applies to interactions with Azure DevOps and the
9+
GVFS Protocol.
10+
* [ ] This change only applies to the virtualization hook and VFS for Git.

.github/config.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Configuration for sentiment-bot - https://github.com/behaviorbot/sentiment-bot
2+
3+
# *Required* toxicity threshold between 0 and .99 with the higher numbers being
4+
# the most toxic. Anything higher than this threshold will be marked as toxic
5+
# and commented on
6+
sentimentBotToxicityThreshold: .7
7+
8+
# *Required* Comment to reply with
9+
sentimentBotReplyComment: >
10+
Please be sure to review the code of conduct and be respectful of other users. cc/ @git-for-windows/trusted-git-for-windows-developers

.github/dependabot.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
# especially
6+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions
7+
8+
version: 2
9+
updates:
10+
- package-ecosystem: "github-actions" # See documentation for possible values
11+
directory: "/" # Location of package manifests
12+
schedule:
13+
interval: "weekly"

.github/macos-installer/Makefile

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
SHELL := /bin/bash
2+
SUDO := sudo
3+
C_INCLUDE_PATH := /usr/include
4+
CPLUS_INCLUDE_PATH := /usr/include
5+
LD_LIBRARY_PATH := /usr/lib
6+
7+
OSX_VERSION := $(shell sw_vers -productVersion)
8+
TARGET_FLAGS := -mmacosx-version-min=$(OSX_VERSION) -DMACOSX_DEPLOYMENT_TARGET=$(OSX_VERSION)
9+
10+
uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
11+
12+
ARCH_UNIV := universal
13+
ARCH_FLAGS := -arch x86_64 -arch arm64
14+
15+
CFLAGS := $(TARGET_FLAGS) $(ARCH_FLAGS)
16+
LDFLAGS := $(TARGET_FLAGS) $(ARCH_FLAGS)
17+
18+
PREFIX := /usr/local
19+
GIT_PREFIX := $(PREFIX)/git
20+
21+
BUILD_DIR := $(GITHUB_WORKSPACE)/payload
22+
DESTDIR := $(PWD)/stage/git-$(ARCH_UNIV)-$(VERSION)
23+
ARTIFACTDIR := build-artifacts
24+
SUBMAKE := $(MAKE) C_INCLUDE_PATH="$(C_INCLUDE_PATH)" CPLUS_INCLUDE_PATH="$(CPLUS_INCLUDE_PATH)" LD_LIBRARY_PATH="$(LD_LIBRARY_PATH)" TARGET_FLAGS="$(TARGET_FLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" NO_GETTEXT=1 NO_DARWIN_PORTS=1 prefix=$(GIT_PREFIX) GIT_BUILT_FROM_COMMIT="$(GIT_BUILT_FROM_COMMIT)" DESTDIR=$(DESTDIR)
25+
CORES := $(shell bash -c "sysctl hw.ncpu | awk '{print \$$2}'")
26+
27+
# Guard against environment variables
28+
APPLE_APP_IDENTITY =
29+
APPLE_INSTALLER_IDENTITY =
30+
APPLE_KEYCHAIN_PROFILE =
31+
32+
.PHONY: image pkg payload codesign notarize
33+
34+
.SECONDARY:
35+
36+
$(DESTDIR)$(GIT_PREFIX)/VERSION-$(VERSION)-$(ARCH_UNIV):
37+
rm -f $(BUILD_DIR)/git-$(VERSION)/osx-installed*
38+
mkdir -p $(DESTDIR)$(GIT_PREFIX)
39+
touch $@
40+
41+
$(BUILD_DIR)/git-$(VERSION)/osx-built-keychain:
42+
cd $(BUILD_DIR)/git-$(VERSION)/contrib/credential/osxkeychain; $(SUBMAKE) CFLAGS="$(CFLAGS) -g -O2 -Wall"
43+
touch $@
44+
45+
$(BUILD_DIR)/git-$(VERSION)/osx-built:
46+
[ -d $(DESTDIR)$(GIT_PREFIX) ] && $(SUDO) rm -rf $(DESTDIR) || echo ok
47+
cd $(BUILD_DIR)/git-$(VERSION); $(SUBMAKE) -j $(CORES) all strip
48+
echo "================"
49+
echo "Dumping Linkage"
50+
cd $(BUILD_DIR)/git-$(VERSION); ./git version
51+
echo "===="
52+
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git
53+
echo "===="
54+
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-http-fetch
55+
echo "===="
56+
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-http-push
57+
echo "===="
58+
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-remote-http
59+
echo "===="
60+
cd $(BUILD_DIR)/git-$(VERSION); /usr/bin/otool -L ./git-gvfs-helper
61+
echo "================"
62+
touch $@
63+
64+
$(BUILD_DIR)/git-$(VERSION)/osx-installed-bin: $(BUILD_DIR)/git-$(VERSION)/osx-built $(BUILD_DIR)/git-$(VERSION)/osx-built-keychain
65+
cd $(BUILD_DIR)/git-$(VERSION); $(SUBMAKE) install
66+
cp $(BUILD_DIR)/git-$(VERSION)/contrib/credential/osxkeychain/git-credential-osxkeychain $(DESTDIR)$(GIT_PREFIX)/bin/git-credential-osxkeychain
67+
mkdir -p $(DESTDIR)$(GIT_PREFIX)/contrib/completion
68+
cp $(BUILD_DIR)/git-$(VERSION)/contrib/completion/git-completion.bash $(DESTDIR)$(GIT_PREFIX)/contrib/completion/
69+
cp $(BUILD_DIR)/git-$(VERSION)/contrib/completion/git-completion.zsh $(DESTDIR)$(GIT_PREFIX)/contrib/completion/
70+
cp $(BUILD_DIR)/git-$(VERSION)/contrib/completion/git-prompt.sh $(DESTDIR)$(GIT_PREFIX)/contrib/completion/
71+
# This is needed for Git-Gui, GitK
72+
mkdir -p $(DESTDIR)$(GIT_PREFIX)/lib/perl5/site_perl
73+
[ ! -f $(DESTDIR)$(GIT_PREFIX)/lib/perl5/site_perl/Error.pm ] && cp $(BUILD_DIR)/git-$(VERSION)/perl/private-Error.pm $(DESTDIR)$(GIT_PREFIX)/lib/perl5/site_perl/Error.pm || echo done
74+
touch $@
75+
76+
$(BUILD_DIR)/git-$(VERSION)/osx-installed-man: $(BUILD_DIR)/git-$(VERSION)/osx-installed-bin
77+
mkdir -p $(DESTDIR)$(GIT_PREFIX)/share/man
78+
cp -R $(GITHUB_WORKSPACE)/manpages/ $(DESTDIR)$(GIT_PREFIX)/share/man
79+
touch $@
80+
81+
$(BUILD_DIR)/git-$(VERSION)/osx-built-subtree:
82+
cd $(BUILD_DIR)/git-$(VERSION)/contrib/subtree; $(SUBMAKE) XML_CATALOG_FILES="$(XML_CATALOG_FILES)" all git-subtree.1
83+
touch $@
84+
85+
$(BUILD_DIR)/git-$(VERSION)/osx-installed-subtree: $(BUILD_DIR)/git-$(VERSION)/osx-built-subtree
86+
mkdir -p $(DESTDIR)
87+
cd $(BUILD_DIR)/git-$(VERSION)/contrib/subtree; $(SUBMAKE) XML_CATALOG_FILES="$(XML_CATALOG_FILES)" install install-man
88+
touch $@
89+
90+
$(BUILD_DIR)/git-$(VERSION)/osx-installed-assets: $(BUILD_DIR)/git-$(VERSION)/osx-installed-bin
91+
mkdir -p $(DESTDIR)$(GIT_PREFIX)/etc
92+
cat assets/etc/gitconfig.osxkeychain >> $(DESTDIR)$(GIT_PREFIX)/etc/gitconfig
93+
cp assets/uninstall.sh $(DESTDIR)$(GIT_PREFIX)/uninstall.sh
94+
sh -c "echo .DS_Store >> $(DESTDIR)$(GIT_PREFIX)/share/git-core/templates/info/exclude"
95+
96+
symlinks:
97+
mkdir -p $(ARTIFACTDIR)$(PREFIX)/bin
98+
cd $(ARTIFACTDIR)$(PREFIX)/bin; find ../git/bin -type f -exec ln -sf {} \;
99+
for man in man1 man3 man5 man7; do mkdir -p $(ARTIFACTDIR)$(PREFIX)/share/man/$$man; (cd $(ARTIFACTDIR)$(PREFIX)/share/man/$$man; ln -sf ../../../git/share/man/$$man/* ./); done
100+
ruby ../scripts/symlink-git-hardlinks.rb $(ARTIFACTDIR)
101+
touch $@
102+
103+
$(BUILD_DIR)/git-$(VERSION)/osx-installed: $(DESTDIR)$(GIT_PREFIX)/VERSION-$(VERSION)-$(ARCH_UNIV) $(BUILD_DIR)/git-$(VERSION)/osx-installed-man $(BUILD_DIR)/git-$(VERSION)/osx-installed-assets $(BUILD_DIR)/git-$(VERSION)/osx-installed-subtree
104+
find $(DESTDIR)$(GIT_PREFIX) -type d -exec chmod ugo+rx {} \;
105+
find $(DESTDIR)$(GIT_PREFIX) -type f -exec chmod ugo+r {} \;
106+
touch $@
107+
108+
$(BUILD_DIR)/git-$(VERSION)/osx-built-assert-$(ARCH_UNIV): $(BUILD_DIR)/git-$(VERSION)/osx-built
109+
File $(BUILD_DIR)/git-$(VERSION)/git
110+
File $(BUILD_DIR)/git-$(VERSION)/contrib/credential/osxkeychain/git-credential-osxkeychain
111+
touch $@
112+
113+
disk-image/VERSION-$(VERSION)-$(ARCH_UNIV):
114+
rm -f disk-image/*.pkg disk-image/VERSION-* disk-image/.DS_Store
115+
mkdir disk-image
116+
touch "$@"
117+
118+
pkg_cmd := pkgbuild --identifier com.git.pkg --version $(VERSION) \
119+
--root $(ARTIFACTDIR)$(PREFIX) --scripts assets/scripts \
120+
--install-location $(PREFIX) --component-plist ./assets/git-components.plist
121+
122+
ifdef APPLE_INSTALLER_IDENTITY
123+
pkg_cmd += --sign "$(APPLE_INSTALLER_IDENTITY)"
124+
endif
125+
126+
pkg_cmd += disk-image/git-$(VERSION)-$(ARCH_UNIV).pkg
127+
disk-image/git-$(VERSION)-$(ARCH_UNIV).pkg: disk-image/VERSION-$(VERSION)-$(ARCH_UNIV) symlinks
128+
$(pkg_cmd)
129+
130+
git-%-$(ARCH_UNIV).dmg:
131+
hdiutil create git-$(VERSION)-$(ARCH_UNIV).uncompressed.dmg -fs HFS+ -srcfolder disk-image -volname "Git $(VERSION) $(ARCH_UNIV)" -ov 2>&1 | tee err || { \
132+
grep "Resource busy" err && \
133+
sleep 5 && \
134+
hdiutil create git-$(VERSION)-$(ARCH_UNIV).uncompressed.dmg -fs HFS+ -srcfolder disk-image -volname "Git $(VERSION) $(ARCH_UNIV)" -ov; }
135+
hdiutil convert -format UDZO -o $@ git-$(VERSION)-$(ARCH_UNIV).uncompressed.dmg
136+
rm -f git-$(VERSION)-$(ARCH_UNIV).uncompressed.dmg
137+
138+
payload: $(BUILD_DIR)/git-$(VERSION)/osx-installed $(BUILD_DIR)/git-$(VERSION)/osx-built-assert-$(ARCH_UNIV)
139+
140+
pkg: disk-image/git-$(VERSION)-$(ARCH_UNIV).pkg
141+
142+
image: git-$(VERSION)-$(ARCH_UNIV).dmg
143+
144+
ifdef APPLE_APP_IDENTITY
145+
codesign:
146+
@$(CURDIR)/../scripts/codesign.sh --payload="build-artifacts/usr/local/git" \
147+
--identity="$(APPLE_APP_IDENTITY)" \
148+
--entitlements="$(CURDIR)/entitlements.xml"
149+
endif
150+
151+
# Notarization can only happen if the package is fully signed
152+
ifdef APPLE_KEYCHAIN_PROFILE
153+
notarize:
154+
@$(CURDIR)/../scripts/notarize.sh \
155+
--package="disk-image/git-$(VERSION)-$(ARCH_UNIV).pkg" \
156+
--keychain-profile="$(APPLE_KEYCHAIN_PROFILE)"
157+
endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[credential]
2+
helper = osxkeychain
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<array>
5+
<dict>
6+
<key>BundleHasStrictIdentifier</key>
7+
<true/>
8+
<key>BundleIsRelocatable</key>
9+
<false/>
10+
<key>BundleIsVersionChecked</key>
11+
<true/>
12+
<key>BundleOverwriteAction</key>
13+
<string>upgrade</string>
14+
<key>RootRelativeBundlePath</key>
15+
<string>git/share/git-gui/lib/Git Gui.app</string>
16+
</dict>
17+
</array>
18+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash
2+
INSTALL_DST="$2"
3+
SCALAR_C_CMD="$INSTALL_DST/git/bin/scalar"
4+
SCALAR_DOTNET_CMD="/usr/local/scalar/scalar"
5+
SCALAR_UNINSTALL_SCRIPT="/usr/local/scalar/uninstall_scalar.sh"
6+
7+
function cleanupScalar()
8+
{
9+
echo "checking whether Scalar was installed"
10+
if [ ! -f "$SCALAR_C_CMD" ]; then
11+
echo "Scalar not installed; exiting..."
12+
return 0
13+
fi
14+
echo "Scalar is installed!"
15+
16+
echo "looking for Scalar.NET"
17+
if [ ! -f "$SCALAR_DOTNET_CMD" ]; then
18+
echo "Scalar.NET not found; exiting..."
19+
return 0
20+
fi
21+
echo "Scalar.NET found!"
22+
23+
currentUser=$(echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }')
24+
25+
# Re-register Scalar.NET repositories with the newly-installed Scalar
26+
for repo in $($SCALAR_DOTNET_CMD list); do
27+
(
28+
PATH="$INSTALL_DST/git/bin:$PATH"
29+
sudo -u "$currentUser" scalar register $repo || \
30+
echo "warning: skipping re-registration of $repo"
31+
)
32+
done
33+
34+
# Uninstall Scalar.NET
35+
echo "removing Scalar.NET"
36+
37+
# Add /usr/local/bin to path - default install location of Homebrew
38+
PATH="/usr/local/bin:$PATH"
39+
if (sudo -u "$currentUser" brew list --cask scalar); then
40+
# Remove from Homebrew
41+
sudo -u "$currentUser" brew remove --cask scalar || echo "warning: Scalar.NET uninstall via Homebrew completed with code $?"
42+
echo "Scalar.NET uninstalled via Homebrew!"
43+
elif (sudo -u "$currentUser" brew list --cask scalar-azrepos); then
44+
sudo -u "$currentUser" brew remove --cask scalar-azrepos || echo "warning: Scalar.NET with GVFS uninstall via Homebrew completed with code $?"
45+
echo "Scalar.NET with GVFS uninstalled via Homebrew!"
46+
elif [ -f $SCALAR_UNINSTALL_SCRIPT ]; then
47+
# If not installed with Homebrew, manually remove package
48+
sudo -S sh $SCALAR_UNINSTALL_SCRIPT || echo "warning: Scalar.NET uninstall completed with code $?"
49+
echo "Scalar.NET uninstalled!"
50+
else
51+
echo "warning: Scalar.NET uninstall script not found"
52+
fi
53+
54+
# Re-create the Scalar symlink, in case it was removed by the Scalar.NET uninstall operation
55+
mkdir -p $INSTALL_DST/bin
56+
/bin/ln -Fs "$SCALAR_C_CMD" "$INSTALL_DST/bin/scalar"
57+
}
58+
59+
# Run Scalar cleanup (will exit if not applicable)
60+
cleanupScalar
61+
62+
exit 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash -e
2+
if [ ! -r "/usr/local/git" ]; then
3+
echo "Git doesn't appear to be installed via this installer. Aborting"
4+
exit 1
5+
fi
6+
7+
if [ "$1" != "--yes" ]; then
8+
echo "This will uninstall git by removing /usr/local/git/, and symlinks"
9+
printf "Type 'yes' if you are sure you wish to continue: "
10+
read response
11+
else
12+
response="yes"
13+
fi
14+
15+
if [ "$response" == "yes" ]; then
16+
# remove all of the symlinks we've created
17+
pkgutil --files com.git.pkg | grep bin | while read f; do
18+
if [ -L /usr/local/$f ]; then
19+
sudo rm /usr/local/$f
20+
fi
21+
done
22+
23+
# forget receipts.
24+
pkgutil --packages | grep com.git.pkg | xargs -I {} sudo pkgutil --forget {}
25+
echo "Uninstalled"
26+
27+
# The guts all go here.
28+
sudo rm -rf /usr/local/git/
29+
else
30+
echo "Aborted"
31+
exit 1
32+
fi
33+
34+
exit 0

0 commit comments

Comments
 (0)