Code

tig.git
14 years agoprepare_update_file: assume file is relative to root directory
Jonas Fonseca [Tue, 15 Dec 2009 15:43:17 +0000 (10:43 -0500)]
prepare_update_file: assume file is relative to root directory

14 years agoStatus view: limit untracked file by the prefix/subdirectory
Jonas Fonseca [Tue, 15 Dec 2009 15:40:41 +0000 (10:40 -0500)]
Status view: limit untracked file by the prefix/subdirectory

This reinstates the original behavior reverted in commit
e7d0ebc0ec190e3a07fc28a2f551426e34a1ee6e.

14 years agoopen_editor: always open path relative to the repository root directory
Jonas Fonseca [Tue, 15 Dec 2009 15:39:57 +0000 (10:39 -0500)]
open_editor: always open path relative to the repository root directory

14 years agoget_author_initials: improve and fix to not read outside of name string
Jonas Fonseca [Tue, 15 Dec 2009 15:32:21 +0000 (10:32 -0500)]
get_author_initials: improve and fix to not read outside of name string

Added FIXME about multi-byte and multi-column characters.

14 years agoAbbreviation of author names is now configurable and toggleable
Jonas Fonseca [Tue, 15 Dec 2009 03:01:59 +0000 (22:01 -0500)]
Abbreviation of author names is now configurable and toggleable

14 years agoRefactor format variable lookup and expansion
Jonas Fonseca [Mon, 14 Dec 2009 16:18:31 +0000 (11:18 -0500)]
Refactor format variable lookup and expansion

14 years agoOops, fix enum_equals
Jonas Fonseca [Mon, 14 Dec 2009 22:06:19 +0000 (17:06 -0500)]
Oops, fix enum_equals

14 years agoMake return value of string_date const
Jonas Fonseca [Sun, 13 Dec 2009 20:59:45 +0000 (15:59 -0500)]
Make return value of string_date const

14 years agoSimplify enum name comparison with enum_equals macro
Jonas Fonseca [Sun, 13 Dec 2009 20:11:17 +0000 (15:11 -0500)]
Simplify enum name comparison with enum_equals macro

14 years agoDefine date values in DATE_INFO macro
Jonas Fonseca [Fri, 11 Dec 2009 23:26:25 +0000 (18:26 -0500)]
Define date values in DATE_INFO macro

14 years agoRefactor toggle_date_option into a generic enum_map based toggler
Jonas Fonseca [Fri, 11 Dec 2009 22:52:47 +0000 (17:52 -0500)]
Refactor toggle_date_option into a generic enum_map based toggler

14 years agoIntroduce parse_enum and use it to parse the show-date option
Jonas Fonseca [Fri, 11 Dec 2009 22:50:38 +0000 (17:50 -0500)]
Introduce parse_enum and use it to parse the show-date option

14 years agoRefactor help_name into enum_name
Jonas Fonseca [Fri, 11 Dec 2009 22:42:41 +0000 (17:42 -0500)]
Refactor help_name into enum_name

14 years agoFix parsing of boolean show-date values
Jonas Fonseca [Fri, 11 Dec 2009 22:13:37 +0000 (17:13 -0500)]
Fix parsing of boolean show-date values

It was broken during the introduction of relative dates.

14 years agotoggle_date_option: use passed date argument instead of opt_date
Jonas Fonseca [Fri, 11 Dec 2009 22:06:37 +0000 (17:06 -0500)]
toggle_date_option: use passed date argument instead of opt_date

14 years agoFix usage of the status view from a sub directory
Jonas Fonseca [Fri, 11 Dec 2009 22:03:17 +0000 (17:03 -0500)]
Fix usage of the status view from a sub directory

14 years agoEncode everything internally as UTF-8
Jonas Fonseca [Wed, 18 Feb 2009 22:14:56 +0000 (23:14 +0100)]
Encode everything internally as UTF-8

