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

  • SEARCH
  • Home
  • 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 7719595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:27:17+00:00 2026-06-01T03:27:17+00:00

This question calls for "line numbers". If you do not care about line numbers

  • 0

This question calls for "line numbers". If you do not care about line numbers in the output, see this question and answer.


Basically, I don’t want to see the changed content, just the file names and line numbers.

  • 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-06-01T03:27:18+00:00Added an answer on June 1, 2026 at 3:27 am

    Note: if you’re just looking for the names of changed files (without the line numbers for lines that were changed), see another answer here.


    There’s no built-in option for this (and I don’t think it’s all that useful either), but it is possible to do this in Git, with the help of an "external diff" script.

    Here’s a pretty crappy one; it will be up to you to fix up the output the way you would like it.

    #! /bin/sh
    #
    # run this with:
    #    GIT_EXTERNAL_DIFF=<name of script> git diff ...
    #
    case $# in
    1) "unmerged file $@, can't show you line numbers"; exit 1;;
    7) ;;
    *) echo "I don't know what to do, help!"; exit 1;;
    esac
    
    path=$1
    old_file=$2
    old_hex=$3
    old_mode=$4
    new_file=$5
    new_hex=$6
    new_mode=$7
    
    printf '%s: ' $path
    diff $old_file $new_file | grep -v '^[<>-]'
    

    For details on "external diff", see the description of GIT_EXTERNAL_DIFF on the Git manual page (around line 700, pretty close to the end).

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

Sidebar

Related Questions

This question is about Why does autoboxing make some calls ambiguous in Java? But
This is basically a question about the lifetime of temporaries. If a function returns
Long-delayed update I'm accepting MUG4N's answer to this question, and I also want to
Where are some lists of system calls on UNIX? This wasn't my original question,
I'm not sure what to call this question, since it involves a variety of
This question came about because the cells gem specifies template directories using File.join('app','cells'). That
This question relates closely to the stack overflow question " window.resize event firing in
This is a follow up question from here . Where I want do go
I'm rewritting my Textarea Line Count plugin (<-- shameless plug), and have this question:
This answer to Command line command to auto-kill a command after a certain amount

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.