GIT - Some questions.

Ask your support questions in here

Moderator: Moderator Team

Post Reply
oldman
Posts: 1179
Joined: Sun Dec 20, 2009 1:23 pm

GIT - Some questions.

Post by oldman »

(1)
This " dev-514-gc609406c2f " is from an installed version of ReactOS, it is part of what is now displayed in the corner of the desktop. Before the Git move it would have been something like r78094. So when making a report in JIRA, do we have to use all of the " dev-514-gc609406c2f ", or part of this, instead of the revision number as before?

(2)
This is the log of a Git update (pull) of my local source:

Code: Select all

git.exe pull --progress -v --no-rebase "origin"

POST git-upload-pack (gzip 1032 to 598 bytes)
remote: Counting objects: 113, done.
remote: Total 113 (delta 90), reused 90 (delta 90), pack-reused 23
Receiving objects: 100% (113/113), 25.36 KiB | 440.00 KiB/s, done.
Resolving deltas: 100% (91/91), completed with 27 local objects.
From https://github.com/reactos/reactos
75f1637f37..3cd76b91b5  master                  -> origin/master
= [up to date]            GSoC_2011/GdiFontDriver -> origin/GSoC_2011/GdiFontDriver
= [up to date]            GSoC_2011/NewExplorer   -> origin/GSoC_2011/NewExplorer
= [up to date]            GSoC_2011/ThemesSupport -> origin/GSoC_2011/ThemesSupport
= [up to date]            GSoC_2016/AHCI          -> origin/GSoC_2016/AHCI
= [up to date]            GSoC_2016/NTFS          -> origin/GSoC_2016/NTFS
= [up to date]            GSoC_2016/USB           -> origin/GSoC_2016/USB
= [up to date]            GSoC_2016/lwIP          -> origin/GSoC_2016/lwIP
= [up to date]            GSoC_2016/lwIP-tcpip    -> origin/GSoC_2016/lwIP-tcpip
= [up to date]            GSoC_2017/shellext      -> origin/GSoC_2017/shellext
= [up to date]            GSoC_2017/usbxhci       -> origin/GSoC_2017/usbxhci
= [up to date]            TransitionPte           -> origin/TransitionPte
= [up to date]            Tree-restructure-test   -> origin/Tree-restructure-test
= [up to date]            aicom-hardware-fun      -> origin/aicom-hardware-fun
= [up to date]            aicom-network-branch    -> origin/aicom-network-branch
= [up to date]            alex-network-branch     -> origin/alex-network-branch
= [up to date]            arty-newcc              -> origin/arty-newcc
= [up to date]            arwinss                 -> origin/arwinss
= [up to date]            condrv_restructure      -> origin/condrv_restructure
= [up to date]            dib_rewrite             -> origin/dib_rewrite
= [up to date]            iut-mmc                 -> origin/iut-mmc
= [up to date]            kd++                    -> origin/kd++
= [up to date]            kernel-fun              -> origin/kernel-fun
= [up to date]            monstera                -> origin/monstera
= [up to date]            network_stack           -> origin/network_stack
= [up to date]            nocc                    -> origin/nocc
= [up to date]            nslookup                -> origin/nslookup
= [up to date]            ntvdm                   -> origin/ntvdm
= [up to date]            olpc                    -> origin/olpc
368227036c..d91fb02884  readme-badges           -> origin/readme-badges
= [up to date]            setup_improvements      -> origin/setup_improvements
= [up to date]            sndblst                 -> origin/sndblst
= [up to date]            sspi-bringup            -> origin/sspi-bringup
= [up to date]            usb-experiments         -> origin/usb-experiments
Updating 75f1637f37..3cd76b91b5
Fast-forward
boot/freeldr/freeldr/arch/i386/pcmem.c    |  83 ++--
dll/win32/kernel32/client/file/disk.c     | 617 +++++++++++++++++++-----------
dll/win32/kernel32/client/file/mntpoint.c |   2 +-
dll/win32/kernel32/client/file/volume.c   |   2 +-
dll/win32/kernel32/include/kernel32.h     |  14 +
sdk/include/reactos/drivers/ntddrdsk.h    |  25 +-
win32ss/user/ntuser/desktop.c             |   1 +
7 files changed, 483 insertions(+), 261 deletions(-)
It looks as though it is down loading branches as well as any updates to the main source! I have locally, only got the main source, no branches in this source folder, so could anyone explain what the log shows? In other words, why does it show what looks like branches in the log?

