[petsc-dev] memory leak

Satish Balay balay at mcs.anl.gov
Mon Jun 1 12:46:17 CDT 2015


On Mon, 1 Jun 2015, Mark Adams wrote:

> >
> >
> > Also 'git-prompt.sh' helps in tracking changes to any giving 'branch'
> > wrt 'origin/branch'.. [assuming you do a 'git fetch' to sync changes
> > from remote repo]
> >
> >
> I use (a) git-prompt.sh.  It shows the branch in the prompt.  How does it
> help? Does it do the .. stuff?

I use:

export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWUPSTREAM="auto"
export PS1='\[\e[32m\]\u@\h \[\e[36m\]${PWD}\[\e[1m\]\[\e[35m\]$(__git_ps1 " (%s)")\[\e[0m\]\n\$ '

And I see something like the following in addition to the branch name.

balay at asterix /home/balay/petsc (master=)

Here - the status flag currently is '='. The usual values are:
'=' => both branches origin/master, master are in sync
'<' => there are new remote changes that I should pull
'>' => there are localchages that I should push.

And there are other status flags that get displayed based on local
edits, stuff added to index etc..

For eg:

balay at asterix /home/balay/petsc (master=)
$ echo 'x' >> makefile 
balay at asterix /home/balay/petsc (master *=)
$ git add makefile 
balay at asterix /home/balay/petsc (master +=)
$ git commit -m 'test commit'
[master 7672695] test commit
 1 file changed, 1 insertion(+)
balay at asterix /home/balay/petsc (master>)
$ git reset --hard origin/master
HEAD is now at e06cc25 Custom Fortran stub pcfieldsplitgetsubksp_() did not free array containing the KSPs
balay at asterix /home/balay/petsc (master=)
$ 

So one can potentially keep track of how the changes on the branch are
evolving - and not be *suprised* by the final state you are at. [which
can be checked with 'git log origin/master..master' command].

One can always reset the branch - pickup relavent stuff from abandoned
branches etc.

Satish




More information about the petsc-dev mailing list