git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Chris Johnsen <chris_johnsen@pobox.com>
Cc: git@vger.kernel.org, Miklos Vajna <vmiklos@frugalware.org>
Subject: Re: [PATCH/RFD] builtin-revert.c: release index lock when cherry-picking an empty commit
Date: Sat, 07 Mar 2009 20:14:34 -0800	[thread overview]
Message-ID: <7v63ikmz11.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1236418251-16947-1-git-send-email-chris_johnsen@pobox.com> (Chris Johnsen's message of "Sat, 7 Mar 2009 03:30:51 -0600")

Chris Johnsen <chris_johnsen@pobox.com> writes:

> When a cherry-pick of an empty commit is done, release the lock
> held on the index.
>
> The fix is the same as was applied to similar code in 4271666046.
>
> Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>

Thanks.  Will apply.  We should handle possible refactoring as a separate
topic.

> UNEVEN TREATMENT OF EMPTY CHANGES
>
> It seems that empty commits suffer uneven treatment under various
> patch-transport/history-rewriting mechanisms. They seem to be
> handled okay in the most of the core (fetch, push, bundle all
> seem to preserve empty commits, though I have not done rigorous
> testing).

They just transfer an existing history from one place to another without
modifying, so it is unfortunately true that they preserve such a broken
history with empty commits.

> 'format-patch', 'send-email', 'apply', 'am', 'rebase' (automatic,
> non-fast-forward; and --interactive).

These are all about creating history afresh, and they actively discourage
empty commits to be (re)created.

There is no "uneven treatment".

> 36863af16e (git-commit --allow-empty) says "This is primarily for
> use by foreign scm interface scripts.". Is this the only case
> where empty commits _should_ be used?

If foreign scm recorded an empty commit, it would be nice to be able to
recreate such a broken history _if the user wanted to_, and that is where
the --allow-empty option can be used.

  parent reply	other threads:[~2009-03-08  4:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07  9:30 [PATCH/RFD] builtin-revert.c: release index lock when cherry-picking an empty commit Chris Johnsen
2009-03-07 11:15 ` Johannes Schindelin
2009-03-07 22:57   ` Chris Johnsen
2009-03-08  1:19     ` Johannes Schindelin
2009-03-08  4:14 ` Junio C Hamano [this message]
2009-03-08 21:09   ` Chris Johnsen
2009-03-08 21:53     ` Junio C Hamano
2009-03-08 14:42 ` Jeff King
2009-03-08 15:09   ` Jeff King
2009-03-08 19:45   ` Junio C Hamano
2009-03-10 18:17     ` Jeff King
2009-03-10 18:25       ` Tomas Carnecky
2009-03-10 19:33       ` Tomas Carnecky
2009-03-10 23:57       ` Chris Johnsen
2009-03-11  0:30         ` Jeff King
2009-03-11 11:08           ` Mike Ralphson
2009-03-11 17:02             ` Mike Ralphson
2009-03-22  9:41             ` Jeff King
2009-03-22 21:58               ` Junio C Hamano
2009-03-22 22:38                 ` Jeff King
2009-03-09 17:36   ` Brandon Casey

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=7v63ikmz11.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=chris_johnsen@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=vmiklos@frugalware.org \
    /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;
as well as URLs for NNTP newsgroup(s).