This repository has been archived by the owner. It is now read-only.

File version and version number? #5

Closed
lennybacon opened this Issue Apr 19, 2012 · 8 comments

Comments

Projects
None yet
5 participants
@lennybacon

It would be quite usefull if the file version and version number on the git.exe would be set.

@kusma

This comment has been minimized.

Show comment
Hide comment
@kusma

kusma Apr 19, 2012

Member

Patches welcome.

Member

kusma commented Apr 19, 2012

Patches welcome.

@patthoyts

This comment has been minimized.

Show comment
Hide comment
@patthoyts

patthoyts Apr 19, 2012

Member

Why exactly? You can obtain this using 'git version' - arguably that's more accessible that locating the .exe and looking for the values in the properties tab. Not that this is especially tricky to do - we just have to generate a .rc file with the resource section and link that into the git.exe. I'm unconvinced it is much use to anyone though.

Member

patthoyts commented Apr 19, 2012

Why exactly? You can obtain this using 'git version' - arguably that's more accessible that locating the .exe and looking for the values in the properties tab. Not that this is especially tricky to do - we just have to generate a .rc file with the resource section and link that into the git.exe. I'm unconvinced it is much use to anyone though.

@lennybacon

This comment has been minimized.

Show comment
Hide comment
@lennybacon

lennybacon Apr 19, 2012

@patthoyts: Yeah but to get the version you need to run it. From an operations perspective a file version would make sense.

I forked git and created a rc file. As you said to increase the version number this must be generated in build process. I found GIT-VERSION-GEN which is called quite on to in the makefile. I'm not so fluent on the bash

@patthoyts: Yeah but to get the version you need to run it. From an operations perspective a file version would make sense.

I forked git and created a rc file. As you said to increase the version number this must be generated in build process. I found GIT-VERSION-GEN which is called quite on to in the makefile. I'm not so fluent on the bash

@dscho

This comment has been minimized.

Show comment
Hide comment
@dscho

dscho Apr 19, 2012

Member

It is not so much bash as Makefile syntax. And I think that the following steps are needed in addition to the file you added (I am looking at lennybacon/git@77b89dd):

  • Add the object file to the BUILTIN_OBJS for Windows and MINGW32 (you probably need to rename the file, as git.o is already the object file of git.c)
  • Compile the .rc file (you might want to imitate the rule for common-commands.h in the Makefile, lines 1930--1931 and call windres to do the job)
  • Define the version on the windres command line with -DGIT_VERSION='"$(GIT_VERSION)"' and then use GIT_VERSION in the .rc file rather than the hard-coded "1.7.10"
Member

dscho commented Apr 19, 2012

It is not so much bash as Makefile syntax. And I think that the following steps are needed in addition to the file you added (I am looking at lennybacon/git@77b89dd):

  • Add the object file to the BUILTIN_OBJS for Windows and MINGW32 (you probably need to rename the file, as git.o is already the object file of git.c)
  • Compile the .rc file (you might want to imitate the rule for common-commands.h in the Makefile, lines 1930--1931 and call windres to do the job)
  • Define the version on the windres command line with -DGIT_VERSION='"$(GIT_VERSION)"' and then use GIT_VERSION in the .rc file rather than the hard-coded "1.7.10"
@lennybacon

This comment has been minimized.

Show comment
Hide comment
@lennybacon

lennybacon Apr 19, 2012

  • Generate git.rc
  • run windres my.rc -O coff -o my.res**
  • run g++ -o my_app obj1.o obj2.o my.res
    all called from makefile.
    @dscho: Whats your point with the git.o
  • Generate git.rc
  • run windres my.rc -O coff -o my.res**
  • run g++ -o my_app obj1.o obj2.o my.res
    all called from makefile.
    @dscho: Whats your point with the git.o
@dscho

This comment has been minimized.

Show comment
Hide comment
@dscho

dscho Apr 19, 2012

Member

If you run windres my.rc it will complain that there is no my.rc. You named it git.rc. But that suggests that it will be compiled to git.o. But that is already what git.c is compiled to.

Oh, and let's not use g++. Let's use gcc as before.

Member

dscho commented Apr 19, 2012

If you run windres my.rc it will complain that there is no my.rc. You named it git.rc. But that suggests that it will be compiled to git.o. But that is already what git.c is compiled to.

