profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/OJFord/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Oliver Ford OJFord London, UK https://cv.ojford.com Electronic & Information Engineer; currently data & services for AgTech; previously cloud services for the Internet of Things.

crate/helm-charts 5

Helm charts for Kubernetes

OJFord/docker-mergerfs 2

https://github.com/trapexit/mergerfs in docker @

OJFord/arch2-2014-cw2 1

Cache simulator for EIE2 Computer Architecture

OJFord/docker-gocryptfs 1

https://github.com/rfjakob/gocryptfs in docker @

OJFord/docker-snapraid 1

https://github.com/amadvance/snapraid in docker @

OJFord/gitsh 1

An interactive shell for git

OJFord/ale 0

Check syntax in Vim asynchronously and fix files, with Language Server Protocol (LSP) support

OJFord/alexa-monzo 0

Monzo Skill for the Amazon Alexa

OJFord/arch2-2014-cw1 0

MIPS simulator for EIE2 Computer Architecture

OJFord/Awesome-CV 0

Upstream + compiling on latest packages + working fontawesome (v5)

release OJFord/terraform-provider-android

v0.4.1

released time in 4 days

startedOJFord/loginitems

started time in 5 days

startedroshanlam/ReadMeTemplate

started time in 8 days

Pull request review commentso-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

 sub do_dsf_stuff {  		####################################################################### +		########################+		# Look for commit line #+		########################+		if ($line =~ /^${ansi_color_regex}commit [0-9a-f]{40}/) {+			print_commit_box($line); 		#################################################################### 		# Look for git index and replace it horizontal line (header later) # 		####################################################################-		if ($line =~ /^${ansi_color_regex}index /) {-			# Print the line color and then the actual line-			$meta_color = $1 || get_config_color("meta");

Got it! We lost this optimization as I refactored this code into the print_file_change_box function. I can bring the optimization back. Please let me know if you rather have it back.

ericbn

comment created time in 9 days

pull request commentso-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

Done. The changes depend on eb4a5e7 (Don't include ansi color codes in file1 and file2), which was merged to master, but not to next. So I cherry cherry-picked the commit here.

ericbn

comment created time in 9 days

pull request commentso-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

Hi @scottchiefbaker, sure! Let me rebase it.

ericbn

comment created time in 9 days

pull request commentso-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

Several of the things you fixed are already fixed on next. All PR should be based against that branch. Can you redo this PR to target the correct branch.

ericbn

comment created time in 9 days

Pull request review commentso-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

 sub do_dsf_stuff {  		####################################################################### +		########################+		# Look for commit line #+		########################+		if ($line =~ /^${ansi_color_regex}commit [0-9a-f]{40}/) {+			print_commit_box($line); 		#################################################################### 		# Look for git index and replace it horizontal line (header later) # 		####################################################################-		if ($line =~ /^${ansi_color_regex}index /) {-			# Print the line color and then the actual line-			$meta_color = $1 || get_config_color("meta");

This is by design... to get a config color requires shelling out to bash (slow). So we attempt to get the color from the diff output first, and if it's not there, falling back to checking the config.

ericbn

comment created time in 9 days

Pull request review commentso-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

 sub do_dsf_stuff {  		####################################################################### +		########################+		# Look for commit line #+		########################+		if ($line =~ /^${ansi_color_regex}commit [0-9a-f]{40}/) {+			print_commit_box($line); 		#################################################################### 		# Look for git index and replace it horizontal line (header later) # 		####################################################################-		if ($line =~ /^${ansi_color_regex}index /) {-			# Print the line color and then the actual line-			$meta_color = $1 || get_config_color("meta");

This was causing the value of $meta_color to actually be the value of $1 (the capture group of the regexp) instead of the value from the configuration.

ericbn

comment created time in 11 days

Pull request review commentso-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

 sub do_dsf_stuff { 				$last_file_seen = $file_2; 			} -			# Print out the top horizontal line of the header-			print $reset_color;-			print horizontal_rule($meta_color);--			# Mercurial coloring is slightly different so we need to hard reset colors-			if ($is_mercurial) {-				print $reset_color;-			}

horizontal_rule was already printing $reset_color at the end of the line, so an extra $reset_color here was redundant.

ericbn

comment created time in 11 days

Pull request review commentso-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

 sub get_less_charset { 		} 	} -	return ();+	return ("", "");

diff-so-fancy was failing with Use of uninitialized value $less_charset in pattern match (m//) at diff-so-fancy line 524 in the case where () was being returned to should_print_unicode.

ericbn

comment created time in 11 days

Pull request review commentso-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

 set_env() {  # applying colors so ANSI color values will match # FIXME: not everyone will have these set, so we need to test for that.-git config color.diff.meta "227"+git config color.diff.meta "yellow bold"

Tests expect the "meta" color to be \e[1;33 (yellow bold).

ericbn

comment created time in 11 days

pull request commentso-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

This is how it looks like:

Before / After

Screen Shot 2021-02-19 at 20 23 56

ericbn

comment created time in 11 days

PR opened so-fancy/diff-so-fancy

Draw box around file and ruler around commit lines

The diff-so-fancy.rulerWidth config still applies, but to the ruler around the commit line. File lines have a box around them with just the size of the file name and prefixes/suffixes (e.g. modified: diff-so-fancy).

This allows for a better hierarchical view of commits, with commit lines having a configurable wider ruler around them and file lines ("children" of commits) having a shorter box around them.

+54 -60

0 comment

1 changed file

pr created time in 11 days

issue commentso-fancy/diff-so-fancy

Git add --patch does not use diff-so-fancy

Is a npm release planed?

mrageh

comment created time in 12 days

created tagOJFord/docker-mergerfs

tagv2.32.4-1

https://github.com/trapexit/mergerfs in docker @

created time in 18 days

push eventOJFord/docker-mergerfs

Oliver Ford

commit sha 129856796058dbe654c808a3f5f74d4ba88448b9

Bump mergerfs to v2.32.4

view details

push time in 18 days

created tagOJFord/docker-mergerfs

tagv2.32.3-1

https://github.com/trapexit/mergerfs in docker @

created time in 19 days

push eventOJFord/docker-mergerfs

Oliver Ford

commit sha cb94b7ccfc429633b0ff3e37420c9d7c5a920312

Bump mergerfs to v2.32.3

view details

push time in 19 days

push eventso-fancy/diff-so-fancy

Martijn Engler

commit sha f65cbdf84db4c21ee43ab25cc9a937b697fd34da

Add info about using dsf as a "normal" diff tool diff-so-fancy is great for git of course, but it's also very nice to use for just normal diffs between two files Fixes #328

view details

Martijn Engler

commit sha 7cd8f4cf66e9dfa0b7b3478debe059613152b4ff

Fix potential issue in dsf alias with spaces If there are no quotes around the arguments the dsf alias won't work with spaces when used in bash. (Does seem to work in zsh.) Goes to issue #328 / PR #358

view details

Philippe Blain

commit sha b67fe5ec6eb912043cd741d29a6ebf1561e844b2

docs: add 'color.diff.func' color to README The color for hunk headers (`color.diff.func`) is hardcoded in the script, and is not mentioned in the "Improved colors for the highlighted bits" section of the README. Add it there so that function headers with or without diff-so-fancy use the same color configuration.

view details

Scott Baker

commit sha e89694ddf5f602c3cbc11be779d121d47ee91c31

Merge pull request #356 from phil-blain/doc-improvements docs: add 'color.diff.func' color to README

view details

Sam Sudar

commit sha 5391296dad26fd0b175cfe18688c085d58747d8a

Add pro-tip about hg diff

view details

Scott Baker

commit sha 11249af5236be15650a5bd82c14f4ba7e299fdf3

Merge pull request #382 from srsudar/add-hg-diff-to-protips Add pro-tip about hg diff

view details

Jonathan Wren

commit sha 4f5a0e289d09c0bd999578f60bcc865d439f04fa

Fix inconsistently placed color reset codes Sometimes the reset code ended up on a line by itself, and caused issues with total number of lines (important for `git add --patch`).

view details

Jonathan Wren

commit sha 13d3f8949e15dd62f6b49bc652fe94af6a9bfc79

Add a patch mode for `git add --patch` In this new patch mode, every time a line is consumed, we print out an empty line in its place. This keeps the same number of lines in the output, and appeases git.

view details

Scott Baker

commit sha e178338cf0a6739fa5d9eeacf98d380679410b37

Merge branch 'patch-mode-35' of https://github.com/wren/diff-so-fancy into next

view details

Jonathan Wren

commit sha 8d4ef03ac848c3c383a9e7e1ef4a659172ae0bcc

update usage for new flag

view details

Jonathan Wren

commit sha ed24bc15b1e789f7c7304898016f255588e95c96

fix typo per pr review

view details

Scott Baker

commit sha 46bc6906dcaa74ce8fdd4c8d03deeb6fa87eb2b2

Merge branch 'patch-mode-35' of https://github.com/wren/diff-so-fancy into next

view details

Scott Baker

commit sha 7d261466f591840a0c5ac9e75c580f6c1f683c03

Add the `--patch` mode stuff to the README

view details

Scott Baker

commit sha 9eb28170e3187ce77c41df97e698d3fba2b1c52d

Bump the version

view details

Jonathan Wren

commit sha 8a8f8272a6251052f584ca19db9470782aabea27

Include new files in patch mode It turns out that new files can be part of `git add --patch` by using `git add --intent-to-add` on them first.

view details

Scott Baker

commit sha ac392fac5d7fdac0ed190c8de2af8fb2598f61c8

Merge pull request #392 from wren/patch-intent-35 Include new files in patch mode

view details

Scott Baker

commit sha 5dc67382ba867881aeb2ea84a976957ce97c0679

Feature: Add a --debug option to help troubleshooting

view details

Scott Baker

commit sha 7792d3f1cf9368a6e7ee68068c30a8c4775d7ea3

Merge branch 'next' of github.com:so-fancy/diff-so-fancy into next

view details

Scott Baker

commit sha d96b105b7cc297d11e1a93cabc00dc498018c717

Include the charset LESS uses in --debug

view details

Scott Baker

commit sha 75587c6115cdda03adb2c288a14b805ebd29527c

Further expand --debug

view details

push time in 19 days

issue commentso-fancy/diff-so-fancy

Git add --patch does not use diff-so-fancy

@nthapaliya I don't maintain the fatpack version anymore because so few people use it. It's pretty easy to clone the whole repo and use it directly so the fatpacked version wasn't the best use of my time.

That said I did a one-off and updated the release to include a fatpacked binary just for you. It will probably be the last time though.

The code to build a fatpacked version is in third_party/build_fatpack so you can build your own.

mrageh

comment created time in 19 days

issue commentso-fancy/diff-so-fancy

Git add --patch does not use diff-so-fancy

Should the Git configuration / setup of the --patch mode be documented in the readme?

mrageh

comment created time in 19 days

issue commentso-fancy/diff-so-fancy

Git add --patch does not use diff-so-fancy

FYI macos users: the Homebrew version is here :)

mrageh

comment created time in 19 days

issue commentso-fancy/diff-so-fancy

Git add --patch does not use diff-so-fancy

Please update the fat-packed versions as well!

mrageh

comment created time in 19 days

startedOJFord/loginitems

started time in 20 days

issue commentso-fancy/diff-so-fancy

mismatched output from interactive.diffFilter on fresh install

I believe this should be fixed since we added --patch mode.

lizkaraffa

comment created time in 20 days

issue commentso-fancy/diff-so-fancy

mismatched output from interactive.diffFilter on fresh install

Is this issue fixed now that #35 is closed?

lizkaraffa

comment created time in 20 days

issue closedso-fancy/diff-so-fancy

Git add --patch does not use diff-so-fancy

Hi

Not sure if this is the correct place for this issue.

Just started using this npm package and it's great, it makes reading diffs in my terminal great.

However when I use git add --patch it uses the old style diff to display each chunk that's about to be staged.

Is git add --patch not supposed to use diff under the hood, which is now diff-so-fancy?

Is there anything we can do to use diff-so-fancy with git add --patch?

Thanks

closed time in 20 days

mrageh

issue commentso-fancy/diff-so-fancy

Git add --patch does not use diff-so-fancy

I'm going to close this issue because I just released v.1.4.0 which should address this.

If issues come up related to --patch mode let's start a new issue.

mrageh

comment created time in 20 days

release so-fancy/diff-so-fancy

v1.4.0

released time in 20 days