Hesse / gitgpt

A natural language command line git assistant
192 stars 11 forks source link

Natural way to refer to files #4

Open gleb-roma opened 1 year ago

gleb-roma commented 1 year ago

After you get a status, you typically see something like this:

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   ope/logit_modularized_clean_new_feature_panel/source.py

I want to say gitgpt what are changes in the first modified file

It suggests

git diff HEAD~1 <filename> [y/N] y
sh: -c: line 2: syntax error near unexpected token `newline'
sh: -c: line 2: `git diff HEAD~1 <filename>'
Error: exit status 2

(doesn't work)

What I expect is git diff ope/logit_modularized_clean_new_feature_panel/source.py

Hesse commented 1 year ago

@gleb-roma, yeah, that's an interesting one. I just tried it and got a different response. I would expect something like, git diff <filename>.

When you do something like: `gitgpt show the changes for a given file Would you like to run the following command:

git diff [y/N]`

But I get it, it's not exactly natural.