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

Add --git-ignore-pattern option. #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

inakimalerba
Copy link

It can be used to ignore certain paths or files from the repo.is_clean check.
It's an alternative to the --git-ignore-new parameter, when you only
need to skip a certain path.

This comes from the need to store ccache inside the working directory on Gitlab pipelines.

Issue: https://salsa.debian.org/salsa-ci-team/pipeline/issues/27
Workaround: https://salsa.debian.org/salsa-ci-team/pipeline/merge_requests/63/diffs#d02988742a4e38af0efe3a7f4c522afc7e77728a_34_41

It can be used to ignore certain paths or files from the repo.is_clean check.
It's an alternative to the --git-ignore-new parameter, when you only
need to skip a certain path.
@@ -842,11 +842,15 @@ def _status(self, porcelain, ignore_untracked, paths):
out, ret = self._git_getoutput('status',
args.args + paths,
extra_env={'LC_ALL': 'C'})
if ignore_pattern:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be skipped when ignore_untracked is true

@agx
Copy link
Owner

agx commented Mar 1, 2019

Thanks for the patch! Some improvements so we can merge this:

  • add a test for the behaviour
  • rename to --git-ignore-new-pattern (to match --git-ignore-new)
  • allow other commands that have --git-ignore-new to use it as well
  • update the docs
  • allow the command multiple times so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants