Fórum

How to use GIT ID to find changes?

thumbnail
Brian Russell, modificado 9 Anos atrás.

How to use GIT ID to find changes?

Junior Member Postagens: 41 Data de Entrada: 31/10/11 Postagens Recentes
This may be a very simple and stupid question, but I've spent over an hour just trying to view the commit of a fix for a bug, and starting to really get frustrated. I've read everything I can about using Jira & Github, but I am still unable to find what I'm looking for.

For this issue: LPS-43420 I am trying to find the commit to the Portal master on Github, and I am unable. I see in the comment on the issue on 06/Feb/14 6:13 PM that the issue was fixed on "Tomcat 7.0.42 + MySQL 5.5.35. Portal master GIT ID: 0de16ed7a1b0aaef39daa865977067691a68f241."

So what do I do with that information?

I assumed this was the commit ID for the master branch of the liferay-portal repository on Github, which would lead me to believe that I can just go to https://github.com/liferay/liferay-portal/commit/0de16ed7a1b0aaef39daa865977067691a68f241 to view the changes. But the change there (seemingly) has nothing to do with the fix.

I've tried to filter or search by that ID or a date range, but I must be a complete novice, because, for the life of me, I cannot figure out where I should do that. I've forked the repository and cloned it locally to GitHub Mac, but the only thing I can see to do is meticulously scroll back in time through the history of commits. There has to be a better way, which I'm missing.

Thank you for any help anyone can provide!
thumbnail
David H Nebinger, modificado 9 Anos atrás.

RE: How to use GIT ID to find changes?

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
Well that's sometimes the problem w/ CE, the commits are cumulative. So the commit you're looking at is against all previous commits so the end result is that the bug gets fixed (closed/accepted) per that final commit.

Sometimes you can end up in situations where the commit actually does fix your problem but is dependent upon previous commits anyway, so you can't apply cuz you're missing something.

Can definitely be pretty frustrating... emoticon
thumbnail
Brian Russell, modificado 9 Anos atrás.

RE: How to use GIT ID to find changes?

Junior Member Postagens: 41 Data de Entrada: 31/10/11 Postagens Recentes
Thanks David! There's been times in the past where a link was included in the issue comment and I was able to at least get the file(s) that was changed for the issue fix, so that I could at least do a compare against my local version. But I understand some of the changes in a commit may rely on many previous commits. I was just hoping to be able to see what file was changed for the fix in the commit and instead seemed to be only getting to an unrelated commit, which lead me down the black hole of searching for commits and date ranges, etc.

Oh well, just wanted to make sure I wasn't missing something obvious!
thumbnail
Samuel Kong, modificado 9 Anos atrás.

RE: How to use GIT ID to find changes? (Resposta)

Liferay Legend Postagens: 1902 Data de Entrada: 10/03/08 Postagens Recentes
Hi Brian,

The comment you referenced is from the QA team, and it means that QA tested at this Git ID and the bug was fixed. So all you can tell is that the fix was added before this Git ID.

The Git ID that you want is https://github.com/liferay/liferay-portal/commit/e8ab55f3df0e5616698448f921be92072de9fcbc#diff-0
Oliver Bayer, modificado 9 Anos atrás.

RE: How to use GIT ID to find changes?

Liferay Master Postagens: 894 Data de Entrada: 18/02/09 Postagens Recentes
Hi Samuel,

for us developpers it would make life way easier if the appropriate commit url would be added to each jira ticket before closing it. I thought I've read somewhere (Liferay forum, blogs etc) that this is -at least- planned?? Am I wrong or is this not required for each jira ticket at the moment?

Oli
thumbnail
Juan Gonzalez, modificado 9 Anos atrás.

RE: How to use GIT ID to find changes? (Resposta)

Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
As Samuel said before, that git hash it the latest commit where that issue was tested and working/not working.

It's much easier than that, just use any of the git GUI (example: gitk) and use the LPS code for searching all the commits (LPS-XXX).
thumbnail
Brian Russell, modificado 9 Anos atrás.

RE: How to use GIT ID to find changes?

Junior Member Postagens: 41 Data de Entrada: 31/10/11 Postagens Recentes
Thanks guys! This was all very helpful information to allow me to better use Jira & Github to hunt down any fixes I might be able to apply to my CE deployment.

In case anyone is interested, for this particular issue which started it all, my solution was to just add web-content to the layout.friendly.url.keywords property in my portal-ext.properties file and left it at that.