Code

tig.git
18 years agoMinor tidyup
Jonas Fonseca [Thu, 1 Jun 2006 02:05:02 +0000 (04:05 +0200)]
Minor tidyup

18 years agoGeneralize the option parsing
Jonas Fonseca [Thu, 1 Jun 2006 01:36:35 +0000 (03:36 +0200)]
Generalize the option parsing

18 years agoMove tig(1) material to tig.1.txt
Jonas Fonseca [Thu, 1 Jun 2006 00:16:16 +0000 (02:16 +0200)]
Move tig(1) material to tig.1.txt

18 years agoCorrect error checking
Jonas Fonseca [Wed, 31 May 2006 23:41:52 +0000 (01:41 +0200)]
Correct error checking

Fixes: cc2d13642a837163fb0e35d87a51ff96b7bf3cb0
18 years agoRemove prev arg to view->ops->read()
Jonas Fonseca [Wed, 31 May 2006 23:37:30 +0000 (01:37 +0200)]
Remove prev arg to view->ops->read()

18 years agoWrap all snprintf usage to simplify error handling
Jonas Fonseca [Wed, 31 May 2006 21:16:38 +0000 (23:16 +0200)]
Wrap all snprintf usage to simplify error handling

18 years agoAdd support for showing tags and other repo refs in the diff and log view
Jonas Fonseca [Wed, 31 May 2006 20:47:46 +0000 (22:47 +0200)]
Add support for showing tags and other repo refs in the diff and log view

18 years agoRefactor view->line reallocation
Jonas Fonseca [Wed, 31 May 2006 20:14:34 +0000 (22:14 +0200)]
Refactor view->line reallocation

18 years agoMake 'h' and '?' show built-in key binding quick reference
Jonas Fonseca [Wed, 31 May 2006 19:07:13 +0000 (21:07 +0200)]
Make 'h' and '?' show built-in key binding quick reference

18 years agoRename documentation build rules using s/docs/doc/; more like git
Jonas Fonseca [Tue, 30 May 2006 23:04:36 +0000 (01:04 +0200)]
Rename documentation build rules using s/docs/doc/; more like git

18 years agoAdd COPYING file
Jonas Fonseca [Tue, 30 May 2006 13:23:19 +0000 (15:23 +0200)]
Add COPYING file

18 years agoFix segfault where current_view would become >= sizeof(display)
Jonas Fonseca [Mon, 29 May 2006 21:29:38 +0000 (23:29 +0200)]
Fix segfault where current_view would become >= sizeof(display)

Hard code current_view indexes for split screen setup.

Reported-by: Dennis (dst_) on #git
18 years agoRemove SITES title so it is more adaptive to where it is included
Jonas Fonseca [Mon, 29 May 2006 19:37:24 +0000 (21:37 +0200)]
Remove SITES title so it is more adaptive to where it is included

18 years agoSplit out manual material to separate file
Jonas Fonseca [Mon, 29 May 2006 19:36:57 +0000 (21:36 +0200)]
Split out manual material to separate file

18 years agoList SITES in tig(1)
Jonas Fonseca [Mon, 29 May 2006 01:27:36 +0000 (03:27 +0200)]
List SITES in tig(1)

18 years agoMove stuff to SITES and INSTALL files
Jonas Fonseca [Mon, 29 May 2006 01:25:43 +0000 (03:25 +0200)]
Move stuff to SITES and INSTALL files

18 years agoMove stuff to BUGS and TODO files; only show BUGS in tig(1)
Jonas Fonseca [Mon, 29 May 2006 01:19:16 +0000 (03:19 +0200)]
Move stuff to BUGS and TODO files; only show BUGS in tig(1)

18 years agoMove ~/.tigrc documentation into it's own man page, tigrc(5)
Jonas Fonseca [Mon, 29 May 2006 01:15:20 +0000 (03:15 +0200)]
Move ~/.tigrc documentation into it's own man page, tigrc(5)

