From 2a6bbdd92c6d4237c78f66be47f93bee2a60e46e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 21 Jan 2012 10:36:08 +0000 Subject: [PATCH] wip attributes, before move .gitattributes back into tree --- FORMAT | 2 ++ Topbloke.pm | 15 +++++++++++++++ 2 files changed, 17 insertions(+) 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; -- 2.30.2