From d5c5e3176d42ca627f21c977c49f1e234f5c1b1a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 18 Sep 2017 12:06:01 -0400 Subject: move tracking exports to design --- doc/design/exporting_trees_to_special_remotes.mdwn | 26 +++++++++++++++++----- doc/todo/export.mdwn | 26 ++++------------------ 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/doc/design/exporting_trees_to_special_remotes.mdwn b/doc/design/exporting_trees_to_special_remotes.mdwn index 6e7cc68db..c552fbc39 100644 --- a/doc/design/exporting_trees_to_special_remotes.mdwn +++ b/doc/design/exporting_trees_to_special_remotes.mdwn @@ -50,12 +50,6 @@ tree. If an export is interrupted, running it again should resume where it left off. -It would also be nice to have a way to say, "I want to export the master branch", -and have git-annex sync and the assistant automatically update the export. -This could be done by recording the treeish in eg, refs/remotes/myexport/HEAD. -git-annex export could do this by default (if the user doesn't want the export -to track the branch, they could instead export a tree or a tag). - ## updating an export The user can at any time re-run git-annex export with a new treeish @@ -76,6 +70,26 @@ that swap names. If the special remote supports copying files, that would also make some updates more efficient. +## tracking exports + +This lets the user say, "I want to export the master branch", +and have git-annex sync and the assistant automatically update the export +when master changes. + +git-annex export could do this by default (if the user doesn't want the +export to track the branch, they could instead export a tree or a tag). Or +it could be a --tracking parameter. + +How to record the export tracking branch? It could be stored +as refs/remotes/myexport/master. This says that the master branch +is being exported to myexport, and the ref points to the last treeish +that was exported. + +But.. master:subdir is a valid treeish, referring to the subdir +of the current master tree. This is a useful thing to want to export. +But, that's not a legal ref name. So, perhaps better to record +the export tracking branch some other way. Perhaps in git config? + ## changes to special remote interface This needs some additional methods added to special remotes, and to diff --git a/doc/todo/export.mdwn b/doc/todo/export.mdwn index c6d79f7a7..f979cd0c0 100644 --- a/doc/todo/export.mdwn +++ b/doc/todo/export.mdwn @@ -28,8 +28,7 @@ Work is in progress. Todo list: This needs a (local) record of what treeish the (local) export db was last updated for, which is updated at the same time as the export log. - One way to record that would be as a git ref. (Which may also help - for tracking exports of eg the master branch, see below.) + One way to record that would be as a git ref. When the export log contains a different treeish than the local record, the export was updated in another repository, and so the @@ -39,27 +38,10 @@ Work is in progress. Todo list: logged treeish. Add/delete exported files from the database to get it to the same state as the remote database. -* git-annex sync to export and export tracking branch +* tracking exports - This needs a way to configure an export tracking branch. - Eg, `git annex export --tracking master --to myexport` - - (There should only be one tracking branch per export remote.) - - Then running `git annex sync --content` would update the export with - any changes to master. - - How to record the export tracking branch? It could be stored - as refs/remotes/myexport/master. This says that the master branch - is being exported to myexport, and the ref points to the last treeish - that was exported. - - But.. master:subdir is a valid treeish, referring to the subdir - of the current master tree. This is a useful thing to want to export. - But, that's not a legal ref name. So, perhaps better to record - the export tracking branch some other way. Perhaps in git config? - -* Support export in the assistant (when eg setting up a S3 special remote). +* Support configuring export in the assistant + (when eg setting up a S3 special remote). This is similar to the little-used preferreddir= preferred content setting and the "public" repository group. The assistant uses -- cgit v1.2.3