Commit Graph

74 Commits

Author SHA1 Message Date
Nathan Kinsinger c19d2c8058 Add Diff to contextual menus
- added to menus for refs, commits, and files
    - show a message when there are no changes
2010-03-13 22:16:24 -07:00
Nathan Kinsinger 0cd02c13db Stop the top of diffs in the stage view from being cut off 2010-03-13 22:15:43 -07:00
Nathan Kinsinger 9689c430ef Clean up the commit file list
- remove the underline from file names (makes them easier to read)
    - add icons to replace the file modification buttons (icons by Nathan Kinsinger)
2010-03-13 22:15:40 -07:00
Nathan Kinsinger 9a536fc92a Clean up the commit message
- allow the commit message text to wrap
    - use Menlo on systems that have it
2010-03-13 22:15:37 -07:00
Nathan Kinsinger b557d6b5c6 Clean up the commit header
- make the "Gist it" button a Mac OS X style button
    - remove the default name from each field
    - move the author's gravatar and include the committer's
        - move the gravatar to the left of the author's name
        - add a gravatar for the committer
        - move the author and commiter info to it's own table to allow for putting the gravatar image in a center column
        - setGravatar() now uses the email address passed in
2010-03-13 22:15:34 -07:00
Nathan Kinsinger 370c1322c4 Add a space before the file name. 2010-02-19 22:54:43 -07:00
Pieter de Bie 1854fc0bd0 Merge branch 'pu/pb/index_refactor'
* pu/pb/index_refactor: (24 commits)
  PBGitIndex: post notifications when index stuff fails
  GitIndexController: reorder methods a bit, remove unnecessary stuff
  PBGitIndex: Migrate discardChanges to the GitIndex
  CommitController: Make commit message editable after commit failed
  GitIndex: Fix a few comments
  GitIndex: explicitly tell when stuff is updated
  Remove cruft
  Show previous commit message when amending
  CommitController: Empty commit title when commit is successful
  CommitView: Remove cruft
  Add failed commit notifications
  GitIndex: add commit notifications
  CommitController: Add status messages for index operations
  GitIndex: Add a few notifications
  CommitView: Migrate patch apply stuff to GitIndex
  GitIndex: Add support for applying patches
  CommitController: Replace commit method with the one from GitIndex
  GitIndex: add basic commit method
  GitIndexController: Migrate stageFiles functions to GitIndex
  GitIndex: Add methods to stage and unstage files
  ...

Conflicts:
	PBGitCommitController.m
	PBGitIndexController.h
	PBGitIndexController.m
2009-09-17 23:47:43 +02:00
Pieter de Bie 5972bd4f7f HistoryView: Don't show the 'loading commit' thing until after 500 ms.
This was annoying me a lot, so it's in stable :)

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
2009-09-17 23:40:38 +02:00
Pieter de Bie 0363eea494 HistoryView: don't load in commit information in a separate thread anymore
I've seen this hang or crash a few times, so I hope this works better.
Instead of running a task in a separate thread, we just let it go through
the run loop and catch it when the task is done.

This ruins the second subview in the history view, but I don't think
anybody ever used that, so I'm going to remove it.
2009-09-17 23:29:06 +02:00
Pieter de Bie 64a52ad9e0 CommitView: Migrate diff displaying away from IndexController 2009-09-13 16:55:38 +02:00
Johannes Gilger d3cb020598 commit.js: Fix discardHunk functionality
When rewriting big parts of commit.js, JD forgot to use the new function
for the "Discard hunk" functionality as well. This fixes that.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-09-03 10:13:44 +02:00
JD Smith ab47c14d6e commit.js: Interface for selecting lines to (un-)stage. 2009-07-08 17:22:09 -04:00
JD Smith 62333bf51b commit.js: Refactor hunk retrieval.
To work with subhunks, allow passing a header line explicitly to search for.
2009-06-21 02:36:02 +01:00
JD Smith bcc652bacf commit view: Ensure buttons display on top of text
... but beneath title line.
2009-06-21 02:26:32 +01:00
Pieter de Bie 64182ea911 Merge commit 'origin/jg/tree_context'
* commit 'origin/jg/tree_context':
  HistoryController: Add "Open Files" menu item
  WebHistoryView: Also use the tree context menu
  HistoryController: Use a programatically created context menu
  WebHistoryController: Refactor menu search to be recursive
  HistoryController: Add some marks
  PBGitHistory: Add "Show in Finder" to files
  Display context menu in the history tree to show related commits
  History fileview: select current item on rightclick
2009-06-20 22:28:19 +01:00
Pieter de Bie 6fd339756e Merge branch 'stable'
* stable:
  PBGitConfig: Add missing sentinel
  Remove use of deprecated stringWithCString
  HistoryView: only add parents if parents array exists
  keyboardNavigation: Fix keys 'c' and 'v' from webView
  Site: add link to Twitter

