On Wed, May 22, 2013 at 5:02 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > Why not do: > >> -def describe(rev='HEAD', tree=None): >> - process = subprocess.Popen(['git', 'describe', '--always', '--long', rev], >> +def describe(rev='HEAD', tree=None, get_long=False): >> + cmd = ['git', 'describe', '--always'] >> + >> + if (get_long): >> + cmd.append('--long') >> + >> + cmd.append(rev) > > def describe(rev='HEAD', tree=None, extra_args=[]): > cmd = ['git', 'describe', '--always'] > cmd.extend(extra_args) > if rev is not None: > cmd.append(rev) > process = ... > > that way you can do > > bpgit.describe(rev=None, extra_args=['--dirty']) > > or > > bpgit.describe(extra_args=['--long']) > > > and don't need two different patches. Although probably overkill for git describe given that I don't foresee us adding more options I can see this being good practice for anything else we'll add so sure, I'll make these changes. Luis -- To unsubscribe from this list: send the line "unsubscribe backports" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html