[PATCH] make git save commit messages more informative

Dirk Hohndel dirk at hohndel.org
Sun Apr 27 20:08:32 PDT 2014


On Sun, 2014-04-27 at 18:29 -0700, Linus Torvalds wrote:
> Instead of just having "Created by subsurface <version>", put the number
> of dives and the location of the last dive in the message.  That makes
> things like "gitk" show a much more useful view of what actually got
> saved.

That's not the number of dives, it's the last dive number.
Wouldn't it make more sense to put the number of dives there? Just
wondering.

> We still save the subsurface version in the body of the message, because
> that is interesting and relevant information.  It's just not the
> *primary* relevant information.
> 
> Anyway, with this, a git commit message might looke something like
> 
>     dive 474: North West Point (Christmas Island)
> 
>     Created by subsurface 4.0.96-17-g649e9ed89d9d
> 
> which is much more relevant for the common case of adding new dives at
> the end.

I agree. And I like to optimize for the common case.

> NOTE! If you were to just save a subset of dives (ie "save selected"),
> we'll still pick the last dive you had globally, not the last dive
> actually saved.  I couldn't find it in myself to care too deeply, the
> git format is unlikely to be used for partial saves.

We only support that with saving to XML, don't we? Oh. Hmm.
We accept git syntax, but then don't create a repository, nor do we
issue an error. So nothing is saved.
I need to dig into this some more.

> This really does make the logs look much better. Not that I'll have much 
> proof of it until the next dive trip (soon, soon), but the fake testing I 
> did make it look way better in gitk than just seeing that "Created by" 
> repeated over and over.

I accepted the patch after Beta1 because a) no string changes b) it's an
undocumented feature anyway and c) for those of us who use it it does
make things notably better.

Thanks

/D




More information about the subsurface mailing list