 ###
 
 {React, ReactDOM, rclass, rtypes, Redux, Actions, Store}  = require('./smc-react')
-{Button, Input, Form, Panel, Row, Col, Tabs, Tab} = require('react-bootstrap')
+{Button, Input, Form, Panel, Row, Col, Tabs, Tab, DropdownButton, MenuItem} = require('react-bootstrap')
 {Icon, Octicon, Space, Tip} = require('./r_misc')
 {salvus_client} = require('./salvus_client')
 misc = require('smc-util/misc')

            {<pre>{@props.git_status}</pre> if @props.git_status}
        </Panel>

    render_diff : ->
        head =
            <span>
                git diff
                <Space/> <Space/>
                <Button onClick={=>@props.actions.update_diff()}>
                    Refresh

                else
                    @setState(git_status : output.stdout)

    update_diff : =>
        store = @redux.getStore(@name)
        
        if store
            console.log('file to diff',store.get('file_to_diff'))
            args = if store.get('file_to_diff') then ['diff', store.get('file_to_diff')] else ['diff']
        else
            args = ['diff']
        @setState(git_diff : 'updating...')
        @exec
            cmd  : "git"
            args : args
            cb   : (err, output) =>
                if err
                    @setState(git_diff : '')
