Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Ignore commits starting with "META" in commit message #88

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dltj
Copy link

@dltj dltj commented Jul 23, 2021

For my blog, I want to ignore changes to the Jekyll front matter—changing tags and the like. This commit adds --grep=^META --invert-grep to the Git log command. Any commit messages starting with "META" are ignored for the purposes of displaying the last-modified date.

I'm unsure if the caching proposals in #86 and #87 by @klandergren are incompatible with this change or if @trickv's option of AuthorDate (#53) is a better approach.

@klandergren
Copy link

re: incompatible with #86 and #87
Thanks for the consideration @dltj! The general approach you are taking with --grep does not appear to be incompatible, but the pull requests will likely not all merge cleanly. That is not a problem though: compatibility, and necessary updates, will depend on feedback from maintainers and order of PRs being merged.

Basically: we are in a holding pattern until that time.

re: feedback on this PR
I am not a maintainer of this project, but suggest:

  • not including the ^META pattern as that seems specific to your blog's commit history
  • finding a way to supply the pattern via configuration value
  • having default behavior remain the same

@dltj
Copy link
Author

dltj commented Jul 29, 2021

Thanks for feedback @klandergren. I'm glad this approach is compatible. Your suggestions are sound, but my Ruby skills are not strong. (In actuality, those skills barely exist beyond my ability to analyze, copy, and paste from StackOverflow.) If the project maintainer decides to pick up this PR and your PRs, I'll work on those suggestions. Otherwise, I'll just leave this here for others to know about.

For reasons I couldn't determine, adding --follow to `git log` did
incompatable things with `--grep` ... the git command returned NO
entries.  In other words:

  git log --follow --grep "^META" --invert-grep -- {file}

...didn't work.
@gjtorikian
Copy link
Owner

👋 Unfortunately, my GitHub notifications for this repository was oddly turned off. I take my responsibility to accepting patches seriously; however, I am just one person, with a very busy life off of GitHub.com! I'm going to close this PR because I like to keep my TODO list scoped and reasonable. This does not mean I will not accept this patch! Rather, it's a way of me asking you if you're still using this gem, and whether you want this PR merged. Just comment back and I'll prioritize it. I assume silence means I can keep it closed. Thanks!

this was an automated copy-paste

@gjtorikian gjtorikian closed this Jun 4, 2024
@dltj
Copy link
Author

dltj commented Jun 18, 2024

Hello! Would love to have this considered for inclusion in the main code. I'm still using it.

@gjtorikian gjtorikian reopened this Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants