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

Hope to support more parameter of git log #999

Open
GrandZhuo opened this issue Mar 25, 2020 · 3 comments
Open

Hope to support more parameter of git log #999

GrandZhuo opened this issue Mar 25, 2020 · 3 comments

Comments

@GrandZhuo
Copy link

Avid fan of tig!!!

I want to use tig to compare different branches. For example, tig master..dev tig master ^dev tig master...dev, they all work well.

But when I use some parameter of git log, it doesn't work as expected. For example, tig --left-right master...dev, the prefix is allways '>', which is not correct.

Also, I found that --cherry-markand--cherry-pickdo not work too. These parameters are very usefull when compare branches.

Would you consider supporting these parameters? Or is there any other solution to my problem?

git version 2.25.1
tig version 2.5.0
ncurses version 5.7.20081102
readline version 8.0

@GrandZhuo
Copy link
Author

I found that I can use git log --left-right --cherry-pick --pretty=raw master...dev | tig --pretty=raw to compare two branches, and the --cherry-pick parameter works well however --left-right still doesn't work.

@matthijskooijman
Copy link

I've also run into this for -G and -S.

I wonder, why not just pass through all options to git log Or alternatively, have a command which does so? I thought that maybe tig log is exactly this, but e.g. tig log -S foo shows no output, while git log -S foo does, so that does not seem to be what git log is for.

@matthijskooijman
Copy link

matthijskooijman commented Sep 29, 2020

Wait, scratch my comment, that's a different problem. Seems I should specify -Sfoo rather than -S foo, since in the latter case, foo is interpreted as a revision rather than an option. I filed #1040 about improving this.

The options you name, --left-right and --cherry-mark do not really influence which commits git log returns, only how they are displayed. Normally, tig runs git log to decide which commits to show and once you "open" a commit to show details, it runs git show to show it.

It seems that tig is smart enough to also pass --left-right to git show in this case, but that doesn't help, since left/right has no real meaning for a single commit, only relative to other commits.

I would expect --cherry-pick to work, since it omits commits from the output, but I haven't got a good testsetup to test here.

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

No branches or pull requests

2 participants