[PATCH 2/3] git-save: don't save the subsurface version string in the object tree

Linus Torvalds torvalds at linux-foundation.org
Tue Mar 11 15:09:13 PDT 2014


From: Linus Torvalds <torvalds at linux-foundation.org>
Date: Tue, 11 Mar 2014 13:54:20 -0700
Subject: [PATCH 2/3] git-save: don't save the subsurface version string in the object tree

I didn't think that one through: the version string is already saved in
the commit message, and so saving it in the tree object is redundant.

Now a little redundancy doesn't hurt, but having the tree object depend
on th esubsurface version _does_ end up being annoying: it means that as
you update the subsurface version, doing a data save will result in a
different tree SHA1 even if none of the data changed.

Which doesn't actually matter right now, since we always create a new
commit anyway, but my plan was to skip the commit creation if nothing
changed in the tree.  And saving the version string defeats that if you
are a subsurface developer and the subsurface version keeps changing.

Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 save-git.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/save-git.c b/save-git.c
index 3ec610b39d70..ef6ce275586e 100644
--- a/save-git.c
+++ b/save-git.c
@@ -687,7 +687,6 @@ static void save_settings(git_repository *repo, struct dir *tree)
 {
 	struct membuffer b = { 0 };
 
-	show_utf8(&b, "subsurface ", VERSION_STRING, "\n");
 	put_format(&b, "version %d\n", VERSION);
 	call_for_each_dc(&b, save_one_device);
 	cond_put_format(autogroup, &b, "autogroup\n");
-- 
1.9.0



More information about the subsurface mailing list