anarcat / bup-cron

mirror of the bup-cron repository, may be out of date while i figure out github mirror things
https://gitlab.com/anarcat/bup-cron
GNU Affero General Public License v3.0
22 stars 4 forks source link

Allow to configure whole branch name (--name / new option) #19

Closed blueyed closed 9 years ago

blueyed commented 9 years ago

Currently you can specify the name, which is used as base of the branch name:

branch = '%s-%s' % (args.name, snapshot.src_path.replace('/', '_'))

Reading the help/code the name option makes a different impression, as if it would allow you to specify the whole name:

    # using the hostname as branch name
    group.add_argument('-n', '--name', default=socket.gethostname(),
                       help="""name of the backup passed to bup,
                               defaults to hostname (%(default)s)""")

What do you think about keeping the current default, but use the name as-is when passed by --name (without the substituted path appended)? (of course, this would be backwards-incompatible)

anarcat commented 9 years ago

how about a new --branch-name argument instead?

blueyed commented 9 years ago

Makes sense. Will you add it or should I create a PR?

anarcat commented 9 years ago

please do :)