Skip to content

Commit 7143258

Browse files
committed
Merge branch 'ls/p4-lfs'
Update GitLFS integration with "git p4". * ls/p4-lfs: git-p4: add diff/merge properties to .gitattributes for GitLFS files
2 parents eef32a0 + 862f931 commit 7143258

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

git-p4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,10 +1120,10 @@ def generateGitAttributes(self):
11201120
'# Git LFS (see https://git-lfs.github.com/)\n',
11211121
'#\n',
11221122
] +
1123-
['*.' + f.replace(' ', '[[:space:]]') + ' filter=lfs -text\n'
1123+
['*.' + f.replace(' ', '[[:space:]]') + ' filter=lfs diff=lfs merge=lfs -text\n'
11241124
for f in sorted(gitConfigList('git-p4.largeFileExtensions'))
11251125
] +
1126-
['/' + f.replace(' ', '[[:space:]]') + ' filter=lfs -text\n'
1126+
['/' + f.replace(' ', '[[:space:]]') + ' filter=lfs diff=lfs merge=lfs -text\n'
11271127
for f in sorted(self.largeFiles) if not self.hasLargeFileExtension(f)
11281128
]
11291129
)

t/t9824-git-p4-git-lfs.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ test_expect_success 'Store files in LFS based on size (>24 bytes)' '
8383
#
8484
# Git LFS (see https://git-lfs.github.com/)
8585
#
86-
/file2.dat filter=lfs -text
87-
/file4.bin filter=lfs -text
88-
/path[[:space:]]with[[:space:]]spaces/file3.bin filter=lfs -text
86+
/file2.dat filter=lfs diff=lfs merge=lfs -text
87+
/file4.bin filter=lfs diff=lfs merge=lfs -text
88+
/path[[:space:]]with[[:space:]]spaces/file3.bin filter=lfs diff=lfs merge=lfs -text
8989
EOF
9090
test_path_is_file .gitattributes &&
9191
test_cmp expect .gitattributes
@@ -111,7 +111,7 @@ test_expect_success 'Store files in LFS based on size (>25 bytes)' '
111111
#
112112
# Git LFS (see https://git-lfs.github.com/)
113113
#
114-
/file4.bin filter=lfs -text
114+
/file4.bin filter=lfs diff=lfs merge=lfs -text
115115
EOF
116116
test_path_is_file .gitattributes &&
117117
test_cmp expect .gitattributes
@@ -137,7 +137,7 @@ test_expect_success 'Store files in LFS based on extension (dat)' '
137137
#
138138
# Git LFS (see https://git-lfs.github.com/)
139139
#
140-
*.dat filter=lfs -text
140+
*.dat filter=lfs diff=lfs merge=lfs -text
141141
EOF
142142
test_path_is_file .gitattributes &&
143143
test_cmp expect .gitattributes
@@ -165,8 +165,8 @@ test_expect_success 'Store files in LFS based on size (>25 bytes) and extension
165165
#
166166
# Git LFS (see https://git-lfs.github.com/)
167167
#
168-
*.dat filter=lfs -text
169-
/file4.bin filter=lfs -text
168+
*.dat filter=lfs diff=lfs merge=lfs -text
169+
/file4.bin filter=lfs diff=lfs merge=lfs -text
170170
EOF
171171
test_path_is_file .gitattributes &&
172172
test_cmp expect .gitattributes
@@ -201,8 +201,8 @@ test_expect_success 'Remove file from repo and store files in LFS based on size
201201
#
202202
# Git LFS (see https://git-lfs.github.com/)
203203
#
204-
/file2.dat filter=lfs -text
205-
/path[[:space:]]with[[:space:]]spaces/file3.bin filter=lfs -text
204+
/file2.dat filter=lfs diff=lfs merge=lfs -text
205+
/path[[:space:]]with[[:space:]]spaces/file3.bin filter=lfs diff=lfs merge=lfs -text
206206
EOF
207207
test_path_is_file .gitattributes &&
208208
test_cmp expect .gitattributes
@@ -239,8 +239,8 @@ test_expect_success 'Add .gitattributes and store files in LFS based on size (>2
239239
#
240240
# Git LFS (see https://git-lfs.github.com/)
241241
#
242-
/file2.dat filter=lfs -text
243-
/path[[:space:]]with[[:space:]]spaces/file3.bin filter=lfs -text
242+
/file2.dat filter=lfs diff=lfs merge=lfs -text
243+
/path[[:space:]]with[[:space:]]spaces/file3.bin filter=lfs diff=lfs merge=lfs -text
244244
EOF
245245
test_path_is_file .gitattributes &&
246246
test_cmp expect .gitattributes
@@ -280,7 +280,7 @@ test_expect_success 'Add big files to repo and store files in LFS based on compr
280280
#
281281
# Git LFS (see https://git-lfs.github.com/)
282282
#
283-
/file6.bin filter=lfs -text
283+
/file6.bin filter=lfs diff=lfs merge=lfs -text
284284
EOF
285285
test_path_is_file .gitattributes &&
286286
test_cmp expect .gitattributes

0 commit comments

Comments
 (0)