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>
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>
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
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 :)
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>
* commit '3e21d041efb95b6358c749e021bf5ddbcc05bcd7':
Info.plist: Make GitX open any file/folder on drop
diffHighlighter: Correctly match unified diff hunks
diffHighlighter: Fix indent-after-stagebutton bug
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.
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.
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>
- display context lines in own <div>.
- Stagebutton no longer is float: left.
This fixes ticket #104
Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
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.
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.
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.
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.
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.
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.
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"
The WebKit delegate method didStartProvisionalLoadForFrame:
is not called when reloading the frame. This caused the
webviews to appear empty.
We fix it by using a delegate method which is called each
reload, as suggested by weinig in #webkit.
This fixes Lighthouse bug #81.
The %x00 pretty specifier was only added in git v1.5.6.
This is quite new, so we try to support older git clients in
GitX (v1.5.4 and up). In order to do this, we need to use another
specifier.
Unfortunately, we can't use a real \0 in our argument, as that just
cuts off our argument string. So we get the next best thing -- we use
\01 :).
Some while ago, gitx changed its homepage from
frim.nl/gitx to gitx.frim.nl, and in the process the user
manual was moved. Though there is still a redirect in place,
it's nicer for the user if we go to the correct page at once.
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
* '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
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.
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.