Store all strings internally as UTF-8 and convert them when they are
displayed if the locale is non-UTF-8. Improve the install documentation
related to proper support for UTF-8 via ncursesw.

14 years agoBranch view: support browsing --all branches
Jonas Fonseca [Fri, 27 Nov 2009 12:41:38 +0000 (07:41 -0500)]
Branch view: support browsing --all branches

14 years agoCleanup bluring of the previous view's title bar
Jonas Fonseca [Fri, 27 Nov 2009 12:37:48 +0000 (07:37 -0500)]
Cleanup bluring of the previous view's title bar

15 years agoforeach_ref: make ref argument const
Jonas Fonseca [Tue, 24 Nov 2009 03:20:34 +0000 (22:20 -0500)]
foreach_ref: make ref argument const

15 years agoStatus view: update the file variable when a line is selected
Jonas Fonseca [Tue, 24 Nov 2009 03:12:32 +0000 (22:12 -0500)]
Status view: update the file variable when a line is selected

... so %(file) works as expected.

15 years agoTODO: line wrapping
Jonas Fonseca [Sun, 22 Nov 2009 19:18:36 +0000 (14:18 -0500)]
TODO: line wrapping

Requested by Eskild Hustvedt.

15 years agoFix install-release-doc make rules to use origin/release
Jonas Fonseca [Sat, 21 Nov 2009 14:37:26 +0000 (09:37 -0500)]
Fix install-release-doc make rules to use origin/release

Thanks to bill lam for spotting this.

15 years agoAdd make rules to install documentation from the release branch
Jonas Fonseca [Sat, 21 Nov 2009 02:27:52 +0000 (21:27 -0500)]
Add make rules to install documentation from the release branch

15 years agotig-0.15
Jonas Fonseca [Fri, 20 Nov 2009 13:05:00 +0000 (08:05 -0500)]
tig-0.15

15 years agoMakefile: Fix typo in 157ebf54
Ingmar Vanhassel [Thu, 19 Nov 2009 15:50:34 +0000 (16:50 +0100)]
Makefile: Fix typo in 157ebf54

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoStatus view: special case revert of unmerged entries with no physical file
Jonas Fonseca [Thu, 19 Nov 2009 03:02:45 +0000 (22:02 -0500)]
Status view: special case revert of unmerged entries with no physical file

15 years agoio_open: take path as a vararg format
Jonas Fonseca [Wed, 18 Nov 2009 04:01:21 +0000 (23:01 -0500)]
io_open: take path as a vararg format

15 years agorun_io_rd_dir: obsolete by switching call sites to run_io_rd_dir
Jonas Fonseca [Wed, 18 Nov 2009 03:49:05 +0000 (22:49 -0500)]
run_io_rd_dir: obsolete by switching call sites to run_io_rd_dir

15 years agorun_io_dir: take dir argument
Jonas Fonseca [Wed, 18 Nov 2009 03:48:53 +0000 (22:48 -0500)]
run_io_dir: take dir argument

15 years agobegin_update: simplify control flow
Jonas Fonseca [Wed, 18 Nov 2009 03:43:28 +0000 (22:43 -0500)]
begin_update: simplify control flow

15 years agoRemove build dependency on git from the configure script
Jonas Fonseca [Sat, 21 Feb 2009 12:04:10 +0000 (13:04 +0100)]
Remove build dependency on git from the configure script

15 years agotigmanual(7): provide the manual as a man page
Jonas Fonseca [Wed, 18 Nov 2009 03:25:49 +0000 (22:25 -0500)]
tigmanual(7): provide the manual as a man page

15 years agoUpdate asciidoc table syntax to the one supported by version 8.4.4
Jonas Fonseca [Wed, 18 Nov 2009 02:24:44 +0000 (21:24 -0500)]
Update asciidoc table syntax to the one supported by version 8.4.4

Also, fix README.html dependencies.

