forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 132
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
[GSoC][RFC] print commits using ref-filter's logic #658
Open
harry-hov
wants to merge
5
commits into
gitgitgadget:master
Choose a base branch
from
harry-hov:log-ref-filter
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a new boolean config variable "log.useRefFilter" for `log` command, allowing log to switch to use ref-filters logic. *experimental* Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Heba Waly <heba.waly@gmail.com> Signed-off-by: Hariom Verma <hariom18599@gmail.com>
Add a use_ref_filter flag in struct rev_info, to make it easier to manipulate behavior at certain places according to the newly added log.usereffilter config option. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Heba Waly <heba.waly@gmail.com> Signed-off-by: Hariom Verma <hariom18599@gmail.com>
In the quest of porting pretty formats to use ref-filters logic, user_format must need to interact with other functions too. So, to get user_format, introduced `const char *get_user_format()`. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Heba Waly <heba.waly@gmail.com> Signed-off-by: Hariom Verma <hariom18599@gmail.com>
We might always need a `\n` at end of line in the case of `git for-each-ref`. But as we intend to use ref-filter's logic in pretty, having an option to skip `\n` will be useful. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Heba Waly <heba.waly@gmail.com> Signed-off-by: Hariom Verma <hariom18599@gmail.com>
This change intends to use ref-filters logic to print commits. Add `ref_pretty_print_commit()` which might be a future possible replacement for `pretty_print_commit()`. This is an introductory commit. Some features of `git log` might not work. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Heba Waly <heba.waly@gmail.com> Signed-off-by: Hariom Verma <hariom18599@gmail.com>
354668e
to
a832704
Compare
/preview |
Preview email sent as pull.658.git.1592218325.gitgitgadget@gmail.com |
/submit |
Submitted as pull.658.git.1592218662.gitgitgadget@gmail.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a step toward reusing ref-filter formatting logic in pretty to have one unified interface to extract all needed data from the object and to print it properly.
In the process, I made few modifications. Although it doesn't impact the current flow of
git log
unlesslog.usereffilter
is set true.Thanks,
Hariom