Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3350208
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:45:32+00:00 2026-05-18T01:45:32+00:00

For the purposes of code review, after an existing source file is modified, we

  • 0

For the purposes of code review, after an existing source file is modified, we only review lines of code that have been changed in those source files.
After I make changes to source files in a repository, I must communicate the lines of code that have changed in a source file before we do our peer code reviews.

I am able to see a visual diff using WinMerge, and I am happy with what it does for me, but the only requirement for my co-workers is simply to know the file name and the line numbers that need to be reviewed.

Is there a way to get only the line numbers of a changed file? The types of files would be text source files, such as Javascript, Java, XML, XSL, etc.

Sample files–

foo (new version):

a
b
c
d
e
f
g
h
i
j
k

foo (old version):

a
b
C
d
h
i
k

The output I’m looking for:

foo: 3, 5-7, 10-11

OR

foo:
3
5-7
10-11

I’m sure that some program allows for this. I just can’t find one. Any suggestions? I’m currently using WinMerge, but any program that runs on Windows will be fine with me. It would be preferable if the software is open-source or freeware.

EDIT:
GNU DiffUtils is close to what I want, but not exactly fitting my needs. Looking at the command line options, I see “-q” (or “–brief”) as a simplified diff, but it’s TOO simple.
Output:

C:\Program Files\GnuWin32\bin>diff.exe -q foo1.txt foo2.txt
Files foo1.txt and foo2.txt differ

Normal diff output:

C:\Program Files\GnuWin32\bin>diff.exe foo1.txt foo2.txt
3c3
<     c
---
>     C
5,7d4
<     e
<     f
<     g
10,11c7
<     j
<     k
---
>     k
\ No newline at end of file

diff -u output:

C:\Program Files\GnuWin32\bin>diff.exe -u foo1.txt foo2.txt
--- foo1.txt    2010-11-09 15:47:12.447916000 -0600
+++ foo2.txt    2010-11-09 15:47:36.129954700 -0600
@@ -1,11 +1,7 @@
     a
     b
-    c
+    C
     d
-    e
-    f
-    g
     h
     i
-    j
-    k
+    k
\ No newline at end of file

I’m looking for something more informative than diff -q, but less informative than diff -u and diff. Any diff ninjas out there who are aware of different options to allow this?

I will always be comparing a new, recently modified file to an older one. I only need the things that need reviewing on the new file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:45:33+00:00Added an answer on May 18, 2026 at 1:45 am

    GNU DiffUtils is open source, free, and has a Windows port.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For the purposes of this question, the code base is an ASP.NET website that
For testing purposes I have to generate a file of a certain size (to
For the purpose of security-oriented source code review, I'm interested in finding (comprehensively) all
I have some code that uses JavaScript templates to create some HTML, including some
I have a django (Python) project that needs to know what version its code
I'd like to execute some code in my init file only if emacs server
I have some code here for a login system, that is purely or learning
What is the purpose of the code behind view file in ASP.NET MVC besides
For debugging purposes in a somewhat closed system, I have to output text to
for testing purposes i need an recursive directory with some files, that comes to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.