git-gui: Ensure version number is always current.

I'm stealing the exact logic used by core Git within its own Makefile to
setup the version number within scripts and executables.  This way we
can be sure that the version number is always updated after a commit,
and that the version number also reflects when it is coming from a dirty
working directory (and is thus pretty worthless).

I've cleaned up some of the version display code in the about dialog too.
There were simply too many blank lines in the bottom section where we
showed the version data.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce
2007-01-20 20:31:09 -05:00
parent 0499b24ad6
commit f1cee4e6d1
4 changed files with 63 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA}
set appvers {@@GITGUI_VERSION@@}
set appvers {@@GIT_VERSION@@}
set appname [lindex [file split $argv0] end]
set gitdir {}
@@ -2543,8 +2543,9 @@ $copyright" \
pack $w.desc -side top -fill x -padx 5 -pady 5
set v {}
append v "$appname version $appvers\n\n"
append v "[exec git --version]\n\n"
append v "$appname version $appvers\n"
append v "[exec git version]\n"
append v "\n"
if {$tcl_patchLevel eq $tk_patchLevel} {
append v "Tcl/Tk version $tcl_patchLevel"
} else {