Skip to content
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
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

harry-hov
Copy link

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 unless log.usereffilter is set true.

Thanks,
Hariom

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>
@harry-hov
Copy link
Author

/preview

@gitgitgadget
Copy link

gitgitgadget bot commented Jun 15, 2020

Preview email sent as pull.658.git.1592218325.gitgitgadget@gmail.com

@harry-hov
Copy link
Author

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Jun 15, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant