Commit Graph

103 Commits

Author SHA1 Message Date
Douglas Creager e5104b4069 Use <pre> tag for commit message so that whitespace displays correctly
The contents of the commit message is inserted into the “#message” tag
directly.  If we use a <div> tag, then any whitespace in the commit
message will get collapsed down into a single space as HTML requires.
Since the CSS stylesheet calls for a monospaced font, it makes sense
to use a <pre> tag instead, so that whitespace will be preserved.
2009-02-06 21:09:03 +01:00
Johannes Gilger 8bed6191f5 diffHighlighter.js: Bail out early for deleted binary/image files
If we have an image (png,jpg,...) which was deleted we cant display a
diff or the file itself anymore. In this case the entry in the file-list
is enough.
2009-02-06 21:09:01 +01:00
Johannes Gilger 7cb4930389 diffHighlighter: Fix display for deletion of binary files
When a binary file is deleted the second filename doesn't start with b/
but is "/dev/null". We didn't account for that.
2009-02-06 21:08:01 +01:00
Johannes Gilger ef8317bcb0 Allow email-addresses without the @-sign
These addresses are perfectly valid in a local scope, and GitX shouldn't
fail anyway.
2009-02-06 21:08:01 +01:00
Johannes Gilger bb8a615b22 Recognize file-mode changes correctly and display them
diffHighligher.js: Recognize file-mode changes and mark them
history.js: Extend newfile callback by parameters for mode
history.css: Adjust changed-span to accomodate "mode changed"
2009-02-06 21:07:57 +01:00
Pieter de Bie ab2ddd87cc CommitView: Show linebreaks with new files
Just before releasing 0.6, I cleaned up some old code.
In c6895105e2 (Remove old code in Commit/Diff views),
I removed some pre and code tags, causing new files
in the commit view to be displayed without line breaks
2009-01-28 20:21:06 +00:00
Pieter de Bie b65170189a Merge branch 'pu/jg/rename_detection' (early part)
* 'pu/jg/rename_detection' (early part):
  Diff: also show a binary when it's deleted
  DiffHighlighter: Properly show binary changes
  HistoryView: Prettify the file list
  Show renames changes by default
  history.css, history.js: Color changed/deleted/added/moved appendices
  Rudimentary support for renames/deletions of files
2009-01-26 21:30:58 +00:00
Pieter de Bie 1dc649bf09 Diff: also show a binary when it's deleted 2009-01-26 21:18:29 +00:00
Pieter de Bie c6895105e2 Remove old code in Commit/Diff views
We used to put diffs inside a <pre><code> block,
but no longer need to do that as we now use tables anyway.
We changed the code for the History view, but not for the
other two views.
2009-01-25 22:06:56 +00:00
Pieter de Bie b44b0df75a DiffHighlighter: Properly show binary changes
Binary changes don't have a +++ / --- line, just like
a 100% rename doesn't show any changes. We work around
this in much the same way -- by reading the filenames
for that specific case.
2009-01-25 21:45:28 +00:00
Kim Does cf14746bda HistoryView: Prettify the file list 2009-01-25 21:00:25 +00:00
Pieter de Bie b31eee4ba7 CommitView: Make multiselect a bit prettier 2009-01-25 18:20:48 +00:00
Johannes Gilger e2d47cb049 history.css, history.js: Color changed/deleted/added/moved appendices
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-01-25 17:46:23 +00:00
Pieter de Bie 5482dfe450 Rudimentary support for renames/deletions of files
diffHighlighter.js, history.js: Distinguish created, renamed, changed and deleted files and display them accordingly
2009-01-25 17:46:19 +00:00
Pieter de Bie 31cf9cfbee WebHistoryView: Don't try to display PDF files anymore
This used to work, but it probably changed with 1.5.6 or something,
so let's just remove PDF support
2009-01-25 15:38:23 +00:00
Pieter de Bie f16febf0e8 WebCommit: Empty diff display if there's a binary file 2009-01-25 15:02:17 +00:00
Pieter de Bie 2c29f5bda2 WebCommit: Fix displaying of files after multiselect
This was borked when adding the context sizing, because
the multiselect still changed the whole title rather than
only the text span part.
2009-01-25 15:01:22 +00:00
Pieter de Bie ddc9ae7654 PBGitCommit: Don't store refs
We already keep this dictionary in our repository. Rather than adding a
pointer to it on every commit in our rev walk, just look it up lazily in the
dictionary when we need to. That cuts down some time in the initial revwalk
and also removes some stupid code :)
2009-01-25 02:14:09 +00:00
Till Salzer 4f1fe8a1f6 Gravatar: Sanitize email address before calculating MD5
The MD5 of the email address that Gravatar uses should be without any
capitalized characters or spaces.
2009-01-21 20:49:00 +00:00
Pieter de Bie bad99be131 DiffView: Fix displaying of diffs
This was lost when changing the diff mechanism to
highlight only a single div, rather than all diffs
in the body.
2009-01-19 21:41:29 +00:00
Pieter de Bie 9c4c2a347b CommitView: Allow changing of context size
This adds a slider in the commit view with
which the user can change the context size.