15 years agoNEWS: Improve bug fix description
Jonas Fonseca [Wed, 18 Nov 2009 02:24:25 +0000 (21:24 -0500)]
NEWS: Improve bug fix description

15 years agoFix loading of blame data when opened from the tree view
Jonas Fonseca [Tue, 17 Nov 2009 04:56:00 +0000 (23:56 -0500)]
Fix loading of blame data when opened from the tree view

... and CWD is a subdirectory (Debian bug 540766). Also, improve the
tree view to allow entering the parent directory.

15 years agoFix draw_date to not format anything when time arg is NULL
Jonas Fonseca [Tue, 17 Nov 2009 04:10:54 +0000 (23:10 -0500)]
Fix draw_date to not format anything when time arg is NULL

15 years agoFix whitespace
bill lam [Thu, 12 Nov 2009 03:02:42 +0000 (11:02 +0800)]
Fix whitespace

There is whitespaces on 2 of the original source line.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoAdd support for displaying relative dates
Jonas Fonseca [Tue, 17 Feb 2009 11:32:51 +0000 (12:32 +0100)]
Add support for displaying relative dates

Also unifies all date formats to use the show-date option and the
toggle-date action.

15 years agoNEWS: Mention date-shorten feature
Jonas Fonseca [Wed, 11 Nov 2009 03:23:02 +0000 (22:23 -0500)]
NEWS: Mention date-shorten feature

15 years agoMerge remote branch 'samb/short-dates'
Jonas Fonseca [Wed, 11 Nov 2009 03:20:27 +0000 (22:20 -0500)]
Merge remote branch 'samb/short-dates'

15 years agoShow the active (instead of the default) keybindings in the help view
Jonas Fonseca [Mon, 9 Feb 2009 21:33:39 +0000 (22:33 +0100)]
Show the active (instead of the default) keybindings in the help view

Furthermore, honor the keymap when suggesting actions in the help
messages.

15 years agoAdd an option (and toggle) for shortening the date column by skipping the time.
Samuel Bronson [Wed, 12 Aug 2009 22:11:55 +0000 (18:11 -0400)]
Add an option (and toggle) for shortening the date column by skipping the time.

Signed-off-by: Samuel Bronson <naesten@gmail.com>
15 years agoBuild with asciidoc-8.4.5
Jonas Fonseca [Sat, 30 May 2009 02:41:11 +0000 (02:41 +0000)]
Build with asciidoc-8.4.5

This version seems to be stricter about presubs attributes:

asciidoc -aversion=0.14.1-28-gac66fdb -asysconfdir=/usr/local/etc -b docbook -d manpage tigrc.5.txt
ERROR: tigrc.5.txt: line 12: malformed presubs attribute: normal
ERROR: tigrc.5.txt: line 41: malformed presubs attribute: normal
ERROR: tigrc.5.txt: line 149: malformed presubs attribute: normal
ERROR: tigrc.5.txt: line 366: malformed presubs attribute: normal
make: *** [tigrc.5.xml] Error 1

Based on patch by Ingmar Vanhassel.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoFixed some uninitialized variable warnings
Sebastian Harl [Fri, 3 Apr 2009 16:34:08 +0000 (18:34 +0200)]
Fixed some uninitialized variable warnings

GCC 4.3.3, when used with -Wall, emits warnings that those variables "may be
used uninitialized in this function".

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoAllow multiple text attributes for color commands
Jonas Fonseca [Mon, 13 Apr 2009 15:34:14 +0000 (17:34 +0200)]
Allow multiple text attributes for color commands

This also fixes lazy behavior so that setting the cursor color no longer
automatically sets the text to bold.

15 years agoRemove macros which are only used for default option values
Jonas Fonseca [Thu, 26 Feb 2009 15:04:02 +0000 (16:04 +0100)]
Remove macros which are only used for default option values

15 years agoMake height of split view configurable
Tilo Schwarz [Mon, 23 Feb 2009 22:24:03 +0000 (23:24 +0100)]
Make height of split view configurable