18 years agoUse ~/.tigrc for user configuration rather than ~/.tig
Jonas Fonseca [Mon, 29 May 2006 01:01:27 +0000 (03:01 +0200)]
Use ~/.tigrc for user configuration rather than ~/.tig

18 years agoAdd TODO about keybinding cheat sheet
Jonas Fonseca [Sun, 28 May 2006 21:51:48 +0000 (23:51 +0200)]
Add TODO about keybinding cheat sheet

Requested by gitster on IRC.

18 years agoEmit more informative error messages when loading ~/.tig
Jonas Fonseca [Sun, 28 May 2006 18:59:31 +0000 (20:59 +0200)]
Emit more informative error messages when loading ~/.tig

18 years agoOnly touch the option strings if necessary
Jonas Fonseca [Sun, 28 May 2006 18:19:32 +0000 (20:19 +0200)]
Only touch the option strings if necessary

18 years agoImprove color documentation
Jonas Fonseca [Sun, 28 May 2006 18:11:47 +0000 (20:11 +0200)]
Improve color documentation

18 years agoAdd support for setting color options in the ~/.tig user configuration file
Jonas Fonseca [Sun, 28 May 2006 14:38:32 +0000 (16:38 +0200)]
Add support for setting color options in the ~/.tig user configuration file

Now you can put stuff like this in ~/.tig:

# Diff colors
color diff-header yellow default
color diff-index blue default
color diff-chunk magenta default
# UI colors
color title-blur white blue
color title-focus white blue bold

18 years agoMake read_properties take several separator characters; chomp name & value
Jonas Fonseca [Sun, 28 May 2006 03:23:52 +0000 (05:23 +0200)]
Make read_properties take several separator characters; chomp name & value

This concludes the fundation for using read_properties to read options from
a config file.

18 years agoOops, fix short help wrt tab size short option
Jonas Fonseca [Sun, 28 May 2006 02:36:34 +0000 (04:36 +0200)]
Oops, fix short help wrt tab size short option

18 years agoRename repo config loaders using s/config/repo_config/
Jonas Fonseca [Sun, 28 May 2006 02:29:45 +0000 (04:29 +0200)]
Rename repo config loaders using s/config/repo_config/

load_config    -> load_repo_config
read_config_option -> read_repo_config_option

18 years agoMake read_properties() take FILE *pipe instead of command line
Jonas Fonseca [Sun, 28 May 2006 02:19:46 +0000 (04:19 +0200)]
Make read_properties() take FILE *pipe instead of command line

18 years agoDocument the loading time displayed in the title window after 3 seconds
Jonas Fonseca [Sun, 28 May 2006 02:19:08 +0000 (04:19 +0200)]
Document the loading time displayed in the title window after 3 seconds

18 years agoMake the stop all loading request stop all loading
Jonas Fonseca [Sun, 28 May 2006 01:55:31 +0000 (03:55 +0200)]
Make the stop all loading request stop all loading

18 years agoNotify that the prompt is unusable while loading
Jonas Fonseca [Sun, 28 May 2006 01:51:53 +0000 (03:51 +0200)]
Notify that the prompt is unusable while loading

List it as a bug.

18 years agoTab size short option changes from -t to -b
Jonas Fonseca [Sun, 28 May 2006 01:02:19 +0000 (03:02 +0200)]
Tab size short option changes from -t to -b

18 years agoMinor usability fix: when closing never switch to an already closed view
Jonas Fonseca [Sat, 27 May 2006 22:58:04 +0000 (00:58 +0200)]
Minor usability fix: when closing never switch to an already closed view

18 years ago"View commands" section becomes "History commands".
Jonas Fonseca [Sat, 27 May 2006 21:21:28 +0000 (23:21 +0200)]
"View commands" section becomes "History commands".

