Commit Graph

618 Commits

Author SHA1 Message Date
Pieter de Bie 4e4ffcc653 HistoryView: Autosave column information
This allows columns to save their information, such as
whether or not they are hidden.
2009-05-28 12:05:23 +01:00
Pieter de Bie 8273aecb98 Allow a user to select which columns to display 2009-05-28 12:05:23 +01:00
Pieter de Bie 785e7eda42 Merge branch 'stable'
* stable:
  When selecting a folder in tree-view, display the
  PBGitRepository: Correctly indicate bare/non-bare repos
  Get rid of some unnecessary casts
  CommitController: Don't rewrap commit message when amending
  Release notes for 0.6.3
  PBGitCommit: Call git show with --no-color to be safe
  Info.plist: Fix handling of directories
  PBGitIndexController: fix uninitialized value

Conflicts:
	PBGitCommitController.m
2009-05-27 18:25:14 +01:00
dbr 2d0bbecf55 When selecting a folder in tree-view, display the
path rather than the <PBGitTree: 0x...> object.

For example:

"This is a tree with path <PBGitTree: 0x1313000>"

..instead of:

"This is a tree with path Documentation/ReleaseNotes"
2009-05-27 18:11:02 +01:00
Johannes Gilger 5040bdc1c2 PBGitRepository: Correctly indicate bare/non-bare repos
This addresses an issue with non-bare repos which had no core.bare
variable in the config. The isBareRepository-function would work
on the full fileURL (pointing to the .git subdir), which in turn would
indicate a bare repo (this is what git rev-parse --is-bare-repository
returns in .git, and the opposite is true for the superdir).

We work around by using the working-dir for a repo (and directly
indicating a bare repo if there is no workdir). The only issue remaining
is the case of a bare repo manually set to "core.bare = false".

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-05-27 18:10:17 +01:00
Benjamin Kramer c12e8b9dd4 Get rid of some unnecessary casts 2009-05-27 18:09:29 +01:00
Joe Fiorini 40ba75045d Trigger commit-msg hook when committing
A failure of the commit-msg hook (similar to the
pre-commit hook) will cause the commit to abort.
Commit-msg requires an argument containing the
filename holding the commit, in this case
.git/COMMIT_EDITMSG.
2009-05-27 18:03:18 +01:00
Joe Fiorini a93740a3a7 Enable arguments to be passed to executeHook.
Some hooks, such as commit-msg and
prepare-commit-msg require at least one argument.
This allows executeHook to take an array of
arguments to be passed on to the hook.
2009-05-27 18:03:15 +01:00
Joe Fiorini 897c80f8a7 Write commit message to file
Typically, git-commit writes the commit message
to .git/COMMIT_EDITMSG. This writes the commit
message to that file manually to assist in
hooks such as commit-msg and
prepare-commit-msg which expect this file as the
first argument.
2009-05-27 18:03:09 +01:00
Pieter de Bie df4a50aebe CommitController: Don't rewrap commit message when amending
We used to use git log with a custom pretty command to reread the commit message,
but this rewraps the subject line, and also adds extra newlines. We fix this
by reading in the raw commit from git-cat-file, and then searching for the
double newline.
2009-05-27 17:51:23 +01:00
Pieter de Bie b5dac080ff Release notes for 0.6.3 v0.6.3 2009-05-19 18:28:52 +01:00
Johannes Gilger 0d2fa4f5ea PBGitCommit: Call git show with --no-color to be safe
This fixes ticket #132, where setting color.ui = always in the gitconfig
caused GitX to received colorized output for "git show", thereby
destroying the diff-output.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-05-19 18:20:26 +01:00
Johannes Gilger 85e75255cd Info.plist: Fix handling of directories
Resulting from the last change to Info.plist in 3e21d041ef we were no
longer able to open directories called <foo>.<bar> wheren bar != git.
Using this code allows us to open all directories again and also to
drag-and-drop to the dock.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-05-19 18:20:26 +01:00
Johannes Gilger e9d45261bd PBGitRepository: Display branch-name in window title
This returns not only the name of the git-dir but also the current
branch (or detached HEAD if no local branch is checked out).

When reloading the refs (which also happens when checking-out using
GitX), the displayName-method is called, updating the window-title.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-05-18 23:18:59 +01:00
Johannes Gilger 6912add00e PBGitCommit: Call git show with --no-color to be safe
This fixes ticket #132, where setting color.ui = always in the gitconfig
caused GitX to received colorized output for "git show", thereby
destroying the diff-output.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-05-18 23:18:25 +01:00
Johannes Gilger 16244df346 Info.plist: Fix handling of directories
Resulting from the last change to Info.plist in 3e21d041ef we were no
longer able to open directories called <foo>.<bar> wheren bar != git.
Using this code allows us to open all directories again and also to
drag-and-drop to the dock.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-05-18 23:18:16 +01:00
Johannes Gilger 85df0f0675 GitX: Make toolbar in history and commit view equal height
This fixes ticket #123, it restricts the branch-selector in history-view
to a maximum-height of 25pixels, which is the height of the button to
select history/commit-mode.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-05-18 23:17:51 +01:00
Benjamin Kramer 4a4b551822 PBGitIndexController: fix uninitialized value
The encoding used to write a new .gitignore was based on an
uninitialized value. Fix this by using UTF-8 as the default.