Signed-off-by: Tilo Schwarz <tilo@tilo-schwarz.de>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoManual: document that :<number> jumps to the line number
Jonas Fonseca [Wed, 25 Feb 2009 14:53:26 +0000 (15:53 +0100)]
Manual: document that :<number> jumps to the line number

15 years agoFix memory allocation check in open_commit_parent_menu
Jonas Fonseca [Sun, 22 Feb 2009 17:58:25 +0000 (18:58 +0100)]
Fix memory allocation check in open_commit_parent_menu

The check was not converted when the code was moved to a separate
function before the commit. To test the menu using the tig repository
start tig using:

tig blame cf63d30cbc4efb2bb87e52c4e54366751bb958fa Makefile

Then go to line 80 (type ":80<enter>") and press the key for moving to
the parent (bound to ',' by default).

15 years agoUse menus with the commit subject to present selectable commit parents
Jonas Fonseca [Sun, 22 Feb 2009 00:31:09 +0000 (01:31 +0100)]
Use menus with the commit subject to present selectable commit parents

15 years agoAdd simple support for showing menues and use it for showing option menu
Jonas Fonseca [Sun, 22 Feb 2009 00:19:58 +0000 (01:19 +0100)]
Add simple support for showing menues and use it for showing option menu

The general goal is to have certain lesser used options not take up a
key for toggling.

15 years agoRestore the branch view position after refreshing
Jonas Fonseca [Sat, 21 Feb 2009 15:37:35 +0000 (16:37 +0100)]
Restore the branch view position after refreshing

15 years agoFix reloading of references to not cause access to freed memory
Jonas Fonseca [Sat, 21 Feb 2009 14:45:52 +0000 (15:45 +0100)]
Fix reloading of references to not cause access to freed memory

Make the allocation of refs stable across reloads (of either the main,
branch or log view) by changing the storage method and introducing a
struct ref_list to keep track of lists of references.

read_ref now always scans the already allocated refs. To speed this up
keep the list sorted and use binary search when inserting and updating.

15 years agoPredefined external command: git commit
Giuseppe Bilotta [Sat, 21 Feb 2009 00:28:41 +0000 (01:28 +0100)]
Predefined external command: git commit

Status view allows management of the stage area, and the user is likely
to issue a commit as soon as (s)he's satisfied with the result. Mapping
'git commit' to the 'C' key in status view makes this straightforward
and allows a very streamlined workflow from within git.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoFix previous/next with branch+main view
Giuseppe Bilotta [Sat, 21 Feb 2009 01:07:33 +0000 (02:07 +0100)]
Fix previous/next with branch+main view

If the main view was opened as a child window of branch view, the
previous/next key would scroll the child window instead of the parent
one, which was not consistent with other dual-window situations.

Fix by checking for a branch+main too when delegating the request.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoAdd support for sorting branch entries by name, date and author
Jonas Fonseca [Sat, 21 Feb 2009 01:34:56 +0000 (02:34 +0100)]
Add support for sorting branch entries by name, date and author

15 years agoAdd support for sorting tree entries by name, date or author
Jonas Fonseca [Sat, 21 Feb 2009 01:33:47 +0000 (02:33 +0100)]
Add support for sorting tree entries by name, date or author

15 years agoBranch view: fix loading to handle when two branches have same commit
Jonas Fonseca [Sat, 21 Feb 2009 00:15:05 +0000 (01:15 +0100)]
Branch view: fix loading to handle when two branches have same commit

15 years agoUse temporary variable in refs loop in main_draw
Jonas Fonseca [Fri, 20 Feb 2009 22:39:29 +0000 (23:39 +0100)]
Use temporary variable in refs loop in main_draw

15 years agoMinor fix to always sort even if allocation fails in get_refs
Jonas Fonseca [Fri, 20 Feb 2009 22:52:44 +0000 (23:52 +0100)]
Minor fix to always sort even if allocation fails in get_refs

