Debian Codegraph @

debian/patches/exclude18.patch

raw
1 From 4f814e0e4c673f86dc65a557f7e55f6b5efd1529 Mon Sep 17 00:00:00 2001
2 From: Anton Makrushin <[email protected]>
3 Date: Mon, 20 Mar 2023 20:05:42 +0530
4 Subject: Exclude VCS directory with writing from an archive
5
6 See https://savannah.gnu.org/bugs/?62859
7 ---
8 tests/exclude18.at | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
9 1 file changed, 87 insertions(+)
10 create mode 100644 tests/exclude18.at
11
12 (limited to 'tests/exclude18.at')
13
14 diff --git a/tests/exclude18.at b/tests/exclude18.at
15 new file mode 100644
16 index 0000000..64aaa52
17 --- /dev/null
18 +++ b/tests/exclude18.at
19 @@ -0,0 +1,87 @@
20 +# Process this file with autom4te to create testsuite. -*- Autotest -*-
21 +
22 +# Test suite for GNU tar.
23 +# Copyright 2004-2023 Free Software Foundation, Inc.
24 +
25 +# This file is part of GNU tar.
26 +
27 +# GNU tar is free software; you can redistribute it and/or modify
28 +# it under the terms of the GNU General Public License as published by
29 +# the Free Software Foundation; either version 3 of the License, or
30 +# (at your option) any later version.
31 +
32 +# GNU tar is distributed in the hope that it will be useful,
33 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
34 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 +# GNU General Public License for more details.
36 +
37 +# You should have received a copy of the GNU General Public License
38 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
39 +
40 +# Test --exclude-vcs option with subcommands: EXTRACT, LIST, DIFF.
41 +# Check VCS directory with files, and empty.
42 +#
43 +# Ref: https://savannah.gnu.org/bugs/?62859
44 +# Wed 03 Aug 2022 04:06:28 PM UTC, original submission: Quote
45 +# Mohamed Akram <mohdakram>
46 +# > The --exclude-vcs flag seems to exclude .gitignore but not .git when
47 +# extracting.
48 +
49 +AT_SETUP([--exclude-vcs extract list compare])
50 +AT_KEYWORDS([exclude-vcs extract list compare exclude18])
51 +
52 +AT_TAR_CHECK([
53 +AT_SORT_PREREQ
54 +mkdir gitrepo
55 +cd gitrepo
56 +
57 +# Make an empty VCS directory:
58 +mkdir .svn
59 +
60 +# Make a VCS directory with a file:
61 +mkdir .git
62 +touch .git/_A
63 +
64 +# Make a VCS file:
65 +touch .gitignore
66 +
67 +# Make non-VCS files:
68 +touch .git_B
69 +touch _C
70 +
71 +# Create an archive, include VCS:
72 +cd ..
73 +tar -cf gitrepo.tar gitrepo
74 +rm -r gitrepo
75 +
76 +echo Extract:
77 +tar -xvf gitrepo.tar --exclude-vcs | sort
78 +
79 +echo
80 +echo List:
81 +tar -tf gitrepo.tar --exclude-vcs | sort
82 +
83 +echo
84 +echo Diff:
85 +tar -dvf gitrepo.tar --exclude-vcs gitrepo | sort
86 +
87 +],
88 +[0],
89 +[Extract:
90 +gitrepo/
91 +gitrepo/.git_B
92 +gitrepo/_C
93 +
94 +List:
95 +gitrepo/
96 +gitrepo/.git_B
97 +gitrepo/_C
98 +
99 +Diff:
100 +gitrepo/
101 +gitrepo/.git_B
102 +gitrepo/_C
103 +],
104 +[])
105 +
106 +AT_CLEANUP
107 --
108 cgit v1.1