I need to write a script that will
I have a script for step 2:
for i in `git show --pretty="format:" --name-only SHA1 | grep '.*\.hbm\.xml' `; do # call script here..... exit done
Now, I need to figure out step 1.
On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.
The git log command displays all of the commits in a repository's history. By default, the command displays each commit's: Secure Hash Algorithm (SHA)
`git log` command is used to view the commit history and display the necessary information of the git repository. This command displays the latest git commits information in chronological order, and the last commit will be displayed first.
More commits is great. As long as they get finer-grained and have good messages, they're useful.
Something like:
for commit in $(git rev-list $branch) do if git ls-tree --name-only -r $commit | grep -q '\.hbm\.xml$'; then echo $commit exit 0 fi done
Note that git show
will only list files which have changed in that commit, if you want to know whether there is a path that matches a particular pattern in a commit you need to use something like git ls-tree
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With