author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 8 May 2007 03:35:48 +0000 (23:35 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 8 May 2007 03:35:48 +0000 (23:35 -0400) | ||
commit | f522c9b5ed367172f969397589ae3d686b867ac0 | |
tree | 61315e92a1cf8f5edb67181a4e22a724195babeb | tree | snapshot |
parent | c6a5e4030320c934bca70471d04aa9e7d8e2cd67 | commit | diff |
git-gui: Refactor into multiple files to save my sanity
I'm finding it difficult to work with a 6,000+ line Tcl script
and not go insane while looking for a particular block of code.
Since most of the program is organized into different units of
functionality and not all users will need all units immediately
on startup we can improve things by splitting procs out into
multiple files and let auto_load handle things for us.
This should help not only to better organize the source, but
it may also improve startup times for some users as the Tcl
parser does not need to read as much script before it can show
the UI. In many cases the user can avoid reading at least half
of git-gui now.
Unfortunately we now need a library directory in our runtime
location. This is currently assumed to be $(sharedir)/git-gui/lib
and its expected that the Makefile invoker will setup some sort of
reasonable sharedir value for us, or let us assume its going to be
$(gitexecdir)/../share.
We now also require a tclsh (in TCL_PATH) to just run the Makefile,
as we use tclsh to generate the tclIndex for our lib directory. I'm
hoping this is not an unncessary burden on end-users who are building
from source.
I haven't really made any functionality changes here, this is just a
huge migration of code from one file to many smaller files. All of
the new changes are to setup the library path and install the library
files.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
I'm finding it difficult to work with a 6,000+ line Tcl script
and not go insane while looking for a particular block of code.
Since most of the program is organized into different units of
functionality and not all users will need all units immediately
on startup we can improve things by splitting procs out into
multiple files and let auto_load handle things for us.
This should help not only to better organize the source, but
it may also improve startup times for some users as the Tcl
parser does not need to read as much script before it can show
the UI. In many cases the user can avoid reading at least half
of git-gui now.
Unfortunately we now need a library directory in our runtime
location. This is currently assumed to be $(sharedir)/git-gui/lib
and its expected that the Makefile invoker will setup some sort of
reasonable sharedir value for us, or let us assume its going to be
$(gitexecdir)/../share.
We now also require a tclsh (in TCL_PATH) to just run the Makefile,
as we use tclsh to generate the tclIndex for our lib directory. I'm
hoping this is not an unncessary burden on end-users who are building
from source.
I haven't really made any functionality changes here, this is just a
huge migration of code from one file to many smaller files. All of
the new changes are to setup the library path and install the library
files.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 files changed:
.gitignore | diff | blob | history | |
Makefile | diff | blob | history | |
git-gui.sh | diff | blob | history | |
lib/blame.tcl | [new file with mode: 0644] | blob |
lib/branch.tcl | [new file with mode: 0644] | blob |
lib/browser.tcl | [new file with mode: 0644] | blob |
lib/commit.tcl | [new file with mode: 0644] | blob |
lib/console.tcl | [new file with mode: 0644] | blob |
lib/database.tcl | [new file with mode: 0644] | blob |
lib/diff.tcl | [new file with mode: 0644] | blob |
lib/error.tcl | [new file with mode: 0644] | blob |
lib/index.tcl | [new file with mode: 0644] | blob |
lib/merge.tcl | [new file with mode: 0644] | blob |
lib/option.tcl | [new file with mode: 0644] | blob |
lib/remote.tcl | [new file with mode: 0644] | blob |
lib/shortcut.tcl | [new file with mode: 0644] | blob |
lib/transport.tcl | [new file with mode: 0644] | blob |