15 years agoAdd primitive branch view
Jonas Fonseca [Fri, 20 Feb 2009 23:12:37 +0000 (00:12 +0100)]
Add primitive branch view

For now it let's you browse the branches and choose one to show in the
main view.

15 years agoAdd missing NULL in blame_grep
Jeff King [Fri, 20 Feb 2009 03:23:43 +0000 (22:23 -0500)]
Add missing NULL in blame_grep

Commit 436674f introduced a grep_text utility function which
takes a NULL-terminated list; the callsite in blame_grep
forgot to put in a NULL, leading to segmentation faults.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoFix a potential problem with reading tokens larger then BUFSIZ
Jonas Fonseca [Thu, 19 Feb 2009 16:56:22 +0000 (17:56 +0100)]
Fix a potential problem with reading tokens larger then BUFSIZ

If io_get() is not able to find the end marker it will go into
an infinite loop. To fix this make it possible to reallocate and
increase the buffer if necessary.

To avoid problems with callers reading into a stack allocated buffer,
change these to no longer use the "zero-copy" strategy. This in turns
cleans the callers up a bit.

15 years agoUpdate the current branch information when reloading all references
Jonas Fonseca [Thu, 19 Feb 2009 01:21:39 +0000 (02:21 +0100)]
Update the current branch information when reloading all references

Fixes problem of improper highlighting of current branch after switching
branch and reloading.

15 years agoDefine an allocator for run requests
Jonas Fonseca [Wed, 18 Feb 2009 11:09:12 +0000 (12:09 +0100)]
Define an allocator for run requests

Comparing the size of the binary before and after this change, shows
that the size does not increase when -02 is used.

15 years agoRemove the need for alloc variables
Jonas Fonseca [Wed, 18 Feb 2009 10:56:31 +0000 (11:56 +0100)]
Remove the need for alloc variables

15 years agoMake the granular allocators more customizable using macros
Jonas Fonseca [Wed, 18 Feb 2009 10:47:58 +0000 (11:47 +0100)]
Make the granular allocators more customizable using macros

Add a DEFINE_ALLOCATOR macro which can be used to define a custom
allocator which is more type safe than the current realloc_items and
which removed the need for using temporary variables for holding the
newly allocated chunk. The custom allocator also allows the allocation
granularity to be tweaked to the need of the user instead of being
hardcoded to 256 chunks for all.

15 years agoDefine a tree_grep and fixing searching
Jonas Fonseca [Tue, 17 Feb 2009 03:07:28 +0000 (04:07 +0100)]
Define a tree_grep and fixing searching

It was broken by the move to the annotated tree view.

15 years agoSimplify searching in view lines by defining grep_text utility
Jonas Fonseca [Tue, 17 Feb 2009 03:07:02 +0000 (04:07 +0100)]
Simplify searching in view lines by defining grep_text utility

15 years agoReduce memory and startup time by storing author times as time_t
Jonas Fonseca [Tue, 17 Feb 2009 01:00:45 +0000 (02:00 +0100)]
Reduce memory and startup time by storing author times as time_t

Which means that drawing will have to do some more formatting, however,
the startup time is shorter since gmtime_r() is no longer called. Same
repository as last commit.

18980 fonseca   20   0 17776  15m  872 S    0  0.8   0:01.26 tig
18630 fonseca   20   0 23224  20m  868 S    0  1.0   0:01.26 tig-0.14.1

15 years agoAdd small cache for author names to reduce memory foot-print
Jonas Fonseca [Tue, 17 Feb 2009 00:51:26 +0000 (01:51 +0100)]
Add small cache for author names to reduce memory foot-print

Numbers from an old linux kernel repository with 2740 unique authors
shows that it takes a little longer time to start up but the gain is
quite good. Furthermore, it lifts the name length restriction.

