From: Junio C Hamano <gitster@pobox•com>
To: Timo Teras <timo.teras@iki•fi>
Cc: git@vger•kernel.org
Subject: Re: git fast-import: how to prevent incremental commit with no changes
Date: Tue, 06 May 2014 12:18:16 -0700 [thread overview]
Message-ID: <xmqqwqdyemx3.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140505115320.395edd2e@vostro> (Timo Teras's message of "Mon, 5 May 2014 11:53:20 +0300")
Timo Teras <timo.teras@iki•fi> writes:
> I'm trying to script a setup that would periodically import a tarball
> to git with fast-import. But things do not always change, so I'd like
> fast-import to be able to not do the commit in case there is no change.
>
> That is, I'm constructing the commit with "deleteall" + importing each
> object by mark after that. Now, in case nothing changed, fast-import
> will happily create an empty commit for me.
>
> Would it be possible to add some flag that would make commit fail in
> case nothing changed?
>
> Any suggestions how to do this?
I am not sure if such a conditional logically belongs to what
fast-import does. Would it be an option for your script to rewind
the HEAD after the import is done and it finds that the tarball did
not have anything interesting new?
next prev parent reply other threads:[~2014-05-06 19:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-05 8:53 git fast-import: how to prevent incremental commit with no changes Timo Teras
2014-05-06 19:18 ` Junio C Hamano [this message]
2014-05-07 5:01 ` Timo Teras
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=xmqqwqdyemx3.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=timo.teras@iki$(echo .)fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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