18 years agoLicense revisited: it's GPLv2 or later
Jonas Fonseca [Fri, 26 May 2006 21:47:23 +0000 (23:47 +0200)]
License revisited: it's GPLv2 or later

18 years agoFix off by one error; makes tags visible again
Jonas Fonseca [Fri, 26 May 2006 20:26:32 +0000 (22:26 +0200)]
Fix off by one error; makes tags visible again

Fixes: d0cea5f929be563d049bc5205fb8de08fd080c32
18 years agoWhen updating the title window, move the cursor to the end of line
Jonas Fonseca [Fri, 26 May 2006 20:09:50 +0000 (22:09 +0200)]
When updating the title window, move the cursor to the end of line

This way the cursor (hopefully) won't feel so jumpy.

18 years agoFactor out cursor moving
Jonas Fonseca [Fri, 26 May 2006 20:08:06 +0000 (22:08 +0200)]
Factor out cursor moving

18 years agoMake window switching smother; fix blurring of previous view when switching
Jonas Fonseca [Fri, 26 May 2006 19:12:43 +0000 (21:12 +0200)]
Make window switching smother; fix blurring of previous view when switching

Don't refresh after a resize, since it causes the previous content to be
shortly displayed. We now simply resize and clear and waits for the first
read to start displaying the new content.

18 years agoNever close backgrounded loads; only clear window when starting to update
Jonas Fonseca [Fri, 26 May 2006 18:02:01 +0000 (20:02 +0200)]
Never close backgrounded loads; only clear window when starting to update

Before windows was cleared each time open_view maximized for example the
main view when it was still loading.

18 years agoOnly pass on properies with non-zero length names
Jonas Fonseca [Wed, 24 May 2006 22:41:53 +0000 (00:41 +0200)]
Only pass on properies with non-zero length names

18 years agoRefactor reading of properties from pipes
Jonas Fonseca [Wed, 24 May 2006 21:57:52 +0000 (23:57 +0200)]
Refactor reading of properties from pipes

18 years agoLoad config before parsing command line options so they can override
Jonas Fonseca [Wed, 24 May 2006 21:12:28 +0000 (23:12 +0200)]
Load config before parsing command line options so they can override

18 years agoMake UTF-8 handling optional but still default
Jonas Fonseca [Wed, 24 May 2006 20:58:11 +0000 (22:58 +0200)]
Make UTF-8 handling optional but still default

Handling of output encoding still missing.

18 years agoAdd support for loading repo config
Jonas Fonseca [Wed, 24 May 2006 17:51:11 +0000 (19:51 +0200)]
Add support for loading repo config

Test it by storing i18n.commitencoding, soon to be uesd.

18 years agoCleanup see also section
Jonas Fonseca [Wed, 24 May 2006 15:18:33 +0000 (17:18 +0200)]
Cleanup see also section

18 years agoMove env handling up below option handling
Jonas Fonseca [Wed, 24 May 2006 15:16:41 +0000 (17:16 +0200)]
Move env handling up below option handling

18 years agoPut license also in the program header
Jonas Fonseca [Wed, 24 May 2006 15:01:16 +0000 (17:01 +0200)]
Put license also in the program header

18 years agoRearrange pager_enter logic
Jonas Fonseca [Wed, 24 May 2006 14:56:52 +0000 (16:56 +0200)]
Rearrange pager_enter logic

18 years agoUpdate README; set a less ugly font-family
Jonas Fonseca [Wed, 24 May 2006 02:32:36 +0000 (04:32 +0200)]
Update README; set a less ugly font-family

18 years agoIntroduce struct line and use it for view->line
Jonas Fonseca [Wed, 24 May 2006 01:23:43 +0000 (03:23 +0200)]
Introduce struct line and use it for view->line

Somewhat experimental. This will call get_line_type() on every read line.

