Git development
 help / color / mirror / Atom feed
From: Marcus Griep <neoeinstein@gmail.com>
To: Pat LeSmithe <qed777@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Dumb "continuous" commit dumb question
Date: Tue, 19 Aug 2008 00:13:39 -0400	[thread overview]
Message-ID: <48AA4873.4040107@gmail.com> (raw)
In-Reply-To: <48AA4263.8090606@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2186 bytes --]

Pat LeSmithe wrote:
> Hello,
> 
> Is it possible to enable git to automatically and continuously "softly"
> commit or stage *all* changes to a [subset of] files in a repository,
> without my intervention, as they happen?  Perhaps via a daemon which
> monitors the disk for explicit file-saving?

Perhaps with a cron job running a script every minute or so.  You'd want
to verify that changes actually took place before attempting a commit.
Also, what log messages would you be providing?  Log messages can be
very important to the context of a change and the ability to later find
them.

If you're using a specific application, such as a Wiki, it may work
nicely, as log messages can be easily gleaned, and many offer post-edit
hooks that you could use to invoke git.

> Of course, I would still be able to perform explicit commits (with
> descriptive comments) and other git commands, in which case there
> probably should be smart handling of the recent soft history.  For
> example, it could simply be discarded.

You may want to use StGit as that may allow you to make such lightweight
commits easily while still allowing reordering, etc., though I am not
familiar with that application porcelain.

> I understand that I could simply remember to commit and/or branch early
> and often.  But given that changes by an individual on a given branch
> are well-ordered by time, and that the "continuous" operation may be
> cheap in many situations, a "live" journal could be useful.
> 
> Perhaps a better term is branch-aware undo or git with microstructure.

Obviously, my final caution is that while this is possible with some
configuration, you may lose valuable "signal" information in the "noise" of
commits that such a continuous operation might incur.  This low SNR may
make it more difficult to find and revert changes you didn't actually want
to happen or to glean a meaningful history of your working tree.

While in the operable borders of Git, it's outside the normal usage patterns.
If you have success, let us know how it worked for you.

-- 
Marcus Griep
GPG Key ID: 0x5E968152
——
http://www.boohaunt.net
את.ψο´


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 793 bytes --]

  reply	other threads:[~2008-08-19  4:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19  3:47 Dumb "continuous" commit dumb question Pat LeSmithe
2008-08-19  4:13 ` Marcus Griep [this message]
2008-08-19 14:32 ` David Tweed
2008-08-19 14:48   ` Shawn O. Pearce
2008-08-19 17:55     ` Jeff King
2008-08-19 14:54   ` Avery Pennarun
2008-08-19 15:02     ` David Tweed
2008-08-19 15:08       ` Avery Pennarun
2008-08-19 15:21         ` David Tweed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48AA4873.4040107@gmail.com \
    --to=neoeinstein@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=qed777@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox