From 3fe0019bc2939aea4e89cbb8bc5aeb5edeb456d9 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 13 Mar 2014 15:42:45 -0700 Subject: git object format: make sure parenthood isn't lost when saving This makes subsurface remember the git source commit of the dive data. If you save to an existing branch, subsurface will now complain and refuse to save if you try to save if the existing branch is not related to the original source. That would destroy the history of the dive data, which in turn would make it impossible to do sane merging of the data. If you save to a new branch, it will see if the previous parent commit is known in the repository you are saving to, and will save parenthood information if so. Otherwise it will save it as a new parentless commit ("root commit" in git parlance). Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 4d4d0baa2..b67de1588 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -214,6 +214,7 @@ void MainWindow::on_actionClose_triggered() ui.newProfile->setEmptyState(); /* free the dives and trips */ + clear_git_id(); while (dive_table.nr) delete_single_dive(0); -- cgit v1.2.3-70-g09d2