18 years agoImprove title updating and remove flickering
Jonas Fonseca [Tue, 23 May 2006 22:29:24 +0000 (00:29 +0200)]
Improve title updating and remove flickering

 - Show line info even if no lines has been loaded, so less has to be
   redrawn.

 - Don't make the view window one line bigger causing the title window
   to be overwritten. This reinstates the bug in last line drawing.

18 years agoMake update reporting less verbose
Jonas Fonseca [Tue, 23 May 2006 21:54:55 +0000 (23:54 +0200)]
Make update reporting less verbose

It got too annoying when browsing through the split main/diff screen.
Instead put the update timer in the title window if it grows beyond
2 seconds.

18 years agoFix spurious resizing of the display (take 2)
Jonas Fonseca [Mon, 22 May 2006 22:19:27 +0000 (00:19 +0200)]
Fix spurious resizing of the display (take 2)

18 years agoAdd macro for getting number of displayed views
Jonas Fonseca [Mon, 22 May 2006 22:08:11 +0000 (00:08 +0200)]
Add macro for getting number of displayed views

18 years agoOnly resize the display when actually required
Jonas Fonseca [Sun, 21 May 2006 23:26:22 +0000 (01:26 +0200)]
Only resize the display when actually required

18 years agoFix updating of the main view title when the screen isn't split
Jonas Fonseca [Sun, 21 May 2006 23:18:13 +0000 (01:18 +0200)]
Fix updating of the main view title when the screen isn't split

18 years agoEnd the current update before begining a new one; fixes CPU hogging
Jonas Fonseca [Sun, 21 May 2006 23:04:49 +0000 (01:04 +0200)]
End the current update before begining a new one; fixes CPU hogging

18 years agoBind 'j'/'k' to moving up/down; add next/previous requests bound to Down/Up
Jonas Fonseca [Sun, 21 May 2006 02:44:08 +0000 (04:44 +0200)]
Bind 'j'/'k' to moving up/down; add next/previous requests bound to Down/Up

This adds support for using these next/previous requests for changing the
current commit in the main view from the diff view, if the diff view has
the main view as it's parent.

Works for both split- and full-screen diff views by making redrawing
conditional when moving (and doing the lowlevel scrolling).

Replaces REQ_MOVE_{UP,DOWN}_ENTER.

18 years agoMove struct commit to appear just above the main view backend
Jonas Fonseca [Sun, 21 May 2006 02:08:52 +0000 (04:08 +0200)]
Move struct commit to appear just above the main view backend

18 years agoAdd -O2 to CFLAGS to get more warnings
Jonas Fonseca [Sun, 21 May 2006 01:19:19 +0000 (03:19 +0200)]
Add -O2 to CFLAGS to get more warnings

18 years agoCache all queries for refs based on ID
Jonas Fonseca [Sun, 21 May 2006 01:18:56 +0000 (03:18 +0200)]
Cache all queries for refs based on ID

At least then they won't appear as a source of leaking and in the future
the main view can be reloaded without having to deal freeing them.

18 years agoMove git directory assertion to main; don't require .git repo in pager mode
Jonas Fonseca [Sat, 20 May 2006 19:07:44 +0000 (21:07 +0200)]
Move git directory assertion to main; don't require .git repo in pager mode

18 years agoIn pager mode, fix entering commit lines from log and pager view
Jonas Fonseca [Sat, 20 May 2006 16:42:26 +0000 (18:42 +0200)]
In pager mode, fix entering commit lines from log and pager view

18 years agoRemove old window cycling code from before enter request appeared
Jonas Fonseca [Sat, 20 May 2006 15:56:10 +0000 (17:56 +0200)]
Remove old window cycling code from before enter request appeared

18 years agoAdd simple window stack, tracking view relation ship via parent member
Jonas Fonseca [Sat, 20 May 2006 15:39:25 +0000 (17:39 +0200)]
Add simple window stack, tracking view relation ship via parent member

This makes it possible to easily switch back to the main (or log) view
by closing the diff view, regardless of whether it is split or full-screen.

