Matching directories with inner directories #1947
-
Hi @jackton1 Thank you for this great action. I need some help to understand how to use the action for the following case: I want to get changes only in a specific level of a directory that has inner directories.
Case 1) For example, if I rename created:
deleted:
updated:
What I tried:
Case 2) If I rename created:
deleted:
updated:
What I tried:
I also tried |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi @laysauchoa it would be helpful to provide the output of what you tried. You'll need to re-run the workflow and enable debug mode which generates more information and you can grab the related outputs. Just looking at the steps you provided however I'll suggest not ending patterns with a slash. You can test glob patterns here ExampleVS |
Beta Was this translation helpful? Give feedback.
-
Thank you! @jackton1 I gathered all the information here and what I am trying to achieve:
Logs:
Why is the global pattern matching with C2-new? I am trying to filter out changes to only a level like a folder level and not the whole inner pattern, so I am not sure how to achieve that. Other folder changes, should not be included this is what I thought. |
Beta Was this translation helpful? Give feedback.
-
@jackton1 I appreciate your answer and I feel I am starting to understand. So the action will not track folder rename only, right? as it would give me a path to a file. Empty folders are not tracked by git but the path will always be resolved to a file even if just a directory was renamed without changes in inner directories. |
Beta Was this translation helpful? Give feedback.
A folder rename should be considered from the file level not the folder level. Renaming a file tracked by git is similar to changing the folder the file was in e.g
A/b.txt
renamingA
toB
simply means the location is nowB/b.txt
which gets tracked as a move ifb.txt
is not changed or a delete and create if the contents of b.txt has changed. The phrase “So the action will not track folder rename only” again is incorrect git tracks files not folders I.e content changes.This action uses git to output the list of tracked changed files i.e
b.txt
you can optionally output only the directory name which is done bydir_names
input. In the example above if it’s a directory renameA/b.txt
-> B/b.tx…