From: Felipe Contreras Date: Wed, 05 Jun 2013 14:52:27 GMT Subject: Re: [PATCH v2 3/8] cherry-pick: add --skip-empty option Message-ID: In-Reply-To: <7vvc5t7mpm.fsf@alter.siamese.dyndns.org> On Tue, Jun 4, 2013 at 1:30 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> You didn't answer, what happens when you run --skip-empty and --allow-empty? > > I'll answer to a slightly different question: What should happen? > > I think it should error out, because --allow-empty is about > "allowing empty commits to be preserved", and --skip-empty is about > "skipping empty commits (as it says on the package)". Exactly, so they are related after all. However, --allow-empty says this: "By default, cherry-picking an empty commit will fail," Should we change that too if we introduce --skip-empty? I don't think so. I think it makes more sense to have a new --empty-commits=[keep|skip|fail] option, so we don't have to document how each option affects the other, and what is the default. Or rather; the option documents that. In fact, it might make sense to change the default in v2.0 to --empty-commits=skip. If it makes sense in 'git rebase', why doesn't it in 'git cherry-pick'? -- Felipe Contreras