Requested-by: Aneesh Kumar <aneesh.kumar@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
18 years agoRemove objsize member from struct commit
Jonas Fonseca [Sat, 20 May 2006 14:10:15 +0000 (16:10 +0200)]
Remove objsize member from struct commit

It is unused.

18 years agoMake Enter in the pager view always scroll
Jonas Fonseca [Sat, 20 May 2006 13:22:28 +0000 (15:22 +0200)]
Make Enter in the pager view always scroll

It will still split to diff view if a commit line is detected.

18 years agoRecord builds with dirty working tree by appending -dirty to the version
Jonas Fonseca [Sat, 20 May 2006 12:47:23 +0000 (14:47 +0200)]
Record builds with dirty working tree by appending -dirty to the version

18 years agoRemove trailing space; make cursed global static
Jonas Fonseca [Sat, 20 May 2006 12:37:31 +0000 (14:37 +0200)]
Remove trailing space; make cursed global static

18 years agoMake -h and --help options ouput a help message
Jonas Fonseca [Sat, 20 May 2006 02:45:22 +0000 (04:45 +0200)]
Make -h and --help options ouput a help message

18 years agoBind '-' to PageUp; raises Mutt compatibility
Jonas Fonseca [Sat, 20 May 2006 01:39:07 +0000 (03:39 +0200)]
Bind '-' to PageUp; raises Mutt compatibility

Requested-by: Aneesh Kumar <aneesh.kumar@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
18 years agoStreamline version displaying and show built date
Jonas Fonseca [Sat, 20 May 2006 02:14:53 +0000 (04:14 +0200)]
Streamline version displaying and show built date

18 years agoMake Enter in the main view switch to the split diff view
Jonas Fonseca [Sat, 20 May 2006 01:39:07 +0000 (03:39 +0200)]
Make Enter in the main view switch to the split diff view

This way, holding down Enter will open the commit diff and start scrolling
much like Mutt behaves.

Requested-by: Aneesh Kumar <aneesh.kumar@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
18 years agoAdd preliminary support for UTF-8 handling in the main view
Jonas Fonseca [Sat, 20 May 2006 01:30:41 +0000 (03:30 +0200)]
Add preliminary support for UTF-8 handling in the main view

It is very simple but fixes the issue with unaligned drawing of the line
between the author and log title columns.

18 years agoAdd close view request; bound to 'q' by default
Jonas Fonseca [Fri, 19 May 2006 20:19:19 +0000 (22:19 +0200)]
Add close view request; bound to 'q' by default

If only one view is open it will quit. More compatible with Mutt behavior.

Based on patch by Aneesh Kumar <aneesh.kumar@gmail.com>

18 years agoBind quit to 'Q'
Jonas Fonseca [Fri, 19 May 2006 19:50:48 +0000 (21:50 +0200)]
Bind quit to 'Q'

18 years agoAdd -Werror to the cc debug flags
Jonas Fonseca [Fri, 19 May 2006 19:25:35 +0000 (21:25 +0200)]
Add -Werror to the cc debug flags

18 years agoPressing Enter in the diff view will now scroll it one line down
Jonas Fonseca [Thu, 18 May 2006 08:15:09 +0000 (10:15 +0200)]
Pressing Enter in the diff view will now scroll it one line down

Make tig more compatible with Mutt behavior.

Requested-by: Aneesh Kumar <aneesh.kumar@gmail.com>
18 years agoRearrange things in the start of the viewer
Jonas Fonseca [Thu, 18 May 2006 08:06:02 +0000 (10:06 +0200)]
Rearrange things in the start of the viewer

18 years agoBind 'b' to Page Up, and Space to Page Down
Kristian Høgsberg [Wed, 17 May 2006 22:20:21 +0000 (00:20 +0200)]
Bind 'b' to Page Up, and Space to Page Down

