Re: [PATCH] Fix stale git status



On 6 April 2010 14:40, Peter Tyser <ptyser gmail com> wrote:
>> +                # Update the index before getting status, otherwise we could
>> +                # be reading stale status information
>> +                os.system("git update-index --refresh")
>>                 proc = _vc.popen([self.CMD, "diff-index", "--name-status", \
>>                     "HEAD", "./"], cwd=self.location)
>>                 entries = proc.read().split("\n")[:-1]
>
> I forgot to mention it in the patch, but let me know if others would
> prefer _vc.popen(), subprocess.Popen(), or something else over
> os.system().

While it shouldn't really make much difference, I think it would be
better to avoid os.system() and use _vc.popen() for the sake of
consistency.

> Also, is it preferred to "hide" all subprocesses output so that
> nothing is printed when meld is ran from the command line?  Eg right
> now I see the following:
> $ ./bin/meld ./
> (I click on the git.py file in the meld GUI)
> patching file meld/vc/git.py
> (I click on the _vc.py file in the meld GUI)
> patching file meld/vc/_vc.py
>
> Is the "patching file xyz" command line output intentional, a bug, or
> just some output no one cares about either way?

I think it's some output no one cares about, so it really should go
away. A patch that gets rid of it would be greatly appreciated.

> My os.system() call
> in this patch adds some additional output is why I ask.

Likewise, it would be superior to not see this stuff. Thanks for
looking at this stuff.

cheers,
Kai


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]