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

git history ignores merge commits #1167

Closed
tulinkry opened this issue Aug 18, 2016 · 4 comments
Closed

git history ignores merge commits #1167

tulinkry opened this issue Aug 18, 2016 · 4 comments
Labels

Comments

@tulinkry
Copy link
Contributor

tulinkry commented Aug 18, 2016

Git history ignores the merge commits for particular files. When the merge commit did an actual change to the code then there is an inconsistent view on the file - file contains the correct current version but it's not visible which commit did the current version.

An example is file src/org/opensolaris/opengrok/analysis/c/CXref.lex in the OpenGrok.
The xref contains current:

120 <SCOMMENT> {
121 {WhiteSpace}*{EOL}      {
122     out.write(yytext());
123     yypop();
124     startNewLine();}
125 }

However according to the last history the content should be this:

119 <SCOMMENT> {
120 {WhiteSpace}*{EOL}      { yybegin(YYINITIAL); out.write("</span>");
121                  startNewLine();}
122 }

Merge commits are present in the git log command however they contain empty file list. Therefore they are not assigned to particular files and not displayed in the app.

Is there any intention in this?

@vladak
Copy link
Member

vladak commented Oct 6, 2016

Until git log can somehow display the filenames for merge commits, there is probably not much we can do about this.

@tulinkry
Copy link
Contributor Author

Switches -c --cc kinda solves this for me, at least it seems like that.

@vladak
Copy link
Member

vladak commented Oct 11, 2016

Looks like -c -cc is for git diff only ?

@tulinkry
Copy link
Contributor Author

Closed by #3167

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

No branches or pull requests

2 participants