Forum > Lazarus

We are now using GIT

<< < (15/15)

prof7bit:

--- Quote from: Martin_fr on October 07, 2021, 05:22:11 pm ---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        =^ 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

--- End quote ---

Edit: Ignore the next sentence, I just put my glasses on and noticed the symbol that indicates the merge.

Are you sure? I would expect it to output 6 in both cases.

First parent is for constellations where a side branch was merged back INTO the current branch, for example a merge request was merged into main. In that case first-parent would ignore everything on the side branch and follow only the branch it was merged INTO, in this case the main branch.

If you place tags on strategic places you can get pretty descriptive output from git describe. And if I see this correctly then the Lazarus devs have placed tags at the beginnings of (important) branches exactly for that purpose.

In your example if you place a tag called "feature_foo" on M1 to indicate that here you branched for the new foo feature and call git describe on M2 it would print "feature_foo-1-gM2".

If you then merge it back into the upper branch and use --first-parent then it would ignore that tag, even if it is much closer than "main-2_3".

Edit2: I keep writing "label" when I really mean "tag", I don't know what causes this even after 5 years of using git.

Martin_fr:
Well, yes. first parent may have some advantages.
Need to see, if that should be changed.

And in case, if all the scripts could be updated in time.
tools/installer/* contain scripts, duplicating svn2revisioninc.


Navigation

[0] Message Index

[*] Previous page

Go to full version