summaryrefslogtreecommitdiff
path: root/git.py
Commit message (Collapse)AuthorAgeFilesLines
* repo: diff: add option to show "creation event" diff for root commitEric Sunshine2015-01-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | At its inception, Git did not show a "creation event" diff for a project's root commit since early projects, such as the Linux kernel, were already well established, and a large root diff was considered uninteresting noise. On the other hand, new projects adopting Git typically have small root commits, and such a "creation event" is likely to have meaning, rather than being pure noise. Consequently, git-diff-tree gained a --root flag in dc26bd89 (diff-tree: add "--root" flag to show a root commit as a big creation event, 2005-05-19), though it was disabled by default. Displaying the root "creation event" diff, however, became the default behavior when configuration option 'log.showroot' was added to git-log in 0f03ca94 (config option log.showroot to show the diff of root commits; 2006-11-23). And, gitk (belatedly) followed suit when it learned to respect 'log.showroot' in b2b76d10 (gitk: Teach gitk to respect log.showroot; 2011-10-04). By default, these tools now all show the root diff as a "creation event", however, git-arr suppresses it unconditionally. Resolve this shortcoming by adding a new git-arr configuration option "rootdiff" to control the behavior (enabled by default). Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
* git: Add '--' to "git rev-list" runs to avoid ambiguous argumentsAlberto Bertogli2014-12-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is a branch and a file with the same name, git-arr will fail to generate, as git will complain when running git rev-list. For example, if there is both a file and a branch called "hooks" in the repository, git-arr would fail as follows: === git-arr running: ['git', '--git-dir=/some/repo', 'rev-list', '--max-count=1', '--header', u'hooks']) fatal: ambiguous argument 'hooks': both revision and filename Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' Traceback (most recent call last): File "./git-arr", line 457, in <module> main() File "./git-arr", line 452, in main skip_index = len(opts.only) > 0) File "./git-arr", line 388, in generate branch_mtime = r.commit(bn).committer_date.epoch AttributeError: 'NoneType' object has no attribute 'committer_date' To fix that, this patch appends a "--" as the last argument to rev-list, which indicates that it has completed the revision list, which disambiguates the argument. While at it, a minor typo in a comment is also fixed. Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
* git.py: Parse timestamps from UTC, not from local timeAlberto Bertogli2014-10-051-1/+1
| | | | | | | | | | | The current parsing of dates from git incorrectly uses datetime.fromtimestamp(), which returns the *local* date and time corresponding to the given timestamp. Instead, it should be using datetime.utcfromtimestamp() which returns the UTC date and time, as the rest of the code expects. Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
* Show the age of a repository in the index, via javascriptAlberto Bertogli2013-11-021-1/+12
| | | | | | | | | This patch adds the age of the repository to the index view, using javascript to give a nice human string for the age. When javascript is not available, the element remains hidden. Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
* Add embed data URI image blob supportVanya Sergeev2013-11-021-1/+5
|
* Fix parsing of empty commit messagesVanya Sergeev2013-10-121-1/+6
|
* Improve the way we find repo pathsAlberto Bertogli2012-11-111-3/+9
| | | | | | | | | | This patch improves the way we find the path to the repositories, both in the recursive and in the non-recursive cases. We now support specifying non-bare repositories directly, and also recursing on them. Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
* Initial commit0.01Alberto Bertogli2012-11-101-0/+522
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>