This is useful for example if the hunks are too
big; by changing the context size, a hunk can be
split and then the changes can be committed.
2009-01-19 21:37:37 +00:00
Johannes Gilger ed08bf64bd diffHighlighter.js: Off-by-one for last file in diff, resulting in wrong href 2009-01-19 17:00:59 +00:00
Daniel Lundqvist 47fa714714 Properly handle deselection in file lists. 2009-01-19 16:52:32 +00:00
Daniel Lundqvist 5d4a8c7a66 Improve margins now that we can toggle things in rightcontent div. 2009-01-19 16:50:52 +00:00
Daniel Lundqvist 0f8ac90743 WebHistoryController: Only show Gravatar and Gist if they are enabled
This add an "enableFeature" JS function that checks if a given feature is
enabled. If it is, the correct div is shown, otherwise it is hidden.
2009-01-19 16:48:26 +00:00
Daniel Lundqvist 09cc80522d Use the passed in image element in setGravatar. 2009-01-19 16:38:07 +00:00
Daniel Lundqvist 8ef733518e Add id to "Gist it" button so we can refer to it from JS. 2009-01-19 16:38:07 +00:00
Pieter de Bie da89f38546 HistoryView: Accept an empty email address 2008-12-22 20:40:17 +01:00
Kim Does 0434062a7e DiffView: Make the lines and shadows more subtle 2008-12-02 01:00:18 +01:00
Pieter de Bie d977d90b2c Diffs: overflow the text 2008-12-02 01:00:18 +01:00
Pieter de Bie 0852f6326c DiffHighlighter: Don't display a diff if there's nothing to display 2008-12-01 15:57:21 +01:00
Pieter de Bie 415ee91b50 WebHistoryView: Add a link to display changed images 2008-12-01 15:57:21 +01:00
Pieter de Bie 359346a2d3 DiffHighlighter: Add a binary file callback
This allows a caller to return custom code when
a file is marked as binary, such as the option
to display the file
2008-12-01 15:57:18 +01:00
Pieter de Bie 7a3166c0e6 WebHistoryView: Use diff callbacks to display history list
This is the start of a callback system we can use to 
make the diff more interactive
2008-12-01 15:09:48 +01:00
Pieter de Bie 4591557e9b WebHistoryView: Fix displaying of parents
This was broken once with the shift away from Prototype,
and even further when using libgit2.
2008-12-01 14:26:42 +01:00
Pieter de Bie 23bb1658d9 WIP: Prettify the diff display by using rounded corners
This wraps each changed file in its own rounded box, making
the diff display easier to the eye :)
2008-11-26 17:44:49 +01:00
Pieter de Bie 07554fbd1f Add toggle function 2008-11-26 17:44:48 +01:00
Pieter de Bie ea30f2bfce JS: Remove stray log 2008-11-25 17:43:11 +01:00
Pieter de Bie 7e2707d979 DiffHilighter: Specific the div in which to hilight
Previously, the diff hilighter was a bit odd in that it would
just search for elements with a diff and highlight those. While
useful in theory, this wasn't used at all. We change it to
receive the diff to hilight, which makes the code somewhat simpler.
2008-11-25 17:43:11 +01:00
Stephen Bannasch f05d0188fc add commit file links and ctrl-arrow navigation
A list of files included in a commit are listed below the
commit message. The list are links which will take you to
that file in the diff display below.

The title of each fileHeader is now just the path to the file
instead of the full diff command.

While the focus is in the commit ctrl-down_arrow and up_arrow
will navigate to to next and previous file in that commit.
2008-11-25 17:43:11 +01:00
Pieter de Bie d2eafc2d52 Include libgit2 as submodule and use it to store sha's
This reduces GitX's memory usage and makes some operations much faster,
like graphing, by having a cheaper comparison
2008-11-24 22:53:48 +01:00
Pieter de Bie 0975426f2f CommitView: move index functions to separate controller
This merges functionality that was previously stored in the
combination of PBGitCommitController / PBChangedFile to a
dedicated controller, PBGitIndexController.
2008-11-18 23:59:25 +01:00
Pieter de Bie 874737fcb5 CommitView: Allow multiple selection 2008-11-18 23:59:25 +01:00
Pieter de Bie 79e5304aa7 WebHistoryView: don't error out when reloading refs
We changed the showRef() prototype to take the current ref, but
didn't change all callers.
2008-11-01 22:51:06 +01:00
Pieter de Bie 90db001409 WebCommitView: Add a state display
This adds a div in the webview to display the current commit
state. It allows us to notify the user of new commits by
showing something in the webview, rather than a modal
dialog.
2008-11-01 20:56:33 +01:00
Pieter de Bie b7645ec967 PBWebHistoryController: show the commit diff async
This should make the GUI more responsive by allowing the diff
to be read in the background. This assumes that

[PBGitCommit details] is threadsafe, so we should keep it that
way.
2008-10-31 23:45:39 +01:00
Pieter de Bie 9382cbf266 Merge commit '9e2618c3ea0e0517e156c3e04b9dba356311f361'
* commit '9e2618c3ea0e0517e156c3e04b9dba356311f361':
  Reorder project
  CommitView: Allow committing per hunk
2008-10-28 23:08:13 +01:00
Pieter de Bie d491f3b3ae CommitWebView: Display new files
This was broken when refactoring the commit code
2008-10-27 17:42:36 +01:00
Pieter de Bie b252de1a76 CommitView: Allow committing per hunk 2008-10-21 23:31:45 +02:00
Pieter de Bie b1e3dd2212 WebCommitView: Use a notification to display errors
This should give GitX some more consistency. Also, it will
give us a basis to build further changes on.
2008-10-21 22:48:50 +02:00