Forum > Lazarus

We are now using GIT

<< < (14/15) > >>

dsiders:

--- Quote from: Martin_fr on September 04, 2021, 10:15:32 pm ---@Dsiders: While you did not put it as a question, I add some more answer anyway (not reaching 100+ though):
...
 does not work if there was a conflict, or if the merge for some other reason was modified.

--- End quote ---

Thank you @Martin_fr. I'll add some of these to my cheat sheet.

prof7bit:

--- Quote from: Martin_fr on September 04, 2021, 02:57:04 pm ---From my "main" build:

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Lazarus 2.3.0 rmain-2_3-306-gbbe0b81f62 FPC 3.2.0 x86_64-win64-win32/win64
That is "git desclibe"

306 commits since the tag main-2_3 on commit bbe0b81f62

The 306 is not always "exact". In case of branches (within main) it could be on either side. After a merge it counts both sides.

--- End quote ---

If git describe is called with
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} -----first-parent then it will not search along merge branches.

The output of git describe is a "commit-ish", that is it can be used to specify a revision in any of the commands that expect a hash, a tag, a branch name, it can be checked out, reverted or or cherry-picked or anything else you can do with a commit.

prof7bit:

--- Quote from: MarkMLl on September 04, 2021, 08:56:05 pm ---
--- Quote from: dsiders on September 04, 2021, 08:50:38 pm ---That'll show a result in main, and no result in fixes_2_2.

YMMV.

--- End quote ---
But I'm not asking about the repository, I'm asking about the IDE.

--- End quote ---
For this to work the compiled IDE would need to have the entire git log compiled into it, that would currently be 61115 entries in the main branch as of today.

Martin_fr:

--- Quote from: prof7bit on October 07, 2021, 04:28:59 pm ---
--- Quote from: Martin_fr on September 04, 2021, 02:57:04 pm ---From my "main" build:

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Lazarus 2.3.0 rmain-2_3-306-gbbe0b81f62 FPC 3.2.0 x86_64-win64-win32/win64
That is "git desclibe"

306 commits since the tag main-2_3 on commit bbe0b81f62

The 306 is not always "exact". In case of branches (within main) it could be on either side. After a merge it counts both sides.

--- End quote ---

If git describe is called with
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} -----first-parent then it will not search along merge branches.

--- End quote ---

Yes, but the "306" is still not "exact" => as in: you can recompute the commit from the 306.

The 306 is in both cases "exact" as in reproducible.

If I have commits on main as follows:
--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---main-2_3 => C1 => C2 => C3 => C4=> M => C5               \> M1 => M2        =^ Then with or without first-parent:
- if I am on C2 I get: main-2_3-  2  -gC2
- if I am on M2 I get: main-2_3-  2  -gM2
In both cases, I am 2 commits after the tag.

However if I am on C5 then first-parent makes a diff
- with first-parent: main-2_3-  6  -gC5
- without first-parent: main-2_3-  8  -gC5

Both is correct, as long as you know which setting was used.

Neither contains any info if a reference to
  main-2_3-123-gxxxxx
is on the official repo,
or an un-merged branch on a fork.

Martin_fr:

--- Quote from: prof7bit on October 07, 2021, 04:34:27 pm ---For this to work the compiled IDE would need to have the entire git log compiled into it, that would currently be 61115 entries in the main branch as of today.

--- End quote ---
I had to look it up the original question was

--- Quote from: MarkMLl on September 04, 2021, 03:08:12 pm ---OK, but it's not possible to find out from the IDE whether a particular patch etc. has been applied?

--- End quote ---

And I said before

--- Quote from: Martin_fr on September 04, 2021, 04:28:00 pm ---No, but it wasn't before.

Say you knew a patch was applied in svn 55123 and the IDE was at 55500, then you still had to check that 55123 was on the same svn branch (fixes or trunk) as the IDE build on 55500.

--- End quote ---

So the revision info in the IDE dialog has at no point in time (with the exception before the first fixes branch in svn was created) given any info about a particular fix/patch being included or not.


Mind that I have seen examples where fixes/patches were first committed to the fixes branch, and then merged to main.
While I am not aware of any "fix being forgotten to be merged to main", that could happen, and therefore even in svn, if you were on a higher revision than that of the fix, you might not have the fix at all.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version