I have cloned and updated from https://github.com/reactos/reactos.git

In Git the Remote is origin and the Remote Branch is master.

(3)
When you do a Git update (pull), how do you find what revision number it is at? SVN used to show it at the bottom of the log!


Could anyone enlighten me?

Thanks.
Please keep the Windows classic 9x/2000 look and feel.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
jimtabor
Developer
Posts: 229
Joined: Thu Sep 29, 2005 3:00 pm

Re: GIT - Some questions.

Post by jimtabor »

It will make regression testing loads of fun!

I think it's a large number,
https://github.com/reactos/reactos/comm ... 4c65dd6789

From diff mail list;
commit 31aab36e886a65c51dacdd7264615b4c65dd6789

Yeah....
middings
Posts: 1073
Joined: Tue May 07, 2013 9:18 pm
Location: California, USA

Re: GIT - Some questions.

Post by middings »

jimtabor wrote:It (using Git hash numbers) will make regression testing loads of fun!
There is a tool named bisect made just for Git. The bisect tool navigates a Git repository's branches for you. TortoiseGit provides some of bisect's basic features for Microsoft Windows users.
I think it's (Git's hash that identifies an individual commit is) a large number,
https://github.com/reactos/reactos/comm ... 4c65dd6789...
I thought there was a convention among Git users to only use the final eight or so characters of the hash, unless there is ambiguity. That is what Wine's developers do. The number of characters varies by the number of commits the project has. A small project might use eight. I suppose the ReactOS dev team will decide how many characters we must use as an abbreviation of the full hash.
ThFabba
Developer
Posts: 293
Joined: Sun Jul 11, 2010 11:39 am

Re: GIT - Some questions.

Post by ThFabba »

