@ai-ecoverse/wasm-git 2.55.0-2 → 2.55.0-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/git +1 -1
- package/bin/git-receive-pack +1 -0
- package/bin/git-receive-pack.wasm +0 -0
- package/bin/git-remote-http +1 -1
- package/bin/git-remote-http.wasm +0 -0
- package/bin/git-remote-https +1 -1
- package/bin/git-remote-https.wasm +0 -0
- package/bin/git-upload-pack +1 -0
- package/bin/git-upload-pack.wasm +0 -0
- package/bin/git.wasm +0 -0
- package/libexec/git-core/git-bundle +1 -1
- package/libexec/git-core/git-difftool--helper +125 -0
- package/libexec/git-core/git-fetch-pack +1 -1
- package/libexec/git-core/git-filter-branch +665 -0
- package/libexec/git-core/git-index-pack +1 -1
- package/libexec/git-core/git-merge-octopus +112 -0
- package/libexec/git-core/git-merge-one-file +167 -0
- package/libexec/git-core/git-merge-resolve +64 -0
- package/libexec/git-core/git-mergetool +579 -0
- package/libexec/git-core/git-mergetool--lib +549 -0
- package/libexec/git-core/git-pack-objects +1 -1
- package/libexec/git-core/git-quiltimport +155 -0
- package/libexec/git-core/git-receive-pack +1 -1
- package/libexec/git-core/git-remote-http +1 -1
- package/libexec/git-core/git-remote-http.wasm +0 -0
- package/libexec/git-core/git-remote-https +1 -1
- package/libexec/git-core/git-remote-https.wasm +0 -0
- package/libexec/git-core/git-request-pull +178 -0
- package/libexec/git-core/git-rev-list +1 -1
- package/libexec/git-core/git-sh-i18n +79 -0
- package/libexec/git-core/git-sh-setup +357 -0
- package/libexec/git-core/git-submodule +671 -0
- package/libexec/git-core/git-unpack-objects +1 -1
- package/libexec/git-core/git-upload-archive +1 -1
- package/libexec/git-core/git-upload-pack +1 -1
- package/libexec/git-core/git-web--browse +196 -0
- package/libexec/git-core/git.wasm +0 -0
- package/package.json +11 -6
- package/share/git-core/templates/description +1 -0
- package/share/git-core/templates/hooks/applypatch-msg.sample +15 -0
- package/share/git-core/templates/hooks/commit-msg.sample +74 -0
- package/share/git-core/templates/hooks/fsmonitor-watchman.sample +168 -0
- package/share/git-core/templates/hooks/post-update.sample +8 -0
- package/share/git-core/templates/hooks/pre-applypatch.sample +14 -0
- package/share/git-core/templates/hooks/pre-commit.sample +49 -0
- package/share/git-core/templates/hooks/pre-merge-commit.sample +13 -0
- package/share/git-core/templates/hooks/pre-push.sample +53 -0
- package/share/git-core/templates/hooks/pre-rebase.sample +169 -0
- package/share/git-core/templates/hooks/pre-receive.sample +24 -0
- package/share/git-core/templates/hooks/prepare-commit-msg.sample +42 -0
- package/share/git-core/templates/hooks/push-to-checkout.sample +78 -0
- package/share/git-core/templates/hooks/sendemail-validate.sample +77 -0
- package/share/git-core/templates/hooks/update.sample +128 -0
- package/share/git-core/templates/info/exclude +6 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
OPTIONS_KEEPDASHDASH=
|
|
3
|
+
OPTIONS_STUCKLONG=
|
|
4
|
+
OPTIONS_SPEC="\
|
|
5
|
+
git quiltimport [options]
|
|
6
|
+
--
|
|
7
|
+
n,dry-run dry run
|
|
8
|
+
author= author name and email address for patches without any
|
|
9
|
+
patches= path to the quilt patches
|
|
10
|
+
series= path to the quilt series file
|
|
11
|
+
keep-non-patch Pass -b to git mailinfo
|
|
12
|
+
"
|
|
13
|
+
SUBDIRECTORY_ON=Yes
|
|
14
|
+
. git-sh-setup
|
|
15
|
+
|
|
16
|
+
dry_run=""
|
|
17
|
+
quilt_author=""
|
|
18
|
+
while test $# != 0
|
|
19
|
+
do
|
|
20
|
+
case "$1" in
|
|
21
|
+
--author)
|
|
22
|
+
shift
|
|
23
|
+
quilt_author="$1"
|
|
24
|
+
;;
|
|
25
|
+
-n|--dry-run)
|
|
26
|
+
dry_run=1
|
|
27
|
+
;;
|
|
28
|
+
--patches)
|
|
29
|
+
shift
|
|
30
|
+
QUILT_PATCHES="$1"
|
|
31
|
+
;;
|
|
32
|
+
--series)
|
|
33
|
+
shift
|
|
34
|
+
QUILT_SERIES="$1"
|
|
35
|
+
;;
|
|
36
|
+
--keep-non-patch)
|
|
37
|
+
MAILINFO_OPT="-b"
|
|
38
|
+
;;
|
|
39
|
+
--)
|
|
40
|
+
shift
|
|
41
|
+
break;;
|
|
42
|
+
*)
|
|
43
|
+
usage
|
|
44
|
+
;;
|
|
45
|
+
esac
|
|
46
|
+
shift
|
|
47
|
+
done
|
|
48
|
+
|
|
49
|
+
# Quilt Author
|
|
50
|
+
if [ -n "$quilt_author" ] ; then
|
|
51
|
+
quilt_author_name=$(expr "z$quilt_author" : 'z\(.*[^ ]\) *<.*') &&
|
|
52
|
+
quilt_author_email=$(expr "z$quilt_author" : '.*<\([^>]*\)') &&
|
|
53
|
+
test '' != "$quilt_author_name" &&
|
|
54
|
+
test '' != "$quilt_author_email" ||
|
|
55
|
+
die "malformed --author parameter"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# Quilt patch directory
|
|
59
|
+
: ${QUILT_PATCHES:=patches}
|
|
60
|
+
if ! [ -d "$QUILT_PATCHES" ] ; then
|
|
61
|
+
echo "The \"$QUILT_PATCHES\" directory does not exist."
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# Quilt series file
|
|
66
|
+
: ${QUILT_SERIES:=$QUILT_PATCHES/series}
|
|
67
|
+
if ! [ -e "$QUILT_SERIES" ] ; then
|
|
68
|
+
echo "The \"$QUILT_SERIES\" file does not exist."
|
|
69
|
+
exit 1
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
# Temporary directories
|
|
73
|
+
tmp_dir="$GIT_DIR"/rebase-apply
|
|
74
|
+
tmp_msg="$tmp_dir/msg"
|
|
75
|
+
tmp_patch="$tmp_dir/patch"
|
|
76
|
+
tmp_info="$tmp_dir/info"
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# Find the initial commit
|
|
80
|
+
commit=$(git rev-parse HEAD)
|
|
81
|
+
|
|
82
|
+
mkdir $tmp_dir || exit 2
|
|
83
|
+
while read patch_name level garbage <&3
|
|
84
|
+
do
|
|
85
|
+
case "$patch_name" in ''|'#'*) continue;; esac
|
|
86
|
+
case "$level" in
|
|
87
|
+
-p*) ;;
|
|
88
|
+
''|'#'*)
|
|
89
|
+
level=;;
|
|
90
|
+
*)
|
|
91
|
+
echo "unable to parse patch level, ignoring it."
|
|
92
|
+
level=;;
|
|
93
|
+
esac
|
|
94
|
+
case "$garbage" in
|
|
95
|
+
''|'#'*);;
|
|
96
|
+
*)
|
|
97
|
+
echo "trailing garbage found in series file: $garbage"
|
|
98
|
+
exit 1;;
|
|
99
|
+
esac
|
|
100
|
+
if ! [ -f "$QUILT_PATCHES/$patch_name" ] ; then
|
|
101
|
+
echo "$patch_name doesn't exist. Skipping."
|
|
102
|
+
continue
|
|
103
|
+
fi
|
|
104
|
+
echo $patch_name
|
|
105
|
+
git mailinfo $MAILINFO_OPT "$tmp_msg" "$tmp_patch" \
|
|
106
|
+
<"$QUILT_PATCHES/$patch_name" >"$tmp_info" || exit 3
|
|
107
|
+
test -s "$tmp_patch" || {
|
|
108
|
+
echo "Patch is empty. Was it split wrong?"
|
|
109
|
+
exit 1
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
# Parse the author information
|
|
113
|
+
GIT_AUTHOR_NAME=$(sed -ne 's/Author: //p' "$tmp_info")
|
|
114
|
+
GIT_AUTHOR_EMAIL=$(sed -ne 's/Email: //p' "$tmp_info")
|
|
115
|
+
export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
|
|
116
|
+
while test -z "$GIT_AUTHOR_EMAIL" && test -z "$GIT_AUTHOR_NAME" ; do
|
|
117
|
+
if [ -n "$quilt_author" ] ; then
|
|
118
|
+
GIT_AUTHOR_NAME="$quilt_author_name";
|
|
119
|
+
GIT_AUTHOR_EMAIL="$quilt_author_email";
|
|
120
|
+
elif [ -n "$dry_run" ]; then
|
|
121
|
+
echo "No author found in $patch_name" >&2;
|
|
122
|
+
GIT_AUTHOR_NAME="dry-run-not-found";
|
|
123
|
+
GIT_AUTHOR_EMAIL="dry-run-not-found";
|
|
124
|
+
else
|
|
125
|
+
echo "No author found in $patch_name" >&2;
|
|
126
|
+
echo "---"
|
|
127
|
+
cat $tmp_msg
|
|
128
|
+
printf "Author: ";
|
|
129
|
+
read patch_author
|
|
130
|
+
|
|
131
|
+
echo "$patch_author"
|
|
132
|
+
|
|
133
|
+
patch_author_name=$(expr "z$patch_author" : 'z\(.*[^ ]\) *<.*') &&
|
|
134
|
+
patch_author_email=$(expr "z$patch_author" : '.*<\([^>]*\)') &&
|
|
135
|
+
test '' != "$patch_author_name" &&
|
|
136
|
+
test '' != "$patch_author_email" &&
|
|
137
|
+
GIT_AUTHOR_NAME="$patch_author_name" &&
|
|
138
|
+
GIT_AUTHOR_EMAIL="$patch_author_email"
|
|
139
|
+
fi
|
|
140
|
+
done
|
|
141
|
+
GIT_AUTHOR_DATE=$(sed -ne 's/Date: //p' "$tmp_info")
|
|
142
|
+
SUBJECT=$(sed -ne 's/Subject: //p' "$tmp_info")
|
|
143
|
+
export GIT_AUTHOR_DATE SUBJECT
|
|
144
|
+
if [ -z "$SUBJECT" ] ; then
|
|
145
|
+
SUBJECT=$(echo $patch_name | sed -e 's/.patch$//')
|
|
146
|
+
fi
|
|
147
|
+
|
|
148
|
+
if [ -z "$dry_run" ] ; then
|
|
149
|
+
git apply --index -C1 ${level:+"$level"} "$tmp_patch" &&
|
|
150
|
+
tree=$(git write-tree) &&
|
|
151
|
+
commit=$( { echo "$SUBJECT"; echo; cat "$tmp_msg"; } | git commit-tree $tree -p $commit) &&
|
|
152
|
+
git update-ref -m "quiltimport: $patch_name" HEAD $commit || exit 4
|
|
153
|
+
fi
|
|
154
|
+
done 3<"$QUILT_SERIES"
|
|
155
|
+
rm -rf $tmp_dir || exit 5
|