Difference in counting the number of rules from GIT #24429
-
I’m doing Automation to count the total number of rules from the GIT by using the GIT Bash Regular Expression.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
This sounds more like you’re needing help with debugging your one line bash script than a question about git? Can you give us an example of exactly what is not working that is separate from your bash script? Also, it would be helpful if you had a public repository where you could reproduce the problem that we could take a look at. Let us know! |
Beta Was this translation helpful? Give feedback.
-
Hey @lee-dohm , Actually I’m counting the number of files ending with particular extension (e.g. extension can be .brl or .dslr) in a project. So, currently I’m able to find the count of files from git itself by running that command which I mentioned previuosly. But the problem is there are some files say F1.dslr and F2.dslr in Folder1 and Folder2 respectively. Previuosly F1.dslr file was in Folder1 but now it is moved to Folder 2. So when I’m counting the files by that command, it shows the F1.dslr file is in both Folder 1&2. But in actual scenario F1.dslr is availbale only in Folder2. So, my concern is while counting the files, why it shows the F1.dslr file in both folder? |
Beta Was this translation helpful? Give feedback.
-
The reason for this is that you started your command with I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Thank you soo much @lee-dohm . It’s working now :slight_smile: Thanks a lott. |
Beta Was this translation helpful? Give feedback.
The reason for this is that you started your command with
git log --numstat
. This produces the list of every change that has ever been made to your git repository, including every file that does or ever has existed in your repo. If you only want the files that currently exist in your repository, then you should use thels
command just like you would with any other directory. Or if you really only want to see the files…