Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help requested to test git diffn, a git diff wrapper which shows line numbers, in the bash terminal in Git for Windows #2635

Closed
1 task done
ElectricRCAircraftGuy opened this issue May 25, 2020 · 10 comments
Labels

Comments

@ElectricRCAircraftGuy
Copy link

ElectricRCAircraftGuy commented May 25, 2020

  • I was not able to find an open or closed issue matching what I'm seeing

I just wrote git diffn, and need some help testing it since I don't have Windows. If someone can try it out please, I need to know if it works and a full set of install instructions. Start with my writeup and install instructions here: https://stackoverflow.com/questions/24455377/git-diff-with-line-numbers-git-log-with-line-numbers/61997003#61997003

I think it's pretty useful and I'm pretty excited about it. Check this out. It shows line numbers!

git diffn screenshot

It relies on gawk, but if gawk doesn't work in the Git for Windows bash terminal I can make some modifications I think and make it work with regular awk.

@dscho
Copy link
Member

dscho commented May 25, 2020

Note: this ticket is not about any bug in Git for Windows.

@ElectricRCAircraftGuy
Copy link
Author

ElectricRCAircraftGuy commented May 25, 2020

That's right. It's a request of mine to see if a tool I wrote will work in Git For Windows, but I don't have Windows to test it.

@ElectricRCAircraftGuy
Copy link
Author

Ignore that close. Stray button press on my phone.

@chrisbra
Copy link

FWIW: git diffn work on my git-for-windows version 2.26.0
It is actually quite nice. Thanks for that!

@ElectricRCAircraftGuy
Copy link
Author

Nice! Can you detail your install instructions?

Ideally I'd like to document how to install it well enough a 12 yr old could follow. Think: Arduino or Adafruit level detail. But, any level of detail is better than nothing.

@rimrul
Copy link
Member

rimrul commented May 26, 2020

The installation should just be what you call option 2 on Stackoverflow (modified to use curl, due to missing wget).

Open Git-Bash, execute the following commands:


mkdir -p ~/bin
cd ~/bin
curl https://raw.githubusercontent.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/master/useful_scripts/git-diffn.sh > git-diffn

@chrisbra
Copy link

chrisbra commented May 26, 2020

Well, it's a bit off topic for GFW issue tracker, but here is what I did
I copied your https://raw.githubusercontent.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/master/useful_scripts/git-diffn.sh to ~/bin/git-diffn, chmod +x it, and followed your example from the stackoverflow page.

I also tried briefly with a couple of git diff parameters and it worked, however I noted a problem. If I use this color configuration:

git config color.diff.meta "blue"
git config color.diff.old "black red strike"
git config color.diff.new "black green italic"
git config color.diff.context "yellow bold"

Then run in that repo git diffn I get nicely colored output, except for the : (colon). That looks odd.
grafik

@ElectricRCAircraftGuy
Copy link
Author

Then run in that repo git diffn I get nicely colored output, except for the : (colon). That looks odd.

@chrisbra , that was intentional. It helps me visually separate between the added number column on the left and the original git diff output on the right. I thought it looked better that way. Otherwise I found myself sometimes struggling to see what was what.

@PhilipOakley
Copy link

Then run in that repo git diffn I get nicely colored output, except for the : (colon). That looks odd.

that was intentional. It helps me visually separate between the added number column on the left and the original git diff output on the right. I thought it looked better that way. Otherwise I found myself sometimes struggling to see what was what.

Sounds like something to document as a key feature 😉

@rimrul
Copy link
Member

rimrul commented May 12, 2021

I'm closing this issue now, because there hasn't been any more feedback in almost a year and it's become quite burried under other issues.

@rimrul rimrul closed this as completed May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants