librelist archives

« back to archive

git_status_file with untracked files

git_status_file with untracked files

From:
Dan Petitt
Date:
2013-03-28 @ 23:41
Hi

I am trying to get a status of files in my working directory and it seems 
that untracked files are returning GIT_ENOTFOUND (-3) instead of returning
GIT_OK and a status that indicates an untracked file.

Strangely I notice an issue that supposedly fixed this 10 months ago but I
am not seeing the expected results:
https://github.com/libgit2/libgit2/issues/728

Am I using this wrong?

Thanks
Dan

Re: [libgit2] git_status_file with untracked files

From:
Carlos Martïn Nieto
Date:
2013-03-30 @ 03:59
On Thu, 2013-03-28 at 23:41 +0000, Dan Petitt wrote:
> Hi
> 
> I am trying to get a status of files in my working directory and it 
seems that untracked files are returning GIT_ENOTFOUND (-3) instead of 
returning GIT_OK and a status that indicates an untracked file.
> 
> Strangely I notice an issue that supposedly fixed this 10 months ago but
I am not seeing the expected results:
> https://github.com/libgit2/libgit2/issues/728
> 
> Am I using this wrong?

You haven't said what you're using. Make sure you're running the latest
version from the 'development' branch and show what code is giving
unexpected results.

   cmn

Re: [libgit2] git_status_file with untracked files

From:
Dan Petitt
Date:
2013-03-30 @ 08:34
>> I am trying to get a status of files in my working directory and it 
seems that untracked files are returning GIT_ENOTFOUND (-3) instead of 
returning GIT_OK and a status that indicates an untracked file.
>> 
>> Strangely I notice an issue that supposedly fixed this 10 months ago 
but I am not seeing the expected results:
>> https://github.com/libgit2/libgit2/issues/728
>> 
>> Am I using this wrong?
> 
> You haven't said what you're using. Make sure you're running the latest
> version from the 'development' branch and show what code is giving
> unexpected results.

It was my bad, I was passing full path instead of the relative path from 
repo folder.

All sorted now, thanks
Dan