Makes tig more compatible with less and other pagers.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
18 years agoMake sense of the comment about view->win height
Jonas Fonseca [Wed, 17 May 2006 21:52:45 +0000 (23:52 +0200)]
Make sense of the comment about view->win height

18 years agoGroup display functions at the bottom
Jonas Fonseca [Wed, 17 May 2006 21:43:22 +0000 (23:43 +0200)]
Group display functions at the bottom

18 years agoRedraw the whole display after toggling line number
Jonas Fonseca [Wed, 17 May 2006 21:39:39 +0000 (23:39 +0200)]
Redraw the whole display after toggling line number

18 years agoMinor documentation updates
Jonas Fonseca [Wed, 17 May 2006 21:36:55 +0000 (23:36 +0200)]
Minor documentation updates

18 years agoFix warnings
Sir Raorn [Wed, 17 May 2006 16:09:52 +0000 (18:09 +0200)]
Fix warnings

tig.c: In function 'sq_quote':
tig.c:190: warning: value computed is not used
tig.c:193: warning: value computed is not used

Signed-off-by: Sir Raorn <raorn@altlinux.ru>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
18 years agoFix linking with --as-needed ld(1) option.
Sir Raorn [Wed, 17 May 2006 16:08:31 +0000 (18:08 +0200)]
Fix linking with --as-needed ld(1) option.

Signed-off-by: Sir Raorn <raorn@altlinux.ru>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
18 years agoMinor doc and coding style fixes
Jonas Fonseca [Wed, 17 May 2006 15:58:54 +0000 (17:58 +0200)]
Minor doc and coding style fixes

18 years agoMark quit() and die() __noreturn
Timo Hirvonen [Wed, 17 May 2006 15:57:14 +0000 (17:57 +0200)]
Mark quit() and die() __noreturn

Fixes tig.c|898| warning: 'steps' may be used uninitialized in this function

18 years agoMake some strings "const"
Timo Hirvonen [Wed, 17 May 2006 15:56:23 +0000 (17:56 +0200)]
Make some strings "const"

18 years agotig version 0.3
Jonas Fonseca [Wed, 17 May 2006 11:50:39 +0000 (13:50 +0200)]
tig version 0.3

18 years agoMinor documentation fixes; nothing from git-ls-remote means no git repo
Jonas Fonseca [Wed, 17 May 2006 10:31:41 +0000 (12:31 +0200)]
Minor documentation fixes; nothing from git-ls-remote means no git repo

18 years agoAfter seeing Linus' mail further improve revision specification section
Jonas Fonseca [Tue, 16 May 2006 17:50:55 +0000 (19:50 +0200)]
After seeing Linus' mail further improve revision specification section

18 years agoMake the last variables static
Jonas Fonseca [Tue, 16 May 2006 16:25:28 +0000 (18:25 +0200)]
Make the last variables static

18 years agoFix File history section number
Jonas Fonseca [Tue, 16 May 2006 15:49:05 +0000 (17:49 +0200)]
Fix File history section number

18 years agoMinor fixes
Jonas Fonseca [Tue, 16 May 2006 15:46:23 +0000 (17:46 +0200)]
Minor fixes

18 years agoOnly tig(1) is required by the help view
Jonas Fonseca [Tue, 16 May 2006 15:36:43 +0000 (17:36 +0200)]
Only tig(1) is required by the help view

18 years agoOnly set VERSION to git-describe if .git is available
Jonas Fonseca [Tue, 16 May 2006 15:32:24 +0000 (17:32 +0200)]
Only set VERSION to git-describe if .git is available

18 years agoPut documentation in a branch named release
Jonas Fonseca [Tue, 16 May 2006 15:21:47 +0000 (17:21 +0200)]
Put documentation in a branch named release

18 years agoYou gotta have a README file
Jonas Fonseca [Tue, 16 May 2006 15:18:45 +0000 (17:18 +0200)]
You gotta have a README file