Oh, and let's not use g++. Let's use gcc as before.

@hvoigt

This comment has been minimized.

Show comment
Hide comment
@hvoigt

hvoigt May 22, 2012

Member

@lennybacon since there has not been any update since a month: Do you want to work on this? If not I will label this as an issue that will not be fixed until we find a volunteer who wants to work on this.

About the naming: the file could be called resource.rc without clashes to existing objects AFAIK.

Member

hvoigt commented May 22, 2012

@lennybacon since there has not been any update since a month: Do you want to work on this? If not I will label this as an issue that will not be fixed until we find a volunteer who wants to work on this.

About the naming: the file could be called resource.rc without clashes to existing objects AFAIK.

@dscho

This comment has been minimized.

Show comment
Hide comment
@dscho

dscho May 22, 2012

Member

@hvoigt @lennybacon I think the formulation "until we find a volunteer who wants to work on this" is not quite right, but "until somebody volunteers to work on this" is.

Member

dscho commented May 22, 2012

@hvoigt @lennybacon I think the formulation "until we find a volunteer who wants to work on this" is not quite right, but "until somebody volunteers to work on this" is.

patthoyts added a commit that referenced this issue May 22, 2012

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

@ghost ghost assigned patthoyts May 23, 2012

patthoyts added a commit that referenced this issue May 24, 2012

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

@patthoyts patthoyts closed this May 24, 2012

patthoyts added a commit that referenced this issue May 29, 2012

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue Jun 5, 2012

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue Jun 20, 2012

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue Oct 2, 2012

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue Oct 23, 2012

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue Dec 3, 2012

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue Jan 4, 2013

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue Jan 16, 2013

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue Feb 1, 2013

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue May 26, 2013

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue May 29, 2013

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

patthoyts added a commit that referenced this issue Jun 7, 2013

Provide a Windows version resource for the git executables.
Embeds the git version and description into the git executable thus
implementing the request in issue #5.

Acked-by: Heiko Voigt <hvoigt@hvoigt.net>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

t-b pushed a commit to t-b/git that referenced this issue Oct 6, 2014

t-b added a commit to t-b/git that referenced this issue Oct 13, 2014

t-b added a commit to t-b/git that referenced this issue Nov 27, 2014

PhilipOakley pushed a commit to PhilipOakley/git that referenced this issue Jan 4, 2015

t9001: style modernisation phase #5
Two general shell script codingstyles around here-text.

 - Quote the <<\END_OF_HERE_TEXT string when there is no parameter
   substitution going on to reduce cognitive load of the reader.

 - Indent the text with <<-\END_OF_HERE_TEXT when able to make it
   easier to spot boundaries of the tests.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

PhilipOakley pushed a commit to PhilipOakley/git that referenced this issue Jan 4, 2015

Merge branch 'jc/t9001-modernise'
* jc/t9001-modernise:
  t9001: style modernisation phase #5
  t9001: style modernisation phase #4
  t9001: style modernisation phase #3
  t9001: style modernisation phase #2
  t9001: style modernisation phase #1

PhilipOakley pushed a commit to PhilipOakley/git that referenced this issue Jan 4, 2015

Merge branch 'jc/t9001-modernise' into next
* jc/t9001-modernise:
  t9001: style modernisation phase #5
  t9001: style modernisation phase #4
  t9001: style modernisation phase #3
  t9001: style modernisation phase #2
  t9001: style modernisation phase #1

t-b pushed a commit to t-b/git that referenced this issue May 5, 2015

Post 2.3 cyle (batch #5)
Signed-off-by: Junio C Hamano <gitster@pobox.com>

PhilipOakley pushed a commit to PhilipOakley/git that referenced this issue Nov 14, 2016

git-commit.txt: clarify --patch mode with pathspec
How pathspec is used, with and without --interactive/--patch, is
different. But this is not clear from the document. These changes hint
the user to keep reading (to option #5) instead of stopping at #2 and
assuming --patch/--interactive behaves the same way.

And since all the options listed here always mention how the index is
involved (or not) in the final commit, add that bit for #5 as well. This
"on top of the index" is implied when you head over git-add(1), but if
you just go straight to the "Interactive mode" and not read what git-add
is for, you may miss it.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.