Giter Site home page Giter Site logo

git_scripts's People

Contributors

crash5 avatar gkotian avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

pinkukr

git_scripts's Issues

git contribs throws ValueError

When git-contribs is run against a clone of the oh-my-zsh repository, it throws this:

➜  oh-my-zsh (master) > git contribs   
                  Name                      Commits    Lines Added    Lines Deleted
Marc Cornellà                                  421         8424           5422
Robby Russell                                  132         1177            629
Andrew Janke                                    82         7612           2716
...
...
...
Traceback (most recent call last):
  File "/home/gautam/play/git_scripts/git-contribs", line 57, in <module>
    num_additions, num_deletions, file_name = stats_entry.split('\t')
ValueError: not enough values to unpack (expected 3, got 1)

Validate list of files given on the command line

When running the git_add_gui.sh script, a user is free to enter any filename(s). These filenames are currently not validated. Instead, they should be checked against the files listed in the output of git diff --name-only, and only matching files should be added to the FILES_LIST array.
If any files are not added, the user should be informed accordingly.

Provide ability to review the current branch

If the user is in a git repository and launches the script without a branch name, then ask the user if the current branch should be reviewed.

TBD: what if there are modified files in the current working copy. Include them in the diff or not?

clone.py

Refuse to clone if the destination directory already exists.

Show commit summary at diff confirmation

Currently, the diff confirmation is displayed as:

Found 11 commits in branch test
    Press enter to diff commit 1 (031939c)
    Press enter to diff commit 1 (7238cd2)

It would be nice for the user to have a one-line commit summary like:

Found 11 commits in branch test
    Press enter to diff commit 1 (031939c) - Remove trailing whitespaces
    Press enter to diff commit 1 (7238cd2) - Fix method header comment

Files get staged unnecessarily

If the git_add_gui.sh script is run, but all diffs are simply quit after being launched (i.e. no changes are actually added for staging), then it is observed that files still get staged.
Then on running git diff --staged, no changes are actually reported. This unnecessary staging should not happen at all.

Provide ability to add a single file to the staging area

Currently the git_add_gui.sh script by default works on all modified files in the working copy. To add a single file, a user has to run the script, add the changes from the desired file, and manually exit the graphical diff of all the other files (without adding any changes from these other files).

Instead, the user should be able to specify which file(s) the script should consider for staging, much like how files can be given to git add when launching the command.

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.