18191 fonseca   20   0 19712  17m  872 S    3  0.8   0:01.34 tig
18180 fonseca   20   0 23224  20m  868 S    0  1.0   0:01.26 tig-0.14.1

15 years agotig-0.14.1
Jonas Fonseca [Sun, 15 Feb 2009 23:02:00 +0000 (00:02 +0100)]
tig-0.14.1

15 years agoRemove unneeded doupdate from view_driver
Jonas Fonseca [Sun, 15 Feb 2009 22:21:23 +0000 (23:21 +0100)]
Remove unneeded doupdate from view_driver

15 years agoKeep the cursor fixed while initial stage progress is reported
Jonas Fonseca [Sun, 15 Feb 2009 22:20:46 +0000 (23:20 +0100)]
Keep the cursor fixed while initial stage progress is reported

15 years agoFix draw_lineno to always set the static format buffer
Jonas Fonseca [Sun, 15 Feb 2009 17:23:44 +0000 (18:23 +0100)]
Fix draw_lineno to always set the static format buffer

15 years agoFix bug in draw_space to not access memory outside the space buffer
Jonas Fonseca [Sun, 15 Feb 2009 17:10:05 +0000 (18:10 +0100)]
Fix bug in draw_space to not access memory outside the space buffer

15 years agoRefactor draw_lineno to use draw_graphic
Jonas Fonseca [Sun, 15 Feb 2009 16:35:34 +0000 (17:35 +0100)]
Refactor draw_lineno to use draw_graphic

15 years agoFix horizontal scrolling
Jonas Fonseca [Sun, 15 Feb 2009 16:22:23 +0000 (17:22 +0100)]
Fix horizontal scrolling

... to not be limited to the view width and to account for
view->yoffset.

15 years agoRemove limitation of horizontal scrolling
Jonas Fonseca [Sun, 15 Feb 2009 16:28:12 +0000 (17:28 +0100)]
Remove limitation of horizontal scrolling

Tig now behaves similar to less in that the user can scroll without
limit to the right.

15 years agotigrc(5): suggest git aliases for external commands requiring shell ops
Jonas Fonseca [Fri, 13 Feb 2009 17:08:36 +0000 (18:08 +0100)]
tigrc(5): suggest git aliases for external commands requiring shell ops

15 years agoFix the view clearing to only be effective for displayed views
Jonas Fonseca [Fri, 13 Feb 2009 13:41:40 +0000 (14:41 +0100)]
Fix the view clearing to only be effective for displayed views

The feature was introduced in ec9aa4f62ae2977d598dda865e6a50b9fc799428.

15 years agoMake behavior of horizontal scrolling configurable
Jonas Fonseca [Fri, 13 Feb 2009 13:38:00 +0000 (14:38 +0100)]
Make behavior of horizontal scrolling configurable

Requested by bill lam.

15 years agoFix handling of quoted strings in the config file
Sebastian Harl [Fri, 13 Feb 2009 13:10:26 +0000 (14:10 +0100)]
Fix handling of quoted strings in the config file

parse_string() adapts the string length to automatically remove quotation
marks when copying the string. However, when calling string_ncopy_do()
strlen(arg) used to be called again instead of using the adapted value.

This e.g. led to wrong locale settings when using
  set commit-encoding = "UTF-8"
and thus a slightly messed up display.

Thanks to Gerfried Fuchs for reporting this.

Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agotigrc(5): fix error in examples for the set command
Jonas Fonseca [Thu, 12 Feb 2009 14:31:18 +0000 (15:31 +0100)]
tigrc(5): fix error in examples for the set command

Fixes Debian bug #514990 reported by Gerfried Fuchs.

15 years agoTree view: draw submodule entry modes as "m---------"
Jonas Fonseca [Tue, 10 Feb 2009 20:31:40 +0000 (21:31 +0100)]
Tree view: draw submodule entry modes as "m---------"

Inspired by gitweb.

