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@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2014-03-11 13:54:20 -07:00 committed by Dirk Hohndel
parent b1fa82804a
commit 4af254776e

View file

@ -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");