RFC Add backup log
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest24 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/24 | doc: introduce new "backup log" conceptDocumentation/ Documentation/ | +112 | 0 replies | |
| 2/24 | backup-log: add "update" subcommand.gitignore Makefile backup-log.c +7 more | +167 | 0 replies | |
| 3/24 | read-cache.c: new flag for add_index_entry() to write to backup logcache.h read-cache.c | +49 | 0 replies | |
| 4/24 | add: support backup logbuiltin/ t/ | +16 | 0 replies | |
| 5/24 | update-index: support backup log with --keep-backupDocumentation/ builtin/ t/ | +21 | 0 replies | |
| 6/24 | commit: support backup logbuiltin/ t/ | +35 | 0 replies | |
| 7/24 | apply: support backup log with --keep-backupDocumentation/ apply.c apply.h +1 more | +65 | 0 replies | |
| 8/24 | add--interactive: support backup loggit-add--interactive.perl | +7 | 0 replies | |
| 9/24 | backup-log.c: add API for walking backup logbackup-log.c backup-log.h | +193 | 0 replies | |
| 10/24 | backup-log: add cat commandbuiltin/ t/ | +100 | 0 replies | |
| 11/24 | backup-log: add diff commandbuiltin/ t/ | +125 | 0 replies | |
| 12/24 | backup-log: add log commandbuiltin/ t/ | +124 | 0 replies | |
| 13/24 | backup-log: add prune commandbackup-log.c backup-log.h builtin/ | +91 | 0 replies | |
| 14/24 | gc: prune backup logsbackup-log.c backup-log.h builtin/ | +37 | 0 replies | |
| 15/24 | backup-log: keep all blob references aroundbackup-log.c backup-log.h builtin/ +3 more | +82 | 0 replies | |
| 16/24 | sha1-file.c: let index_path() accept NULL istatesha1-file.c | +5 | 0 replies | |
| 17/24 | config --edit: support backup logbuiltin/ t/ | +40 | 0 replies | |
| 18/24 | refs: keep backup of deleted reflogrefs/ t/ | +44 | 0 replies | |
| 19/24 | unpack-trees.c: keep backup of ignored files being overwrittenbuiltin/ merge.c t/ +2 more | +92 | 0 replies | |
| 20/24 | reset --hard: keep backup of overwritten filesbuiltin/ merge-recursive.c t/ +2 more | +74 | 0 replies | |
| 21/24 | checkout -f: keep backup of overwritten filesbuiltin/ | +2 | 0 replies | |
| 22/24 | am: keep backup of overwritten files on --skip or --abortbuiltin/ | +3 | 0 replies | |
| 23/24 | rebase: keep backup of overwritten files on --skip or --abortbuiltin/ | +5 | 0 replies | |
| 24/24 | FIXMEDocumentation/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 00/24] Add backup log
"Backup log" is similar to reflog. But instead of keeping track of ref changes, it keeps track of file content changes. These could be from the index (e.g. "git add" replacing something in the index), worktree ("git reset --hard" deleting everything) or in gitdir ("git config --edit", or deleted reflog).
Backup log, when enabled, keeps the backup versions so you can undo if needed. Head for 01/24 to have a better picture what it does, when backups are made... This series adds a new plumbing command 'git backup-log' to manage these backups.
A couple things left to do:
- high level UI design, including maybe extended SHA-1 syntax
- whether "git checkout <paths>" should keep backups. I think doing it unconditionally may be too much, but maybe keep backups of files with "precious" attribute on
- a UI to edit $GIT_DIR/info/excludes and gitattributes so we can make backups of them
- whether we should keep command causing the changes in the backup log (e.g. this change is made by git-add, that one git-rebase...). Reflog has this. I did not add it because it complicates the parsing a bit and not sure if it's worth it.
Nguyễn Thái Ngọc Duy (24):
doc: introduce new "backup log" concept
backup-log: add "update" subcommand
read-cache.c: new flag for add_index_entry() to write to backup log
add: support backup log
update-index: support backup log with --keep-backup
commit: support backup log
apply: support backup log with --keep-backup
add--interactive: support backup log
backup-log.c: add API for walking backup log
backup-log: add cat command
backup-log: add diff command
backup-log: add log command
backup-log: add prune command
gc: prune backup logs
backup-log: keep all blob references around
sha1-file.c: let index_path() accept NULL istate
config --edit: support backup log
refs: keep backup of deleted reflog
unpack-trees.c: keep backup of ignored files being overwritten reset --hard: keep backup of overwritten files
checkout -f: keep backup of overwritten files
am: keep backup of overwritten files on --skip or --abort
rebase: keep backup of overwritten files on --skip or --abort FIXME
.gitignore | 1 + Documentation/config/core.txt | 5 + Documentation/git-apply.txt | 3 + Documentation/git-backup-log.txt | 109 ++++++++ Documentation/git-update-index.txt | 3 + Makefile | 2 + apply.c | 38 ++- apply.h | 1 + backup-log.c | 388 +++++++++++++++++++++++++++++ backup-log.h | 38 +++ builtin.h | 1 + builtin/add.c | 5 + builtin/am.c | 3 + builtin/backup-log.c | 371 +++++++++++++++++++++++++++ builtin/checkout.c | 4 + builtin/commit.c | 16 +- builtin/config.c | 27 +- builtin/gc.c | 3 + builtin/pack-objects.c | 9 +- builtin/rebase.c | 6 +- builtin/repack.c | 1 + builtin/reset.c | 2 + builtin/update-index.c | 7 + cache.h | 2 + command-list.txt | 1 + git-add--interactive.perl | 14 +- git.c | 1 + merge-recursive.c | 2 +- merge.c | 2 + parse-options.c | 2 +- reachable.c | 3 + read-cache.c | 49 +++- refs/files-backend.c | 32 +++ revision.c | 3 + sha1-file.c | 8 +- t/t2080-backup-log.sh | 228 +++++++++++++++++ unpack-trees.c | 143 +++++++++-- unpack-trees.h | 6 +- 38 files changed, 1488 insertions(+), 51 deletions(-) create mode 100644 Documentation/git-backup-log.txt create mode 100644 backup-log.c create mode 100644 backup-log.h create mode 100644 builtin/backup-log.c create mode 100755 t/t2080-backup-log.sh
Signature · 1 line
2.20.0.rc2.486.g9832c05c3d