15 years agoStatus view: report failures to update a file
Jonas Fonseca [Tue, 10 Feb 2009 11:06:35 +0000 (12:06 +0100)]
Status view: report failures to update a file

Also, wait showing update progress until 5% has been reached.

15 years agoIgnore broken pipe signals
Jonas Fonseca [Tue, 10 Feb 2009 11:02:42 +0000 (12:02 +0100)]
Ignore broken pipe signals

Can be caused if a forked git process exits with an error. Tig should
detect this by checking the exit code of the child using the return
value done_io().

15 years agoUse putenv instead of setenv
Jonas Fonseca [Tue, 10 Feb 2009 10:50:59 +0000 (11:50 +0100)]
Use putenv instead of setenv

Not all platforms (e.g. Solaris) provide setenv. Based on patch by
SungHyun Nam.

15 years agomanual: Correct the keys to move the cursor one line up/down
Carsten Brockmann [Mon, 9 Feb 2009 19:04:23 +0000 (19:04 +0000)]
manual: Correct the keys to move the cursor one line up/down

Signed-off-by: Carsten Brockmann <cabro@gmx.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoStatus view: upon failure to open a file show error message
Jonas Fonseca [Mon, 9 Feb 2009 03:04:40 +0000 (04:04 +0100)]
Status view: upon failure to open a file show error message

15 years agoRefactor and share view maximization code from view-close handling
Jonas Fonseca [Mon, 9 Feb 2009 03:02:33 +0000 (04:02 +0100)]
Refactor and share view maximization code from view-close handling

15 years agoFix io_strerror return type
Jonas Fonseca [Mon, 9 Feb 2009 03:01:48 +0000 (04:01 +0100)]
Fix io_strerror return type

15 years agoAdd support for handling core.worktree
Jonas Fonseca [Mon, 9 Feb 2009 00:55:40 +0000 (01:55 +0100)]
Add support for handling core.worktree

If this option is found set up GIT_DIR and GIT_WORK_TREE. Also, pass
the known git directory path to git ls-remote.

Requested-by: bill lam
15 years agoOptimize read_repo_config_option to reduce string comparisons
Jonas Fonseca [Mon, 9 Feb 2009 00:54:41 +0000 (01:54 +0100)]
Optimize read_repo_config_option to reduce string comparisons

15 years agoMove setting of remote branch from repo config to separate function
Jonas Fonseca [Mon, 9 Feb 2009 00:49:32 +0000 (01:49 +0100)]
Move setting of remote branch from repo config to separate function

15 years agoMark enum_maps and other data tables as const
Jonas Fonseca [Sun, 8 Feb 2009 19:37:11 +0000 (20:37 +0100)]
Mark enum_maps and other data tables as const

15 years agoUse check_blame_commit when handling REQ_ENTER
Jonas Fonseca [Sun, 8 Feb 2009 19:36:28 +0000 (20:36 +0100)]
Use check_blame_commit when handling REQ_ENTER

15 years agoNEWS: Mention Jeff's uninitialized variable bug fix
Jonas Fonseca [Sun, 8 Feb 2009 19:35:14 +0000 (20:35 +0100)]
NEWS: Mention Jeff's uninitialized variable bug fix

From commit 2677b744313c939890a8f6b3316f9d5452581ab8.

15 years agoHandle blaming beyond the creation of file more gracefully
Jeff King [Sun, 8 Feb 2009 11:00:42 +0000 (06:00 -0500)]
Handle blaming beyond the creation of file more gracefully

Currently when you ask to re-blame from the parent of a
commit that created the file, blame_read_file will complain
that it cannot get the file contents ("No blame exist").

At the time we try to read the file, it is too late to abort
the operation, as we have already changed to the new blame
view. However, we can detect this situation early by
limiting the selection of the parent revision to the
particular path of interest: if it returns a parent even
with path-limiting, then we know the path exists; if not,
then we know it doesn't.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>