Commit Graph

595 Commits

Author SHA1 Message Date
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
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
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
Benjamin Kramer 6dcefe5bec Fix many gcc 4.2 compiler warnings 2009-05-18 23:08:51 +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
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 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 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
Pieter de Bie f3c131ecde Display revision in the About Dialog
We do this by preprocessing the Info.plist file
and adding a prefix header with the current revision
#define'd. This seems to be the most reliable way,
unfortunately
2009-03-24 15:00:38 +00:00
Pieter de Bie af40162a83 gitx CLI: Add option to find git path 2009-03-24 14:55:15 +00:00
Pieter de Bie b4d93988ed Use DWARF symbols for Release build
This should ship binaries with debugging symbols in them.
I'm not sure if there's a negative side effect somewhere,
but this should make parsing the crash logs a lot easier :)
2009-03-24 01:12:36 +00:00
Johannes Gilger f4f505c25e PBGitCommitController: Fix unstaging of last hunk
When unstaging the last cached hunk of a file, the file remained in the
"Staged Changes" column, with the notice "This file has no more changes"
and the "Unstage"-button remaining in the diff-view.

This fixes this behaviour by correctly distinguishing files in the
files-array not only by filename but also by unstaged/cached status,
s.t. for a file with unstaged and cached changes, there are two entries
in the files-array.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-03-24 00:48:25 +00: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
Nick Zitzmann 8a6d55dbfe Add a "New..." option to the Main Menu to create a local
repository
2009-03-24 00:36:46 +00:00
Pieter de Bie c70eff74e8 IndexController: Use diff-files instead of diff
Apparently this fixes some issue for Vincent Kergonna.
I hope this helps! :)
2009-03-24 00:25:20 +00:00
Pieter de Bie e2e868da5d Redo the changes from 55d57ba076
This commit apparently corrupted the Preferences file.
I fixed it by taking the earlier version and manually adding
the changes again.
2009-03-23 23:54:54 +00:00
Pieter de Bie d38c195149 Fix moving of refs
This was seriously broken after we moved to a hash
to store the refs in ddc9ae7654. Apparently nobody
noticed this earlier.

We fix it by doing the right thing. Don't remove the array
if it's empty, but check in the drawing if we really have refs.
2009-03-23 23:33:43 +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
Michael Stephens b48469da93 Fix saving tree to folder 2009-03-23 23:01:51 +00:00
Pieter de Bie 2b8d378f13 Index: Don't rearrange on every object
We used to change the PBFile status every time we found a 
similarly named file. Because the unstagedFilesController
had a filter and sort predicate for these, the array was
rearranged every time an existing file was found. This quickly
leads to stalling.

We fix it by temporarily disabling the automatic rearranging
and then reenabling it when we're finished.
2009-03-23 22:43:48 +00:00
Johannes Gilger 3e21d041ef Info.plist: Make GitX open any file/folder on drop
This extends the Info.plist, allowing any file/folder to be dropped onto
the GitX dock-icon.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-02-21 23:38:11 +01:00
Johannes Gilger 51478449ec diffHighlighter: Correctly match unified diff hunks
Hunks in unified diffs are usually in the form of @@ -a,b +x,y @@, but
sometimes the ,b (i.e. the range) can be ommitted, in which case our
code didn't match the hunk-header at all, resulting in line-numbers
off-by-one in commit-view.

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
2009-02-21 23:02:14 +01: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
Johannes Gilger b18d9af2aa ApplicationController: Make sure gitx installation-path exists
When trying to install the gitx symlink into /usr/local/bin, GitX would
fail if the directory /usr/local/bin didn't exist yet. We simply call
mkdir -p in advance, which only creates the directory if doesn't exist.
2009-02-08 13:33:16 +01:00
Johannes Gilger 308a5af02f diffHighlighter: Empty diffs and mode-changes
When there is no diff to display (i.e. empty-file mode-changes, deletion
or creation) we don't draw a diff-box (div) but just list the filename.

Also fixes a bug with mode-changes not displaying new-mode.
2009-02-07 16:31:03 +01:00
Johannes Gilger f23b3c498f diffHighlighter: Display removed, but empty, plain-text files 2009-02-07 15:04:41 +01:00
Johannes Gilger 20b5fa6214 diffHighlighter: Display created, but empty, plain-text files
Plain-text files which have been created are not diffed against
/dev/null, but have a "new file mode" line. This patch catches this case
and also highlights that the control-flow in diffHighlighter is less
than optimal.
2009-02-07 13:47:06 +01:00
Johannes Gilger 06f675b899 PBGitWindowController: Default to historyViewController for bare repo
If the repository we're working on is bare and through some default
value we are asked to display the commit-view, we simply change it back
to history.
2009-02-06 21:09:03 +01:00