Found by the clang static analyzer.
2009-05-18 23:14:11 +01:00
Pieter de Bie 7caf7d799a Merge branch 'stable'
* stable:
  Fix many gcc 4.2 compiler warnings
  GitX.xcodeproj: Quote paths in custom shell scripts
  Fix compilation with GCC 4.2
  IndexController: Temporarily stop tracking when (un)staging
  IndexController: Add methods to stop tracking the Index
  ChangesTableView: Remove warning by casting to correct class

Conflicts:
	PBGitCommitController.m
2009-05-18 23:11:11 +01:00
Benjamin Kramer 6dcefe5bec Fix many gcc 4.2 compiler warnings 2009-05-18 23:08:51 +01:00
Pieter de Bie 4dfcc4d45d Trigger pre and post-commit hooks when committing
Based on a patch by Faustino Osuna <enrique.osuna@gmail.com>

A failure of the pre-commit hook (a non-zero
result from the hook) will cause the commit to
abort. A failure of the post-commit hook has no
effect of the rest of the operation, however, it
is noted in the user interface.

This fixes Lighthouse#50
2009-05-18 23:06:50 +01:00
Pieter de Bie b896ac0d56 Allow executing of hooks 2009-05-18 23:05:08 +01:00
Mike Czepiel 7e74efba0d Added very basic tag info menu item and alert.
Simply renders the tag message when activated.
This would also make sense being available in
the web view somewhere.
2009-05-18 22:55:27 +01:00
Arjen Laarhoven c6fbcccc02 GitX.xcodeproj: Quote paths in custom shell scripts
Properly quote the TARGET_BUILD_DIR variable in the script to prevent
failure when the project path contains spaces.
2009-05-18 22:53:38 +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 7ef15f9154 Update diffHighlighter test 2009-05-14 17:05:40 +01:00
Benjamin Kramer 7bf3043cd4 Don't compile plain ObjC files as ObjC++
They contain no C++ so we don't need to use the C++ compiler for them.
This should speed up the build process a little.
2009-04-29 12:30:57 +01:00
Benjamin Kramer 988b105455 Fix compilation with GCC 4.2
Also compiles fine with LLVM-GCC.
2009-04-29 12:30:29 +01:00
Pieter de Bie aeb5c4d8e1 IndexController: Temporarily stop tracking when (un)staging
This uses the new way to stop tracking the index when
adding files. This can be noticed when staging more than
one file, as the tables might have to refresh dozens
of times.
2009-04-28 16:39:27 +01:00
Pieter de Bie 91c11358f1 IndexController: Add methods to stop tracking the Index
This is useful when changing large portions of the index
at once, as refreshing the tables in those cases can
become a large burden.
2009-04-28 16:38:54 +01:00
Pieter de Bie d40af770f7 ChangesTableView: Remove warning by casting to correct class 2009-04-28 16:35:09 +01:00
Pieter de Bie 69838a4724 Merge branch 'stable'
* stable:
  Site: Create directory if it doesn't exist
  Project: Discover both long and short build number from git
  Site: Automatically read the latest version from the Release Notes
  Add releasenotes for 0.6.2
  PBRefController: Ask for confirmation when deleting tags/branches
  ApplicationController: Use a debug symbol that actually works
  Site/Rakefile: clean up code
  Site: Allow automagic generation of sparkle feed
  Site: Automagically generate release notes
  Move site template to subdir
  Split up release notes into individual files
2009-03-28 22:54:37 +00:00
Pieter de Bie 4ca9460a53 Site: Create directory if it doesn't exist 2009-03-28 22:54:29 +00:00
Pieter de Bie b7723a9545 Project: Discover both long and short build number from git
This uses the last git tag as version string and the 'git
describe' trick by Johannes for the buildnumber.
v0.6.2
2009-03-28 22:47:59 +00:00
Pieter de Bie 576337f7b6 Site: Automatically read the latest version from the Release Notes
I'm not sure if we should use the release notes here or rather
use the tags, but this follows other information on the site
like the "Release History", so at least it's internally consistent.
2009-03-28 22:39:45 +00:00
Pieter de Bie 12124338fc Add releasenotes for 0.6.2 2009-03-28 22:37:26 +00:00
Johannes Gilger 49a21e655f PBRefController: Ask for confirmation when deleting tags/branches
Show a very simple user-dialog when trying to delete a branch or a
tag.
This satisfies ticket #115.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-03-28 22:32:59 +00:00
Pieter de Bie 48b0fc8456 ApplicationController: Use a debug symbol that actually works 2009-03-28 22:27:30 +00:00
Pieter de Bie ee6486a33f Site/Rakefile: clean up code 2009-03-28 22:27:30 +00:00
Pieter de Bie 465f7f333a Site: Allow automagic generation of sparkle feed
We don't do this in the site generation phase
because it might mess things up seriously. We don't
want that! :)
2009-03-28 22:27:30 +00:00
Pieter de Bie 8c0fbaae9b Site: Automagically generate release notes 2009-03-28 22:27:30 +00:00
Pieter de Bie 728627cfdd Move site template to subdir 2009-03-28 22:27:30 +00:00
Pieter de Bie 8474bb4ef2 Split up release notes into individual files 2009-03-28 22:27:25 +00: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
Pieter de Bie b1fccb836e Add more defaults for handling Gists 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
Johannes Gilger 04c5c3a8cb GitX: CFBuildVersion as x.x.x.xx
We used the whole output of git describe before, not realizing that
neither MacOS nor Sparkle are ok with alphabetic characters but instead
want monotonically increasing integers. So now we just take the major
version number appended with the number of commits since the last tag.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-03-26 23:03:48 +00:00
Johannes Gilger 7e178bdd3e UserManual: Explain the concept of the Amend-button 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