From: Ian Jackson Date: Sat, 21 Jan 2012 10:36:08 +0000 (+0000) Subject: wip attributes, before move .gitattributes back into tree X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topbloke.git;a=commitdiff_plain;h=2a6bbdd92c6d4237c78f66be47f93bee2a60e46e;hp=47e14f5f217382a1265241b2ec391306bd6e31d4 wip attributes, before move .gitattributes back into tree --- diff --git a/FORMAT b/FORMAT index 258e073..5c22cc6 100644 --- a/FORMAT +++ b/FORMAT @@ -22,6 +22,8 @@ In-tree, there are metadata files in .topbloke otherwise fatal. Currently defined flags: Deleted branch is deleted + .gitattributes Sets the attributes + has the format: @/--
TZ/ diff --git a/Topbloke.pm b/Topbloke.pm index b8f21a0..8979a6e 100644 --- a/Topbloke.pm +++ b/Topbloke.pm @@ -121,4 +121,19 @@ sub parse_branch_spec ($) { return $spec; } +sub setup_config () { + my ($files) = (qw(msg deps included flags gitattributes)); + my $version = 1; + foreach my $file ($files) { + my $cfgname = "merge.topbloke-$file."; + my $current = run_git_1line(qw(config), "$cfgname.driver"); + next if $current =~ m/^topbloke-merge-driver --v$version /o; + debug("setting merge driver $file"); + run_git_1line(qw(config), "$cfgname.name", + "topbloke merge driver for $file"); + run_git_1line(qw(config), "$cfgname.driver", + "topbloke-merge-driver --v$version $file %O %A %B %L"); + } +} + 1;