From 58990fc318273f8c8d23e15f0e096ed1014f781e Mon Sep 17 00:00:00 2001 From: Johannes Gilger Date: Sat, 21 Feb 2009 22:29:36 +0100 Subject: [PATCH 1/3] diffHighlighter: Fix indent-after-stagebutton bug - display context lines in own
. - Stagebutton no longer is float: left. This fixes ticket #104 Signed-off-by: Johannes Gilger --- html/lib/diffHighlighter.js | 2 +- html/views/commit/commit.css | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/html/lib/diffHighlighter.js b/html/lib/diffHighlighter.js index fbc32a8..cc06fc8 100644 --- a/html/lib/diffHighlighter.js +++ b/html/lib/diffHighlighter.js @@ -214,7 +214,7 @@ var highlightDiff = function(diff, element, callbacks) { } else if (firstChar == " ") { line1 += ++hunk_start_line_1 + "\n"; line2 += ++hunk_start_line_2 + "\n"; - diffContent += l + "\n"; + diffContent += "
" + l + "
"; } } diff --git a/html/views/commit/commit.css b/html/views/commit/commit.css index 18d6a2e..268109d 100644 --- a/html/views/commit/commit.css +++ b/html/views/commit/commit.css @@ -61,7 +61,6 @@ table.diff { } .diff a.stagebutton { - display: block; width: 40px; padding: 0 2px 0 2px; margin-bottom: 4px; @@ -77,7 +76,6 @@ table.diff { text-align: center; -webkit-border-radius: 2px; - float: left; } #multiselect { @@ -94,4 +92,4 @@ table.diff { border: 5px solid #EEE; margin: -5px; padding-left: 20px; -} \ No newline at end of file +} From 51478449ecff911e86436ebee04002c047ebc0e5 Mon Sep 17 00:00:00 2001 From: Johannes Gilger Date: Sat, 21 Feb 2009 23:02:14 +0100 Subject: [PATCH 2/3] 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 --- html/lib/diffHighlighter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/lib/diffHighlighter.js b/html/lib/diffHighlighter.js index cc06fc8..0ced30f 100644 --- a/html/lib/diffHighlighter.js +++ b/html/lib/diffHighlighter.js @@ -203,7 +203,7 @@ var highlightDiff = function(diff, element, callbacks) { header = false; } - if (m = l.match(/@@ \-([0-9]+),\d+ \+(\d+),\d+ @@/)) + if (m = l.match(/@@ \-([0-9]+),?\d* \+(\d+),?\d* @@/)) { hunk_start_line_1 = parseInt(m[1]) - 1; hunk_start_line_2 = parseInt(m[2]) - 1; From 3e21d041efb95b6358c749e021bf5ddbcc05bcd7 Mon Sep 17 00:00:00 2001 From: Johannes Gilger Date: Sat, 21 Feb 2009 23:38:11 +0100 Subject: [PATCH 3/3] 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 --- Info.plist | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Info.plist b/Info.plist index 5e6e411..f2a937b 100644 --- a/Info.plist +++ b/Info.plist @@ -8,6 +8,16 @@ ${PRODUCT_NAME} CFBundleDocumentTypes + + CFBundleTypeExtensions + + * + + CFBundleTypeRole + None + CFBundleTypeName + Standard folder + CFBundleTypeExtensions