These are mostly copies from PBGitIndexController, and
they can be refactored to a common method. I'm not sure of a name
for that yet, so I'll keep it like this for now :)
It's very difficult to determine whether or not we have a path specifier.
Because it's so difficult, it's better to just always run --children. A quick
test indicates that it doesn't matter much in run-time, and it's better to be
conservative in what we accept than to show bogus lines because the children
haven't been rewritten.
Some people have had Serif-fonts in their interface where no specific
fonts for classes/ids were specified. This sets the default-font to
'Lucida Grande' in order to have a nice non-serif on any system.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This uses the same mechanisms as git to determine whether a file is
binary: By simply searching the first 8000 bytes for a 0-byte. This
gets rid of the call to "file" and is a much cleaner and shorter
implementation.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
Git 1.6.0 was released over a year ago now, so it shouldn't be too hard
to get people to upgrade to that. We need 1.6.0 for the --children revlist
option.
Requiring Git 1.6.0 or higher means we can also revert
a94981f35 (RevList: Don't rely on the presence of %x00) sometime.
This patch prevents the plaintext display of files with binary content
in tree-view by connecting the content to the textContents attribute.
PBGitTree is extended with the method textContents, which returns the
textual representation of a PBGitTree-object. The methods first checks
the output of "git check-attr binary <file>" to see if the user
set/unset the binary attribute manually. Then it checks for common
binary file-extensions. If this method can't determine whether the file
is binary, the file-content is loaded and Unix "file" is run on the
first 100 bytes of the file to make a decision.
It also adds the -[PBGitTree fileSize] method to check the size
of the file before actually loading its contents.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
Edited-by: Pieter de Bie <pdebie@ai.rug.nl>
* pu/jg/docs:
Update releasenotes, as autorefresh won't make it into 0.7
ReleaseNotes for v0.7 with author information
Site: W3C-Valid and CSS/HTML corrections
UserManual: Rewrite most parts for GitX 0.7
GitX 0.7 Release-Notes
UserManual: Add disclaimer as to what GitX is
Conflicts:
Site/UserManual/text/01 - Introduction.markdown
Include Dave's reload feature and author-information for the most
important parts. Also a list of contributors since v0.6.3 from the
shortlog.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
* Makes all the pages (except "See it") W3C Valid
* Adjusts a few texts here and there a little bit
* Makes the menubar span the whole div and display correct on FF/Linux
* Moves "GitX" in the header a few px down to center it
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This patch adds a CFBundleGitRevision key to Info.plist which is set to
the output of "git describe" when building.
The menu-entry for "About GitX" was reconnected to a custom method in
the AppController, which reads the CF-string from the .plist and also
indicates if the build is a DEBUG-build.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This rewrites most of the UserManual for GitX 0.7 and also updates the
screenshots to reflect the latest GitX-version.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
Add a disclaimer about the intended use of GitX. A lot of people seem to
think GitX is a way to make using a complex system easy. Other think
that they can learn git by clicking their way around GitX.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
This prepares the GitX 0.7 release-notes and also fixes two small bugs
in the previous notes.
It also fixes a CSS-bug which makes the gitx-website display the same
font with Firefox and Safari instead of using a serif with FF.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
Add a disclaimer about the intended use of GitX. A lot of people seem to
think GitX is a way to make using a complex system easy. Other think
that they can learn git by clicking their way around GitX.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
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>
This issues a simple reloadRefs when refreshing the commit-view, keeping
the current branchname up-to-date here as well.
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>