remove the git-union-merge command
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.
This commit is contained in:
parent
17c1a1dde4
commit
46d38b002d
6 changed files with 5 additions and 99 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -15,8 +15,6 @@ git-annex
|
||||||
git-annex-shell
|
git-annex-shell
|
||||||
git-remote-annex
|
git-remote-annex
|
||||||
man
|
man
|
||||||
git-union-merge
|
|
||||||
git-union-merge.1
|
|
||||||
doc/.ikiwiki
|
doc/.ikiwiki
|
||||||
html
|
html
|
||||||
*.tix
|
*.tix
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -74,12 +74,6 @@ git-annex-shell: git-annex
|
||||||
git-remote-annex: git-annex
|
git-remote-annex: git-annex
|
||||||
ln -sf git-annex git-remote-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-mans: mans
|
||||||
install -d $(DESTDIR)$(PREFIX)/$(SHAREDIR)/man/man1
|
install -d $(DESTDIR)$(PREFIX)/$(SHAREDIR)/man/man1
|
||||||
install -m 0644 man/*.1 $(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 \
|
doc/.ikiwiki html dist tags Build/SysConfig Build/Version \
|
||||||
Setup Build/InstallDesktopFile Build/Standalone \
|
Setup Build/InstallDesktopFile Build/Standalone \
|
||||||
Build/DistributionUpdate Build/BuildVersion Build/MakeMans \
|
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 \*.o -exec rm {} \;
|
||||||
find . -name \*.hi -exec rm {} \;
|
find . -name \*.hi -exec rm {} \;
|
||||||
|
|
||||||
|
@ -241,4 +235,4 @@ distributionupdate:
|
||||||
ghc -Wall -fno-warn-tabs --make Build/DistributionUpdate -XLambdaCase -XPackageImports
|
ghc -Wall -fno-warn-tabs --make Build/DistributionUpdate -XLambdaCase -XPackageImports
|
||||||
./Build/DistributionUpdate
|
./Build/DistributionUpdate
|
||||||
|
|
||||||
.PHONY: git-annex git-union-merge tags
|
.PHONY: git-annex tags
|
||||||
|
|
|
@ -22,3 +22,5 @@ Tried with (on a Manjaro box):
|
||||||
git-annex rules and is a marvelous tool.
|
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...
|
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]]
|
||||||
|
|
|
@ -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
|
|
|
@ -68,7 +68,7 @@ internal tracking of information about git-annex repositories and annexed
|
||||||
objects.
|
objects.
|
||||||
|
|
||||||
The files stored in this branch are all designed to be auto-merged
|
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.
|
has a timestamp, to allow the most recent information to be identified.
|
||||||
|
|
||||||
### `uuid.log`
|
### `uuid.log`
|
||||||
|
|
|
@ -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
|
|
Loading…
Add table
Add a link
Reference in a new issue