Recent

Author Topic: Lazarus trunk About git hash useful?  (Read 6140 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Lazarus trunk About git hash useful?
« on: July 25, 2021, 03:29:12 am »
Is this git hash shown in the Lazarus About dialog useful? See pic.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus trunk About git hash useful?
« Reply #1 on: July 25, 2021, 03:35:08 am »
please file a bug report. It is no longer a "SVN revision"

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Lazarus trunk About git hash useful?
« Reply #2 on: July 25, 2021, 03:41:57 am »
I know ;-)

The bigger question is "Is it useful?" because if not, the whole line could be removed.

I will file a bug report (when the new system is up and running) once I have all the information.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: Lazarus trunk About git hash useful?
« Reply #3 on: July 25, 2021, 04:16:37 am »
Is this git hash shown in the Lazarus About dialog useful? See pic.

please file a bug report. It is no longer a "SVN revision"

I know ;-)

The bigger question is "Is it useful?" because if not, the whole line could be removed.

I will file a bug report (when the new system is up and running) once I have all the information.

We could change it to a new kind of build number such as Firebird does on Github:

Does this mean that it will no longer be possible to refer to a particular stage of trunk development as "revision such-and-such", and to step forwards and backwards from that point using a contiguous sequence of revision numbers?

MarkMLl
We could use Firebird's build number schema via CI/CD [Continuous Integration and Continuous Delivery]:
https://github.com/FirebirdSQL/firebird/branches
https://github.com/FirebirdSQL/firebird/commits/master
increment build number [via CI/CD]:
https://github.com/FirebirdSQL/firebird/commit/6bf7834d30a28d0624bc12c0a28692c7724f99ca

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: Lazarus trunk About git hash useful?
« Reply #4 on: July 25, 2021, 04:53:55 am »
The bigger question is "Is it useful?" because if not, the whole line could be removed.

It serves the exact same purpose as the SVN revision number. If you want to know what you built against, it is useful.

In fact, I'd say it needs to move up directly below the version number.

Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Lazarus trunk About git hash useful?
« Reply #5 on: July 25, 2021, 06:51:47 am »
The bigger question is "Is it useful?" because if not, the whole line could be removed.

It serves the exact same purpose as the SVN revision number. If you want to know what you built against, it is useful.

I was told that each git repo has different hashes - so how useful is it?

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: Lazarus trunk About git hash useful?
« Reply #6 on: July 25, 2021, 07:42:03 am »
The bigger question is "Is it useful?" because if not, the whole line could be removed.

It serves the exact same purpose as the SVN revision number. If you want to know what you built against, it is useful.

I was told that each git repo has different hashes - so how useful is it?

It is useful because that hash is not going to represent your commit (or mine). It should be the hash for the annotated tag representing a snapshot at a moment in time (like a tag, branch, build or release.). What remains to be seen is whether it is used that way. Git is pretty free-form...
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Lazarus trunk About git hash useful?
« Reply #7 on: July 25, 2021, 08:17:19 am »
IMHO the bigger problem git hashes have is that they don't give a "time-sense" like SVN revision number do. You can know at a glance neither whether $12345678 was commited before or after $87654321 or how much "distance" is between them, as you can with rev.25467 vs. rev.28954

Perhaps a build number (or similar) like Firebird's one, as sugested above, would be really helpful; more so since (I guess) most of us are more used to svn revisions than git hashes.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: Lazarus trunk About git hash useful?
« Reply #8 on: July 25, 2021, 09:38:05 am »
IMHO the bigger problem git hashes have is that they don't give a "time-sense" like SVN revision number do. You can know at a glance neither whether $12345678 was commited before or after $87654321 or how much "distance" is between them, as you can with rev.25467 vs. rev.28954

I can't (and won't) argue that the Git way is better... only different. All the information is in the log though. The gripe I have with Git is all of the damned command line switches. :)
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
Re: Lazarus trunk About git hash useful?
« Reply #9 on: July 25, 2021, 10:12:07 am »
It is useful because that hash is not going to represent your commit (or mine). It should be the hash for the annotated tag representing a snapshot at a moment in time (like a tag, branch, build or release.). What remains to be seen is whether it is used that way. Git is pretty free-form...

But that reduces it to official builds. Note that SVN rev was also not perfect (e.g. it did not denote branch). Still I miss it.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4458
  • I like bugs.
Re: Lazarus trunk About git hash useful?
« Reply #10 on: July 25, 2021, 10:14:01 am »
I was told that each git repo has different hashes - so how useful is it?
No, the revisions in the Gitlab master branch will have unique hash IDs and they persist in all local cloned copies.
The hash ID is useful but it needs a date after it IMO. The ID + date gives more information than a SVN revision number alone.
I don't know what idea Martin and others have about this.

Other mirrors or copies of the repository may have different hash IDs depending on how they were created.
For example I have used a local Git repo through git-svn link until now. It has very different IDs than the Lazarus mirror repositories in Github.
Any small change in some metadata or a commit message or anything changes the ID of that commit and every commit after it.
That is why we must not change the master branch history in any way.
Feature branches which will later be merged, can be rebased or otherwise modified if all people involved in its development agree.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus trunk About git hash useful?
« Reply #11 on: July 25, 2021, 11:02:04 am »
It should be a  git describe.

But it does not fit well into the current space.

So: the label needs to change, and it needs a new line.

But it should be kept


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus trunk About git hash useful?
« Reply #12 on: July 25, 2021, 11:09:42 am »
I was told that each git repo has different hashes - so how useful is it?

The unofficial svn to git mirrors from Graeme and me have diff hashes. Because they are entirely different project, both created from scratch.

In future, there only is our repro, every mirror (fork) and clone has the same hashes.


The hash ID is useful but it needs a date after it IMO. The ID + date gives more information than a SVN revision number alone.
Wont do much good.

Say I check out to a commit from January, and create a branch and make one commit (local). The the date of that commit is today. But the trunk is not.
Even if I searched the remote branch, from which the local branch stems, that remote branch may be a clone of a clone. And the intermediate clone could have local commits.


The git describe will not show if there is such a local branch. But unless people add annotated tags to mimic ours, the describe gives you a distance to the tag.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus trunk About git hash useful?
« Reply #13 on: July 25, 2021, 10:49:14 pm »
It serves the exact same purpose as the SVN revision number. If you want to know what you built against, it is useful.
due to the nature of git (with its rebasing), the a hash number can potentially be lost with out a trace.
The possibility of such thing to happen is definitely depends on the workflows used by a team.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9754
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus trunk About git hash useful?
« Reply #14 on: July 25, 2021, 11:06:01 pm »
It serves the exact same purpose as the SVN revision number. If you want to know what you built against, it is useful.
due to the nature of git (with its rebasing), the a hash number can potentially be lost with out a trace.
The possibility of such thing to happen is definitely depends on the workflows used by a team.

True. All branches in the official repro are going to be protected against that.
However, forks are to each fork owners taste.

Since most people will probably get the original, or an official mirror, the hash should be useful.


 

TinyPortal © 2005-2018