Skip to content
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

Returns filesToIgnore in the output of @gitstart/gitslice-ignore #8

Closed
ishmam-mahmud opened this issue Nov 12, 2023 · 0 comments · Fixed by #9
Closed

Returns filesToIgnore in the output of @gitstart/gitslice-ignore #8

ishmam-mahmud opened this issue Nov 12, 2023 · 0 comments · Fixed by #9

Comments

@ishmam-mahmud
Copy link
Collaborator

Currently the output is just

type GitSliceOutput = {
  filesToSlice: string[]
}

which is useful for figuring out what to slice, and indeed to copy only those files and create a folder containing just the sliced repo during git slice operations.

However, we need filesToIgnore: string[] as well. This should return the list of files in the given repo that should be ignored and not sliced.

This will be useful for the following use cases:

  • git-slice-tools implements pull operations by identifying that list by itself, and then deleting those files. Without filesToIgnore in the output, using the library is harder for git slice tools.
  • a future gitslice pull command in the CLI could implement the git-slice-tools method of a pull operation, where it identifies the filesToIgnore and deletes them
  • In push operations, git-slice-hooks needs this list for a check. In this check, it ensures that none of the ignore files get accidentally modified in any way, by running git reset on them. If it only has access to filesToSlice this is much harder
@ishmam-mahmud ishmam-mahmud linked a pull request Nov 12, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant