remove the git-union-merge command
authorJoey Hess <joeyh@joeyh.name>
Wed, 12 Feb 2025 16:37:36 +0000 (12:37 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 12 Feb 2025 16:37:36 +0000 (12:37 -0400)
This has never been built and shipped as part of git-annex,
and including it as a pedagolical example in
the source code doesn't have much benefit. The program was not currently
buildable after recent OsPath changes.

Of course, Git/UnionMerge.hs is still available and can be used.

.gitignore
Makefile
doc/bugs/How_to_git_union-merge__63__.mdwn
doc/git-union-merge.mdwn [deleted file]
doc/internals.mdwn
git-union-merge.hs [deleted file]

index e21cbf9c8029b134e0e67a885f935400e2ab581e..125468c04f8fb3d9d7c790e8e8a54bbe90679a18 100644 (file)
@@ -15,8 +15,6 @@ git-annex
 git-annex-shell
 git-remote-annex
 man
-git-union-merge
-git-union-merge.1
 doc/.ikiwiki
 html
 *.tix
index a0939a9e9b64746847784b9987cf21cfee8f5283..b2ee54db83aea0114a826684493256959993a608 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -74,12 +74,6 @@ git-annex-shell: git-annex
 git-remote-annex: git-annex
        ln -sf git-annex git-remote-annex
 
-# These are not built normally.
-git-union-merge.1: doc/git-union-merge.mdwn
-       ./Build/mdwn2man git-union-merge 1 doc/git-union-merge.mdwn > git-union-merge.1
-git-union-merge:
-       $(GHC) --make -threaded $@
-
 install-mans: mans
        install -d $(DESTDIR)$(PREFIX)/$(SHAREDIR)/man/man1
        install -m 0644 man/*.1 $(DESTDIR)$(PREFIX)/$(SHAREDIR)/man/man1
@@ -146,7 +140,7 @@ clean:
                doc/.ikiwiki html dist tags Build/SysConfig Build/Version \
                Setup Build/InstallDesktopFile Build/Standalone \
                Build/DistributionUpdate Build/BuildVersion Build/MakeMans \
-               git-annex-shell git-remote-annex git-union-merge .tasty-rerun-log
+               git-annex-shell git-remote-annex .tasty-rerun-log
        find . -name \*.o -exec rm {} \;
        find . -name \*.hi -exec rm {} \;
 
@@ -241,4 +235,4 @@ distributionupdate:
        ghc -Wall -fno-warn-tabs --make Build/DistributionUpdate -XLambdaCase -XPackageImports
        ./Build/DistributionUpdate
 
-.PHONY: git-annex git-union-merge tags
+.PHONY: git-annex tags
index 3272cd250823bbbfa922400d085f8e2585048537..d3beff71f227a7dc8d4fa6a0bf830945a1bd721c 100644 (file)
@@ -22,3 +22,5 @@ Tried with (on a Manjaro box):
 git-annex rules and is a marvelous tool.
 
 I wanted to try the union merging to resolve merge conflicts on non-annexed files. It's not ideal, but might be better than repeated `git annex assist|sync` eventually adding the merge conflict markers `<<<<<<<<<` and the like to the files, breaking things like `.gitattributes` syntax which in turn has more devastating lockup consequences...
+
+> removed it, [[done]] --[[Joey]]
diff --git a/doc/git-union-merge.mdwn b/doc/git-union-merge.mdwn
deleted file mode 100644 (file)
index ca06d2f..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-# NAME
-
-git-union-merge - Join branches together using a union merge
-
-# SYNOPSIS
-
-git union-merge ref ref newref
-
-# DESCRIPTION
-
-Does a union merge between two refs, storing the result in the
-specified newref.
-
-The union merge will always succeed, but assumes that files can be merged
-simply by concatenating together lines from all the oldrefs, in any order.
-So, this is useful only for branches containing log-type data.
-
-Note that this does not touch the checked out working copy. It operates
-entirely on git refs and branches.
-
-# EXAMPLE
-
-       git union-merge git-annex origin/git-annex refs/heads/git-annex 
-
-Merges the current git-annex branch, and a version from origin,
-storing the result in the git-annex branch.
-
-# BUGS
-
-File modes are not currently merged.
-
-# AUTHOR
-
-Joey Hess <id@joeyh.name>
-
-<http://git-annex.branchable.com/>
-
-Warning: Automatically converted into a man page by mdwn2man. Edit with care
index 06a98e95595af6c2a5846524ffbca07ce3b3ae0d..5b9d7fbfb83f298d3a50efe53968137931586e83 100644 (file)
@@ -68,7 +68,7 @@ internal tracking of information about git-annex repositories and annexed
 objects.
 
 The files stored in this branch are all designed to be auto-merged
-using git's [[union merge driver|git-union-merge]]. So each line
+by simply concacenating them together. So each line
 has a timestamp, to allow the most recent information to be identified.
 
 ### `uuid.log`
diff --git a/git-union-merge.hs b/git-union-merge.hs
deleted file mode 100644 (file)
index c499c53..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-{- git-union-merge program
- -
- - Copyright 2011 Joey Hess <id@joeyh.name>
- -
- - Licensed under the GNU AGPL version 3 or higher.
- -}
-
-import System.Environment
-
-import Common
-import qualified Git.UnionMerge
-import qualified Git.Config
-import qualified Git.CurrentRepo
-import qualified Git.Branch
-import qualified Git.Index
-import qualified Git
-import Utility.FileSystemEncoding
-
-header :: String
-header = "Usage: git-union-merge ref ref newref"
-
-usage :: IO a
-usage = error $ "bad parameters\n\n" ++ header
-
-tmpIndex :: Git.Repo -> FilePath
-tmpIndex g = Git.localGitDir g </> "index.git-union-merge"
-
-setup :: Git.Repo -> IO ()
-setup = cleanup -- idempotency
-
-cleanup :: Git.Repo -> IO ()
-cleanup g = nukeFile $ tmpIndex g
-
-parseArgs :: IO [String]
-parseArgs = do
-       args <- getArgs
-       if length args /= 3
-               then usage
-               else return args
-
-main :: IO ()
-main = do
-       useFileSystemEncoding
-       [aref, bref, newref] <- map Git.Ref <$> parseArgs
-       g <- Git.Config.read =<< Git.CurrentRepo.get
-       _ <- Git.Index.override (tmpIndex g) g
-       setup g
-       Git.UnionMerge.merge aref bref g
-       _ <- Git.Branch.commit Git.Branch.ManualCommit False "union merge" newref [aref, bref] g
-       cleanup g