Conflicts:
	Site/text/contact.markdown
2009-06-20 21:34:49 +01:00
Pieter de Bie a002e3316c WebHistoryView: Also use the tree context menu 2009-06-16 19:41:57 +01:00
Pieter de Bie 5f97caabd1 HistoryView: only add parents if parents array exists
This used to break if a commit had no parents. This wasn't noticed
before because the breakage is only minor -- the only way you see it
is because the detail view didn't scroll up afterwards.
2009-06-12 00:15:00 +01:00
Steven Michalske 58ac6ed1ff HistoryView: Change the way the HEAD is displayed
It used to be displayed in bold, but this can be easily overlooked when
visualizing all branches. It's easier to see the HEAD when it has its own
colour.
2009-06-11 19:50:45 +01:00
Johannes Gilger 7b6393570f PBWebChanges: Allow discarding of hunks
This enables a "discard" button for unstaged hunks which simply gets rid of the
changes (by using "git apply --reverse").

To avoid repetition, the stageHunk method was split into a more generic
processHunk method. The "discard" functionality is called through
discardHunk.

The NSAlert shown when discarding can be bypassed by pressing "Alt"
while clicking the discard-button.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-06-06 17:20:30 +01:00
Johannes Gilger fe54a464f7 history.js: Fix display of mode-change and rename
Pieter rewrote history.js in cfbcfc1f38, avoiding the use of
.innerHTML for performance reasons. This broke the HTML-arrows when
dealing with renames / mode-changes because createTextNode quotes them.
This is a simple work-around.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-05-28 14:02:16 +01:00
Pieter de Bie cfbcfc1f38 HistoryView: speed up diff display
This speeds up the diff display by using DOM manipulation instead
of .innerHTML. Apparently incremental .innerHTML is really expensive
compared to DOM manipulation (which is expensive compared to a single .innerHTML=).

For example, the v0.2.1 commit, which introduces Sparkle, now loads in 70ms
rather than 230.
2009-05-14 17:05:40 +01:00
Pieter de Bie b022d81b45 Merge branch 'stable'
* stable:
  Make confirmation of Gists optional
  Add more defaults for handling Gists
  HistoryView: Confirm paste to Gist if github.user is unset
  GitX: CFBuildVersion as x.x.x.xx
  UserManual: Explain the concept of the Amend-button
2009-03-26 23:04:51 +00:00
Pieter de Bie 11c9f51302 Make confirmation of Gists optional
This makes use of the rules that are explicit in the
preferences. By default, Gists are always private and there
will always be a confirmation message.

Both options can be changed from the preferences menu.
2009-03-26 23:03:48 +00:00
Johannes Gilger de31ea193a HistoryView: Confirm paste to Gist if github.user is unset
This patch relates to ticket #58. It adds a method which will ask for
confirmation when pasting to Gist as an anonymous user. Since users
which have github.user and github.token set can easily delete pasted
snippets no confirmation is needed for them.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-03-26 23:03:48 +00:00
Benjamin Kramer df545314f5 HistoryView: Make table header large enough so the text doesn't shift
"Committer" was too big. Use EMs so font size changes won't bother us.
2009-03-25 20:53:36 +01:00
Benjamin Kramer a762ae5219 HistoryView: Show commit date 2009-03-25 20:53:35 +01:00
Benjamin Kramer 89128794c9 HistoryView: Show committer if his name differs from the author's 2009-03-25 20:53:10 +01:00
Benjamin Kramer 5ff9620ec2 HistoryView: Factor out email formatting
The patches to show the committer's name depend on this.
2009-03-25 20:52:42 +01:00
Pieter de Bie 06d6da1fc5 Merge commit '3e21d041efb95b6358c749e021bf5ddbcc05bcd7'
* commit '3e21d041efb95b6358c749e021bf5ddbcc05bcd7':
  Info.plist: Make GitX open any file/folder on drop
  diffHighlighter: Correctly match unified diff hunks
  diffHighlighter: Fix indent-after-stagebutton bug
2009-03-24 00:48:17 +00:00
Pieter de Bie 8616b38eb3 WebHistoryView: Correctly show refs when reloading
We assigned a function instead of the result of that function,
which broke the refreshing
2009-03-23 23:08:27 +00:00
Johannes Gilger 58990fc318 diffHighlighter: Fix indent-after-stagebutton bug
- display context lines in own <div>.
- Stagebutton no longer is float: left.

This fixes ticket #104

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-02-21 22:33:28 +01:00
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 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 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
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
Daniel Lundqvist 47fa714714 Properly handle deselection in file lists. 2009-01-19 16:52:32 +00:00