1 """Provides commands and queries for Git."""
9 branch
= model
.currentbranch
10 branchconfig
= 'branch.%s.remote' % branch
11 return model
.local_config(branchconfig
, 'origin')
13 def corresponding_remote_ref():
15 remote
= default_remote()
16 branch
= model
.currentbranch
17 best_match
= '%s/%s' % (remote
, branch
)
18 remote_branches
= model
.remote_branches
19 if not remote_branches
:
21 for rb
in remote_branches
:
24 return remote_branches
[0]
26 def diff_filenames(arg
):
27 """Return a list of filenames that have been modified"""
29 diff_zstr
= model
.git
.diff(arg
, name_only
=True, z
=True).rstrip('\0')
30 return [core
.decode(f
) for f
in diff_zstr
.split('\0') if f
]