oldman wrote:(1)
This " dev-514-gc609406c2f " is from an installed version of ReactOS, it is part of what is now displayed in the corner of the desktop. Before the Git move it would have been something like r78094. So when making a report in JIRA, do we have to use all of the " dev-514-gc609406c2f ", or part of this, instead of the revision number as before?
"c609406c2f" is the revision hash part of that string. This is a shortened form of "c609406c2fa73ccabb3b21462ebef85f9a40762e", which uniquely identifies the commit.
"0.4.7-dev-514" (note that the version before "dev" is important here. After 0.4.7 is branched we'll start over with 0.4.8-dev-1) by itself should also be unique (unless we mess up something in the master branch) but is much less convenient to work with ("git rev-list --reverse 0.4.7-dev..| sed -n 514p" should give you the commit hash in this case). However this uniqueness will cease if you have additional commits locally. E.g. if you get 0.4.7-dev-514 from upstream, then commit something, it will also be 0.4.7-dev-515, much like the next upstream commit. However the hash will be different.
oldman wrote:(2)
This is the log of a Git update (pull) of my local source:

Code: Select all

git.exe pull --progress -v --no-rebase "origin"

POST git-upload-pack (gzip 1032 to 598 bytes)
remote: Counting objects: 113, done.
remote: Total 113 (delta 90), reused 90 (delta 90), pack-reused 23
Receiving objects: 100% (113/113), 25.36 KiB | 440.00 KiB/s, done.
Resolving deltas: 100% (91/91), completed with 27 local objects.
From https://github.com/reactos/reactos
75f1637f37..3cd76b91b5  master                  -> origin/master
= [up to date]            GSoC_2011/GdiFontDriver -> origin/GSoC_2011/GdiFontDriver
= [up to date]            GSoC_2011/NewExplorer   -> origin/GSoC_2011/NewExplorer
= [up to date]            GSoC_2011/ThemesSupport -> origin/GSoC_2011/ThemesSupport
= [up to date]            GSoC_2016/AHCI          -> origin/GSoC_2016/AHCI
= [up to date]            GSoC_2016/NTFS          -> origin/GSoC_2016/NTFS
= [up to date]            GSoC_2016/USB           -> origin/GSoC_2016/USB
= [up to date]            GSoC_2016/lwIP          -> origin/GSoC_2016/lwIP
= [up to date]            GSoC_2016/lwIP-tcpip    -> origin/GSoC_2016/lwIP-tcpip
= [up to date]            GSoC_2017/shellext      -> origin/GSoC_2017/shellext
= [up to date]            GSoC_2017/usbxhci       -> origin/GSoC_2017/usbxhci
= [up to date]            TransitionPte           -> origin/TransitionPte
= [up to date]            Tree-restructure-test   -> origin/Tree-restructure-test
= [up to date]            aicom-hardware-fun      -> origin/aicom-hardware-fun
= [up to date]            aicom-network-branch    -> origin/aicom-network-branch
= [up to date]            alex-network-branch     -> origin/alex-network-branch
= [up to date]            arty-newcc              -> origin/arty-newcc
= [up to date]            arwinss                 -> origin/arwinss
= [up to date]            condrv_restructure      -> origin/condrv_restructure
= [up to date]            dib_rewrite             -> origin/dib_rewrite
= [up to date]            iut-mmc                 -> origin/iut-mmc
= [up to date]            kd++                    -> origin/kd++
= [up to date]            kernel-fun              -> origin/kernel-fun
= [up to date]            monstera                -> origin/monstera
= [up to date]            network_stack           -> origin/network_stack
= [up to date]            nocc                    -> origin/nocc
= [up to date]            nslookup                -> origin/nslookup
= [up to date]            ntvdm                   -> origin/ntvdm
= [up to date]            olpc                    -> origin/olpc
368227036c..d91fb02884  readme-badges           -> origin/readme-badges
= [up to date]            setup_improvements      -> origin/setup_improvements
= [up to date]            sndblst                 -> origin/sndblst
= [up to date]            sspi-bringup            -> origin/sspi-bringup
= [up to date]            usb-experiments         -> origin/usb-experiments
Updating 75f1637f37..3cd76b91b5
Fast-forward
boot/freeldr/freeldr/arch/i386/pcmem.c    |  83 ++--
dll/win32/kernel32/client/file/disk.c     | 617 +++++++++++++++++++-----------
dll/win32/kernel32/client/file/mntpoint.c |   2 +-
dll/win32/kernel32/client/file/volume.c   |   2 +-
dll/win32/kernel32/include/kernel32.h     |  14 +
sdk/include/reactos/drivers/ntddrdsk.h    |  25 +-
win32ss/user/ntuser/desktop.c             |   1 +
7 files changed, 483 insertions(+), 261 deletions(-)
It looks as though it is down loading branches as well as any updates to the main source! I have locally, only got the main source, no branches in this source folder, so could anyone explain what the log shows? In other words, why does it show what looks like branches in the log?

I have cloned and updated from https://github.com/reactos/reactos.git

In Git the Remote is origin and the Remote Branch is master.
Yes. Fetching the repository contents will retrieve the whole history, including past and current branches. This will be in the .git folder (repository). You can switch your working copy (the "checked out" files outside .git) to an upstream branch without requiring a download using e.g. "git checkout nocc" (and back using "git checkout master").
oldman wrote:(3)
When you do a Git update (pull), how do you find what revision number it is at? SVN used to show it at the bottom of the log!


Could anyone enlighten me?

Thanks.
"git rev-parse HEAD" will give you the full commit hash
"git rev-parse --short HEAD" will give you the shortened version (making sure it's not so short that it stops being unique)
"git describe" will give you the string you see in the isos (TAG-N-gHASH).

And finally, I tend to use "git log -n1" (show the log for the last "1" commits) to figure out where I am, as that will give you the commit message as well.
middings
Posts: 1073
Joined: Tue May 07, 2013 9:18 pm
Location: California, USA

Re: GIT - Some questions.

Post by middings »

ThFabba wrote:"c609406c2f" is the revision hash part of that string. This is a shortened form of "c609406c2fa73ccabb3b21462ebef85f9a40762e", which uniquely identifies the commit.
Thank you for explaining this. I see that I was mistaken about the shortened form of Git hashes.
oldman
Posts: 1179
Joined: Sun Dec 20, 2009 1:23 pm

Re: GIT - Some questions.

Post by oldman »

I think what is required for a JIRA report, is in this format: 0.4.7-dev-532-g3cd76b91b5. It is all needed, from what ThFabba wrote, because of the possibility to have the same combination of letters and numbers, when they change to the 0.4.8-dev or higher.

If there was a
0.4.7-dev-532-g3cd46b99b5 which was shortened to g3cd46b99b5
and a
0.4.8-dev-532-g3cd46b99b5 which was shortened to g3cd46b99b5, it would be very confusing!

Please correct me if I am wrong.
Please keep the Windows classic 9x/2000 look and feel.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
hbelusca
Developer
Posts: 1204
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: GIT - Some questions.

Post by hbelusca »

You're correct, oldman!
middings
Posts: 1073
Joined: Tue May 07, 2013 9:18 pm
Location: California, USA

Re: GIT - Some questions.

Post by middings »

I suppose when one identifies the commit in a JIRA report, one should obtain the shortened version of the commit's hash using ThFabba's suggested "git rev-parse --short HEAD" command.

If I understand ThFabba's earlier remark and the documentation at https://git-scm.com/docs/git-rev-parse correctly, that command always returns a unique short hash. (However, that command does not guarantee the short hash's length. It will make the string it returns longer if that is necessary to guarantee the uniqueness of the result.)
oldman
Posts: 1179
Joined: Sun Dec 20, 2009 1:23 pm

Re: GIT - Some questions.

Post by oldman »

middings wrote:I suppose when one identifies the commit in a JIRA report, one should obtain the shortened version of the committ's hash using ThFabba's suggested "git rev-parse --short HEAD" command.

If I understand ThFabba's earlier remark and the documentation at https://git-scm.com/docs/git-rev-parse correctly, that command always returns a unique short hash. (However, that command does not guarantee the short hash's length. It will make the string it returns longer if that is necessary to guarantee the uniqueness of the result.)
Doing a right click on the reactos (source) folder and selecting Git Bash here and then type git describe at the command prompt, will give you the revision in this format 0.4.7-dev-532-g3cd76b91b5 or in Unix it would be, right clicking on the reactos (source) folder and selecting window - Terminal here, then type git describe at the command prompt for the same result. And that is what hbelusca agrees is the correct format that is required for a JIRA report.
Please keep the Windows classic 9x/2000 look and feel.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
oldman
Posts: 1179
Joined: Sun Dec 20, 2009 1:23 pm

