repo.or.cz
/
ugit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merged diffdisplay into master
[ugit.git]
/
py
/
ugitmodel.py
blob
dec4390ba68cf864b4ac0f38018f28a236c35542
1
import
commands
2
from
model
import
Model
3
4
def
get_config
(
key
):
5
return
commands
.
getoutput
(
'git config --get "
%s
"'
%
key
)
6
7
class
GitModel
(
Model
):
8
def
__init__
(
self
):
Model
.__
init
__
(
self
, {
9
'commitmsg'
:
''
,
10
'staged'
: [],
11
'unstaged'
: [],
12
'untracked'
: [],
13
'name'
:
get_config
(
'user.name'
),
14
'email'
:
get_config
(
'user.email'
),
15
})