Code Monkey home page Code Monkey logo

Comments (3)

juanpabloaj avatar juanpabloaj commented on July 20, 2024

I don't understand you question, you can put outputs.

PD: when you indent you text this is interpreted as source code

from git-prompt.

kuaf avatar kuaf commented on July 20, 2024

Sorry confuse you.
I am going through git-prompt.sh where you define below:

/^# Changed but not updated:/,/^# [A-Z]/ {
    s/^# Changed but not updated:/modified=modified;/p
    s/^#    modified:   '"$file_regex"'/    [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
    s/^#    unmerged:   '"$file_regex"'/    [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
}

/^# Changes not staged for commit:/,/^# [A-Z]/ {
    s/^# Changes not staged for commit:/modified=modified;/p
    s/^#    modified:   '"$file_regex"'/    [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
    s/^#    unmerged:   '"$file_regex"'/    [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
}

I am confused to the difference between them, i.e. Changed but not updated: and Changes not staged for commit:.
If files are staged, you change it later, you'll see the prompt with git status:

$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   README.mkd
#
no changes added to commit (use "git add" and/or "git commit -a")

I want to know where Changed but not updated: come from as per git workflow.

from git-prompt.

lvv avatar lvv commented on July 20, 2024

1st - in index but not committed
2nd - file is modified but not staged
See also git manual.

from git-prompt.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.