-
Notifications
You must be signed in to change notification settings - Fork 0
/
merge.txt
677 lines (571 loc) · 24.9 KB
/
merge.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
<!doctype html>
<html>
<head>
<title>Sublime Merge - Git Client, done Sublime</title>
<meta name="description" content="Sublime Merge is a new Git Client for Mac, Windows and Linux, from the makers of Sublime Text">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=480, user-scalable=yes">
<link href="https://fonts.googleapis.com/css?family=Lato:400,400i,700,700i|Roboto+Mono:400,700" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/merge_v2.css">
<link rel="icon" href="/favicon.ico">
<link rel="icon" size="64x64" href="/favicon.ico">
<script type="text/javascript">
var plat = 'windows'
if (/Mac OS X/.test(navigator.userAgent))
plat = 'osx'
else if (/Linux|FreeBSD/.test(navigator.userAgent))
plat = 'linux'
var arch = /WOW64|Win64|x86_64/.test(navigator.userAgent) ? '64' : '32'
document.documentElement.className += ' plat_' + plat + ' arch_' + arch
function byid(x)
{
return document.getElementById(x)
}
var scale = 1
function res()
{
scale = window.devicePixelRatio >= 1.3 && document.body.clientWidth > 1024 ? 2 : 1
return scale == 2 ? '@2x' : ''
}
</script>
<!--[if lt IE 9]>
<script>
var els = ['header', 'nav', 'section', 'main', 'article', 'aside', 'footer']
for (var i = 0; i < els.length; ++i)
document.createElement(els[i]);
</script>
<style>
header, nav, section, main, article, aside, footer {
display: block;
}
</style>
<![endif]-->
</head>
<body>
<header>
<section>
<a id="logo" href="/">
<img src="/images/logo.svg" alt="Sublime Merge">
</a>
<nav>
<a href="/download">Download</a>
<a href="https://www.sublimehq.com/store/merge">Buy</a>
<a href="/support">Support</a>
<span class="vr"></span>
<a href="https://www.sublimetext.com/blog/">News</a>
<a href="https://forum.sublimetext.com">Forum</a>
</nav>
</section>
</header>
<script>
var theme = 'dark'
var width = 1200
var height = 576
</script>
<div id="masthead">
<section>
<div class="tagline"><span>Git Client, done Sublime</span></div>
<div class="tagline minor"><span><i>Meet a new Git Client, from the makers of Sublime Text</i></span></div>
</section>
<section>
<div class="intro">
<div>
A snappy UI, three-way merge tool,<br>
side-by-side diffs, syntax highlighting, and more.
</div>
<div>
Evaluate for free – no account, tracking, or time limits.<br>
Interested? Read the <a href="https://www.sublimetext.com/blog/articles/sublime-merge">release announcement</a>.
</div>
</div>
<div class="download">
<div class="button">
<span class="win"><a href="https://download.sublimetext.com/sublime_merge_build_1119_x64_setup.exe">Download for Windows</a></span>
<span class="linux"><a href="/docs/linux_repositories">Install for Linux</a></span>
<span class="mac"><a href="https://download.sublimetext.com/sublime_merge_build_1119_mac.zip">Download for Mac</a></span>
</div>
<div class="current_version">Sublime Merge <i>(Build 1119)</i></div>
<a href="/download" class="other_platforms">Mac, Windows, and Linux</a>
</div>
</section>
<section class="screencast">
<div class="theme-selector">
<a id="theme-selector-dark" href="javascript:switch_theme('dark')">Dark</a>
<a id="theme-selector-light" href="javascript:switch_theme('light')">Light</a>
</div>
<script>
function update_theme_selector()
{
byid('theme-selector-light').className = theme == 'light' ? 'current' : ''
byid('theme-selector-dark').className = theme == 'dark' ? 'current' : ''
}
if (window.location.hash == '#light')
theme = 'light'
update_theme_selector()
</script>
<div class="wrap">
<!-- Transparent gif to fill space without broken image icon -->
<img id="screencast-title-bar" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">
<script>
function show_title_bar()
{
var bar = byid('screencast-title-bar')
bar.src = '/images/' + plat + '_title_bar' +
(plat == 'osx' && theme == 'dark' ? '_dark' : '') + res() + '.png'
bar.onload = function()
{
bar.style.backgroundColor = 'transparent'
}
}
show_title_bar()
</script>
<div id="anim_shell">
<div id="anim_container">
<canvas id="target" style="width: 1200px; height: 576px"></canvas>
<div id="fallback" style="width: 1200px; height: 576px"></div>
</div>
</div>
<div id="title-overlay" class="show"><div></div></div>
</div>
</section>
</div>
<main>
<section class="screencast-meta">
<div id="indicators">
<a href="javascript:jump_to(0)" id="indicator1">
<span class="jump"></span>
</a>
<a href="javascript:jump_to(1)" id="indicator2">
<span class="jump"></span>
</a>
<a href="javascript:jump_to(2)" id="indicator3">
<span class="jump"></span>
</a>
<a href="javascript:jump_to(3)" id="indicator4">
<span class="jump"></span>
</a>
</div>
<div class="buttons">
<a href="javascript:play()" class="button" id="button-play" title="Play">
<svg width="12" height="12" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
<title>Play</title>
<path d="M3 0v14l11-7z"></path>
<path d="M0 0h14v14H0z" fill="none"></path>
</svg>
</a>
<a href="javascript:pause()" class="button" id="button-pause" title="Pause">
<svg width="12" height="12" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
<title>Pause</title>
<path d="M1 14h4V0H1v14zm8-14v14h4V0h-4z"></path>
<path d="M0 0h14v14H0z" fill="none"></path>
</svg>
</a>
</div>
<div class="captions">
<div id="caption1">
<b>Commit Faster</b>
Stage Files, Hunks and Lines with no waiting - Sublime Merge is really, really fast.
</div>
<div id="caption2" style="display: none">
<b>Review Better</b>
Sublime Merge gives you to tools to breeze through code reviews:
Side by Side Diffs, Syntax Highlighting, Character Diffs. You can drag the top or bottom of a hunk to interactively show more context lines.
</div>
<div id="caption3" style="display: none">
<b>Search</b>
Instant search over your whole repository, as you type. Search by commit message, author, path and contents.
</div>
<div id="caption4" style="display: none">
<b>Resolve Conflicts</b>
Built-in merge tool allows for quick, painless resolution of merge conflicts
</div>
</div>
</section>
<script>
var captions =
[
byid("caption1"),
byid("caption2"),
byid("caption3"),
byid("caption4"),
]
var indicators =
[
byid("indicator1"),
byid("indicator2"),
byid("indicator3"),
byid("indicator4"),
]
var images = []
var target = byid('target')
var use_canvas = target && target.getContext
if (!use_canvas)
{
byid('target').style.display = 'none'
target = byid('fallback')
target.style.display = 'block'
}
function load_animation()
{
var script = byid('anim_script')
if (script)
script.parentNode.removeChild(script)
script = document.createElement('script')
script.setAttribute('src', 'screencasts/' + plat + '_' + theme + res() + '.js')
document.body.appendChild(script)
if (use_canvas)
{
target.width = scale * width
target.height = scale * height
}
}
load_animation()
if (window.matchMedia)
{
window.matchMedia('screen and (-webkit-min-device-pixel-ratio: 1.3) and (min-width: 1025px), ' +
'only screen and (-o-min-device-pixel-ratio: 13/10) and (min-width: 1025px), ' +
'only screen and (min-resolution: 120dpi) and (min-width: 1025px)').addListener(function(e)
{
show_title_bar()
load_animation()
})
}
function handle_resize(e)
{
target.style.height = Math.floor(target.clientWidth / width * height) + 'px'
}
handle_resize()
if (window.addEventListener)
window.addEventListener('resize', handle_resize, false)
else if (window.attachEvent)
window.attachEvent('onresize', handle_resize)
var cur_screencast = 0
var auto_cycle = true
function next()
{
auto_cycle = false
show_pause_button()
auto_next()
}
function auto_next()
{
cur_screencast = (cur_screencast + 1) % captions.length
transition()
}
function prev()
{
auto_cycle = false
show_pause_button()
auto_prev()
}
function auto_prev()
{
--cur_screencast;
if (cur_screencast < 0) cur_screencast = captions.length - 1
transition()
}
function jump_to(num)
{
while (num < 0)
num = captions.length + num
cur_screencast = num % captions.length
transition()
}
function switch_theme(t)
{
theme = t
if (window && window.history)
window.history.replaceState({}, '', t == 'light' ? '/#' + t : '/')
update_theme_selector()
show_title_bar()
load_animation()
}
var continuation = null
var start_time = null
var remaining_time = 0
var timer = null
function set_timeout(f, timeout)
{
start_time = new Date().getTime()
remaining_time = timeout
continuation = f
timer = window.setTimeout(f, timeout)
}
// Only run a callback once an animation frame is available, allowing
// the animation to be paused when in the background, etc
function sync_frame(f)
{
if (!window.requestAnimationFrame)
f()
else
window.requestAnimationFrame(f)
}
// Run a timeout synced to the animation frame
function sync_timeout(f, timeout)
{
set_timeout(function() { sync_frame(f) }, timeout)
}
function pause_timeout()
{
var elapsed = (new Date().getTime()) - start_time
remaining_time = Math.max(remaining_time - elapsed, 0)
window.clearTimeout(timer)
}
function continue_timeout()
{
start_time = new Date().getTime()
timer = window.setTimeout(continuation, remaining_time)
}
function show_play_button()
{
byid('button-pause').style.display = 'none'
byid('button-play').style.display = 'inline-block'
}
function show_pause_button()
{
byid('button-play').style.display = 'none'
byid('button-pause').style.display = 'inline-block'
}
function play()
{
show_pause_button()
continue_timeout()
}
function pause()
{
pause_timeout()
show_play_button()
}
var delay_scale = 0.7
var overlay = byid('title-overlay')
function display_error()
{
window.clearTimeout(timer)
continuation = null
if (use_canvas)
{
var ctx = target.getContext('2d')
ctx.clearRect(0, 0, target.width, target.height)
}
else
{
target.innerHTML = ''
}
overlay.getElementsByTagName('div')[0].innerHTML = '<i>Error loading screencast</i>';
overlay.className = 'show'
}
function update_meta()
{
for (var i = 0; i < captions.length; ++i)
{
captions[i].style.display = (i == cur_screencast) ? "block" : "none"
indicators[i].className = (i == cur_screencast) ? "active" : ""
}
var b_tags = captions[cur_screencast].getElementsByTagName('B')
if (b_tags.length > 0)
{
overlay.getElementsByTagName('div')[0].innerHTML = b_tags[0].innerHTML;
overlay.className = 'show'
}
}
function hide_overlay()
{
overlay.className = ''
}
function transition()
{
if (timer) window.clearTimeout(timer)
sync_frame(function() {
var img_url = animation_urls[cur_screencast]
var timeline = animation_timelines[cur_screencast]
var img = prep_animation(img_url, timeline,
animation_urls[(cur_screencast + 1) % captions.length])
sync_timeout(function()
{
hide_overlay()
animate(img, timeline, target, 0)
}, 2400)
})
}
function draw_canvas(img, element, frame, blits)
{
var ctx = element.getContext('2d')
for (j = 0; j < blits.length; ++j)
{
var blit = blits[j]
var sx = blit[0]
var sy = blit[1]
var w = blit[2]
var h = blit[3]
var dx = blit[4]
var dy = blit[5]
ctx.drawImage(img, sx, sy, w, h, dx, dy, w, h)
}
}
function draw_fallback(img, element, frame, blits)
{
if (frame == 0)
{
while (element.hasChildNodes())
element.removeChild(element.lastChild)
}
for (j = 0; j < blits.length; ++j)
{
var blit = blits[j]
var sx = blit[0] / scale
var sy = blit[1] / scale
var w = blit[2] / scale
var h = blit[3] / scale
var dx = blit[4] / scale
var dy = blit[5] / scale
var d = document.createElement('div')
d.style.position = 'absolute'
d.style.left = dx + "px"
d.style.top = dy + "px"
d.style.width = w + "px"
d.style.height = h + "px"
d.style.backgroundImage = "url('" + img.src + "')"
d.style.backgroundPosition = "-" + sx + "px -" + sy + "px"
d.style.backgroundSize = width + "px auto"
element.appendChild(d)
}
}
function draw(img, element, frame, blits)
{
if (use_canvas)
draw_canvas(img, element, frame, blits)
else
draw_fallback(img, element, frame, blits)
}
function animate(img, timeline, element, start_frame)
{
var i = start_frame;
var f = function()
{
var frame = i++ % timeline.length
var delay = timeline[frame].delay * delay_scale
var blits = timeline[frame].blit
draw(img, element, frame, blits)
var callback = f
if (i == timeline.length * 2 && auto_cycle)
callback = auto_next
sync_timeout(callback, delay)
}
if (timer) window.clearTimeout(timer)
sync_frame(f)
}
function prep_animation(img_url, timeline, preload_url)
{
var ready = function()
{
sync_frame(function() {
update_meta()
draw(images[img_url], target, 0, timeline[0].blit)
})
if (!(preload_url in images))
{
images[preload_url] = new Image()
images[preload_url].src = preload_url
}
}
if (img_url in images)
{
ready()
}
else
{
images[img_url] = new Image()
images[img_url].onload = ready
images[img_url].onerror = function()
{
delete images[img_url]
display_error()
}
images[img_url].src = img_url
}
return images[img_url]
}
</script>
<section>
<h2 class="love"><span>Feature Highlights</span></h2>
<div class="feature odd">
<h3>Integrated Merge Tool</h3>
<p>The <span class="feature">Integrated Merge Tool</span> allows you to resolve any merge conflicts directly in Sublime Merge, rather than having to open up your editor of choice.</p>
<p>Conflicts are presented with a 3-pane view. On the left are your changes and on the right are theirs. In the center pane is the resolved text, with buttons to choose between your changes or theirs. The same text editing functionality as Sublime Text is also available for more complicated merges.</p>
<p>Clicking on the header in the middle pane will switch between the editable merge results and the base file.</p>
<p>Use <span class="pc keys"><b>Ctrl</b><i>+</i><b>S</b></span><span class="mac keys"><b>⌘</b><i>+</i><b>S</b></span> or the <span class="menu">Save</span> button to save your merged file.</p>
</div>
<div class="feature even">
<h3>Powerful Search</h3>
<p>Use find-as-you-type search to dig up the exact commit you're looking for.</p>
<p>Search for commit messages, commit authors, file names, and wildcard patterns. Complex search queries can be constructed using <kbd>and</kbd>, <kbd>or</kbd> and <kbd>()</kbd> symbols.</p>
<p>For example <kbd>min-parents:2 author:jskinner path:tests/* (bug fix or test)</kbd> will search for a merge commit from jskinner inside the tests directory that contain the words "bug" and "fix" or the word "test".</p>
<p>You can open search with <span class="pc keys"><b>Ctrl</b><i>+</i><b>F</b></span><span class="mac keys"><b>⌘</b><i>+</i><b>F</b></span> or through the menu: <span class="menu">Navigate <img src="/images/right.svg" alt="▶"> Search</span>.</p>
</div>
<div class="feature odd">
<h3>Unmatched Performance</h3>
<p>Sublime Merge is built on the same custom platform as Sublime Text, providing unmatched responsiveness. With a powerful, cross-platform UI toolkit, an unmatched syntax highlighting engine, and a custom high-performance Git reading library, Sublime Merge sets the bar for performance.</p>
</div>
<div class="feature even">
<h3>Blame</h3>
<p>Open the <span class="feature">Blame</span> of a file through the <span class="feature">Command Palette</span> or when viewing a commit to see exactly which lines of the file were added by which commits.</p>
<p>Easily view the age, author, and commit hash of every line of code and see which lines come from the same commit with our commit color coding. Click a line in the gutter to highlight all other lines from the same commit.</p>
<p>The blame tool will also detect when a piece of code was moved from another place in your repository, so you can truly follow the history of your code.</p>
</div>
<div class="feature odd">
<h3>Advanced Diffs</h3>
<p>Where it makes sense we will show you exactly which individual characters have been changed for a commit.</p>
<p>This includes when you rename or move a file, when you're resolving conflicts or just viewing commit history.</p>
<p> Select any two commits in Sublime Merge with <span class="pc keys"><b>Ctrl</b><i>+</i><b>Left Mouse</b></span><span class="mac keys"><b>⌘</b><i>+</i><b>Left Mouse</b></span> to show the diff between them.</p>
</div>
<div class="feature even">
<h3>File and Hunk History</h3>
<p>From any file or hunk in the history use <span class="menu">… <img src="/images/right.svg" alt="▶"> File History</span> or the <span class="menu">Hunk History</span> button to view the full history of that source code. This will also follow any file moves or renames throughout the repository.</p>
</div>
<div class="feature odd">
<h3>Command Palette and Key Bindings</h3>
<p>Keyboard usage is important to us. Use <span class="keys"><b>Tab</b></span> to navigate through parts of the application, <span class="keys"><b>Space</b></span> to toggle expansion, and <span class="keys pc"><b>Enter</b></span><span class="keys mac"><b>Return</b></span> to stage/unstage hunks. When writing a commit message, use <span class="keys pc"><b>Ctrl</b><i>+</i><b>Enter</b></span><span class="keys mac"><b>⌘</b><i>+</i><b>Return</b></span> to commit.</p>
<p>The <span class="feature">Command Palette</span> is triggered by <span class="keys pc"><b>Ctrl</b><i>+</i><b>P</b></span><span class="keys mac"><b>⌘</b><i>+</i><b>P</b></span> and allows quick access to a large set of Git commands as well as other Sublime Merge functionality.</p>
</div>
<div class="feature even">
<h3>Light and Dark Themes</h3>
<p>Choose between a light and a dark theme to suit your tastes. You can preview these themes above.</p>
<p>Open the <span class="menu">Preferences <img src="/images/right.svg" alt="▶"> Preferences…</span> menu to change theme.</p>
<p>The dark theme is only available with a valid license key.</p>
</div>
<div class="feature odd">
<h3>Extensibility</h3>
<p>Just like Sublime Text, just about everything in Sublime Merge is extensible. Key bindings, menus, theming, and the command palette are all customizable with simple JSON files.</p>
</div>
<div class="feature even">
<h3>Syntax Highlighting</h3>
<p>Sublime Merge performs full syntax highlighting identically to Sublime Text for every line of code you see.</p>
<p>We'll even use any extra syntax definitions that we find in your Sublime Text installation for syntax highlighting!</p>
</div>
<div class="feature odd">
<h3>Command Line Integration</h3>
<p>Sublime Merge is designed to work hand in hand with the command line. All changes to the repository are updated live and everything works the same way whether it's triggered from the command line or the UI. Use the terminal where it makes sense and use the GUI where it works best.</p>
<p>Use the <tt>smerge</tt> tool that comes with Sublime Merge to interact with it from the command line: open repositories, blame files or search for commits</p>
</div>
<div class="feature even">
<h3>Real Git</h3>
<p>Sublime Merge uses the same terminology as Git, and doesn't make use of any state beyond Git itself. When you're working with Sublime Merge, you're working with Real Git, not a simplified version</p>
<p>You can also hover over most buttons to see which git command it will run.</p>
</div>
</section>
</main>
<footer>
<section>
© <a href="https://www.sublimehq.com">Sublime HQ Pty Ltd</a>
<p>Woollahra, Sydney.
</section>
</footer>
<!--[if lt IE 9]>
<script>
var logo_img = byid('logo').getElementsByTagName('IMG')[0]
logo_img.src = logo_img.src.replace('.svg', '.png')
</script>
<![endif]-->
</body>
</html>