forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify API for dir.[ch] and unpack-trees.[ch] -- mark relevant fields as internal #1149
Closed
Closed
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7bbc457
t2021: fix platform-specific leftover cruft
newren 8ffdb6c
unpack-trees: heed requests to overwrite ignored files
newren 879a93a
dir: separate public from internal portion of dir_struct
newren 4ce9fae
dir: add a usage note to exclude_per_dir
newren 1234440
dir: mark output only fields of dir_struct as such
newren 4e86e39
unpack-trees: clean up some flow control
newren cd3d489
sparse-checkout: avoid using internal API of unpack-trees
newren 09140cb
sparse-checkout: avoid using internal API of unpack-trees, take 2
newren 27f2d47
unpack_trees: start splitting internal fields from public API
newren 4236c0d
unpack-trees: mark fields only used internally as internal
newren 76f4a54
unpack-trees: rewrap a few overlong lines from previous patch
newren ee36935
unpack-trees: special case read-tree debugging as internal usage
newren 6575c00
unpack-trees: add usage notices around df_conflict_entry
newren File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,10 +50,13 @@ test_expect_success 'checkout commit with dir must not remove untracked a/b' ' | |
|
||
test_expect_success SYMLINKS 'the symlink remained' ' | ||
|
||
test_when_finished "rm a/b" && | ||
test -h a/b | ||
' | ||
|
||
test_expect_success 'cleanup after previous symlink tests' ' | ||
rm a/b | ||
' | ||
|
||
test_expect_success SYMLINKS 'checkout -f must not follow symlinks when removing entries' ' | ||
git checkout -f start && | ||
mkdir dir && | ||
|
@@ -66,4 +69,15 @@ test_expect_success SYMLINKS 'checkout -f must not follow symlinks when removing | |
test_path_is_file untracked/f | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the Git mailing list, Jonathan Tan wrote (reply to this): "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
> diff --git a/unpack-trees.c b/unpack-trees.c
> index 3d05e45a279..4518d33ed99 100644
> --- a/unpack-trees.c
> +++ b/unpack-trees.c
> @@ -2337,7 +2337,7 @@ static int verify_clean_subdirectory(const struct cache_entry *ce,
>
> memset(&d, 0, sizeof(d));
> if (o->dir)
> - d.exclude_per_dir = o->dir->exclude_per_dir;
> + setup_standard_excludes(&d);
> i = read_directory(&d, o->src_index, pathbuf, namelen+1, NULL);
> dir_clear(&d);
> free(pathbuf);
Thanks to the later patches in this patch set, I only needed to look at
unpack-trees.c to see how o->dir (later, o->internal.dir) is set. The
only place it is set is in unpack_trees(), in which a flag is set and
setup_standard_excludes() is called. So the RHS of the diff here does
effectively the same thing as the LHS. (As for the flag, it is not set
in the RHS, but it was not set in the LHS in the first place, so that's
fine.)
Thanks - all 13 patches in this patch set look good. |
||
' | ||
|
||
test_expect_success 'checkout --overwrite-ignore should succeed if only ignored files in the way' ' | ||
git checkout -b df_conflict && | ||
test_commit contents some_dir && | ||
git checkout start && | ||
mkdir some_dir && | ||
echo autogenerated information >some_dir/ignore && | ||
echo ignore >.git/info/exclude && | ||
git checkout --overwrite-ignore df_conflict && | ||
! test_path_is_dir some_dir | ||
' | ||
|
||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Derrick Stolee wrote (reply to this):