Re: GIT - Some questions.

Post by oldman »

One of the reasons I started this topic, was to be able to give accurate information in my Layman's guide.

The following are the different ways that I found the revision number reported.

(1) The download page shows the revision number in this format: c609406

(2) The ISO is shown in this format: reactos-bootcd-0.4.7-dev-514-gc609406-x86-gcc-lin-dbg.7z

(3) On this https://iso.reactos.org/bootcd/ page, the GIT builds are listed as:

Code: Select all

reactos-bootcd-0.4.7-dev-514-gc609406c2f-x86-ms..>  04-Oct-2017 09:00            53212794
(4) The desktop of an installed revision, is in this format: Build 20171005-0.4.7-dev-514-gc609406c2f.GNU_4.7.2
(the first part will be the date that it was built (I compiled this) and the last part will be the compiler and it's version number).

So I would like some official clarification as to whether the following is correct!

Build 20171005-0.4.7-dev-514-gc609406c2f.GNU_4.7.2
reactos-bootcd-0.4.7-dev-514-gc609406-x86-gcc-lin-dbg.7z

Use the green part in a JIRA report or when asking for help here in the Forum, though the full string would be still okay here in the Forum.


Build 20171005-0.4.7-dev-514-gc609406c2f.GNU_4.7.2
reactos-bootcd-0.4.7-dev-514-gc609406-x86-gcc-lin-dbg.7z

Use the red part for searching for other revisions.

Using these two,
reactos-bootcd-0.4.7-dev-514-gc609406-x86-gcc-lin-dbg.7z
reactos-bootcd-0.4.7-dev-548-g71bffdc-x86-gcc-lin-dbg.7z
you would then use it like this c609406-71bffdc in the search input at https://www.reactos.org/getbuilds/ page.

As I have been writing this post I have convinced myself that the examples are correct! But confirmation from a developer, would be a bonus.

Edit:
I have been thinking more about this!
Build 20171005-0.4.7-dev-514-gc609406c2f.GNU_4.7.2
reactos-bootcd-0.4.7-dev-514-gc609406-x86-gcc-lin-dbg.7z

Use the red part for searching for other revisions.

Using these two,
reactos-bootcd-0.4.7-dev-514-gc609406-x86-gcc-lin-dbg.7z
reactos-bootcd-0.4.7-dev-548-g71bffdc-x86-gcc-lin-dbg.7z
you would then use it like this c609406-71bffdc in the search input at https://www.reactos.org/getbuilds/ page.
This is how you would go about getting the revisions between the two, but (as I have posted in another post) what happens when 0.4.7 changes to 0.4.8 and you get two 71bffdc, one reactos-bootcd-0.4.7-dev-548-g71bffdc-x86-gcc-lin-dbg.iso and another reactos-bootcd-0.4.8-dev-548-g71bffdc-x86-gcc-lin-dbg.iso?
Please keep the Windows classic 9x/2000 look and feel.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
justincase
Posts: 441
Joined: Sat Nov 15, 2008 4:13 pm

Re: GIT - Some questions.

Post by justincase »

oldman wrote:what happens when 0.4.7 changes to 0.4.8 and you get two 71bffdc, one reactos-bootcd-0.4.7-dev-548-g71bffdc-x86-gcc-lin-dbg.iso and another reactos-bootcd-0.4.8-dev-548-g71bffdc-x86-gcc-lin-dbg.iso?
If there is a reactos-bootcd-0.4.7-dev-584-g71bffdc-x86-gcc-lin-dbg.iso, then 71bffdc uniquely identified the commit that ISO was built from at the time it was built. If there was then a new commit created that started with 71bffdc, that string would no longer uniquely identify either commit, thus the string would get another character added to the end until it is unique again and that longer (and unique) string would be used instead for future builds.

P.S. I forget where I read it, but i remember someone who should know they're talking about saying that (unlike cvs, svn, etc.) "git" isn't an acronym or any other kind of short form meaning something longer, and thus it shouldn't be in all caps.
I reserve the right to ignore any portion of any post if I deem it not constructive or likely to cause the discussion to degenerate.
oldman
Posts: 1179
Joined: Sun Dec 20, 2009 1:23 pm

Re: GIT - Some questions.

Post by oldman »

justincase wrote:
P.S. I forget where I read it, but i remember someone who should know they're talking about saying that (unlike cvs, svn, etc.) "git" isn't an acronym or any other kind of short form meaning something longer, and thus it shouldn't be in all caps.
Just for the record. I normally write Git, but this topic title, is the only place that I have used GIT. But thanks for all the info.
Please keep the Windows classic 9x/2000 look and feel.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
oldman
Posts: 1179
Joined: Sun Dec 20, 2009 1:23 pm

Re: GIT - Some questions.

Post by oldman »

I have another question: Can git bisect be use on the source tree at reactos.git?

The reason I ask is, because of what it does to the tree whilst it is in use. I have put a warning in one of my Layman's guide sections, to "only use these git functions on your local source tree, because of what they do to the tree!". If it is impossible to use at reactos.git, then I can remove the warning.
Please keep the Windows classic 9x/2000 look and feel.
The layman's guides - debugging - bug reporting - compiling - ISO remaster.
They may help you with a problem, so do have a look at them.
User avatar
dizt3mp3r
Posts: 1874
Joined: Mon Jun 14, 2010 5:54 pm

Re: GIT - Some questions.

Post by dizt3mp3r »

oldman wrote:
justincase wrote:
P.S. I forget where I read it, but i remember someone who should know they're talking about saying that (unlike cvs, svn, etc.) "git" isn't an acronym or any other kind of short form meaning something longer, and thus it shouldn't be in all caps.
Just for the record. I normally write Git, but this topic title, is the only place that I have used GIT. But thanks for all the info.
Oldman - 'git' in English means a grumpy old man.
Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests