All of lore.kernel.org
 help / color / mirror / Atom feed
* git format-patch: skipping interim commits.
@ 2011-07-24  4:52 Ali Bahar
  2011-07-24  5:42 ` Manish Katiyar
  0 siblings, 1 reply; 3+ messages in thread
From: Ali Bahar @ 2011-07-24  4:52 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

(yes, I _am_ aware that there is a separate git mailing list. This
seemed to be more apt for _here_, as a first attempt.)

When I run 'git format-patch' to prepare a submission, it creates a
patch-file for every commit. While this is sometimes fine, it often
isn't: I want it to skip all the interim commits which I did during
development. There is no point in (and likely prosecutable in several
jurisdictions) submitting the interim miscellany, thereby creating
needless, non-Acked, log entries in master.

I do have a crude work-around for this, but I prefer to find out how
everyone else tackles this. I expect that it is more a _workflow_
issue than having to do with specifying revision ranges on the
command-line.


thanks,
ali
PS the crude work-around is to copy all the changes into a clean
branch, and do a single commit. But that's error-prone when you have
numerous files, and several sets of commits.

PPS A simplified example, given a Master and a Dev branch:
1. Dev has lots of interim commits, for a single, logically-cohesive
  change. Once the work is complete, I want to create a single patch
  file for the entire delta against Master.
2. Dev will next have another set of commits. These are logically
  related and, once done, are to result in another single patch file.
3. and so on.

This is all subject to Release Early, Release Often, so I am not
talking about sitting on a bunch of changes for too long!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* git format-patch: skipping interim commits.
  2011-07-24  4:52 git format-patch: skipping interim commits Ali Bahar
@ 2011-07-24  5:42 ` Manish Katiyar
  2011-07-24  6:20   ` Ali Bahar
  0 siblings, 1 reply; 3+ messages in thread
From: Manish Katiyar @ 2011-07-24  5:42 UTC (permalink / raw)
  To: kernelnewbies

On Sat, Jul 23, 2011 at 9:52 PM, Ali Bahar <ali@internetdog.org> wrote:
> Hi all,
>
> (yes, I _am_ aware that there is a separate git mailing list. This
> seemed to be more apt for _here_, as a first attempt.)
>
> When I run 'git format-patch' to prepare a submission, it creates a
> patch-file for every commit. While this is sometimes fine, it often
> isn't: I want it to skip all the interim commits which I did during
> development. There is no point in (and likely prosecutable in several
> jurisdictions) submitting the interim miscellany, thereby creating
> needless, non-Acked, log entries in master.
>
> I do have a crude work-around for this, but I prefer to find out how
> everyone else tackles this. I expect that it is more a _workflow_
> issue than having to do with specifying revision ranges on the
> command-line.

Hi,

Looks like you want to generate a single commit from multiple commits.
Have a look at "git rebase --interactive". You will
be able to  merge multiple commits into a single commit. So the
workflow would be something like

a) Create a new test branch
b) git rebase --interactive commit-id
c) Merge commits,
d) git format-patch ....

HTH


-- 
Thanks -
Manish

^ permalink raw reply	[flat|nested] 3+ messages in thread

* git format-patch: skipping interim commits.
  2011-07-24  5:42 ` Manish Katiyar
@ 2011-07-24  6:20   ` Ali Bahar
  0 siblings, 0 replies; 3+ messages in thread
From: Ali Bahar @ 2011-07-24  6:20 UTC (permalink / raw)
  To: kernelnewbies

On Sat, Jul 23, 2011 at 10:42:44PM -0700, Manish Katiyar wrote:
> On Sat, Jul 23, 2011 at 9:52 PM, Ali Bahar <ali@internetdog.org> wrote:

> > When I run 'git format-patch' to prepare a submission, it creates a
> > patch-file for every commit. While this is sometimes fine, it often
> > isn't: I want it to skip all the interim commits which I did during
> > development. There is no point in (and likely prosecutable in several

> > everyone else tackles this. I expect that it is more a _workflow_
> > issue than having to do with specifying revision ranges on the
> > command-line.
> 
> Hi,
> 
> Looks like you want to generate a single commit from multiple commits.

Yup. Well phrased.

> Have a look at "git rebase --interactive". You will

Hmm, that's not what I thought rebase was for! I knew of its
branch-synch functionality, not this. Then again, the man page for
git-rebase qualifies for the Stroustrup Award for Clarity! (Either
that, or a steganography award!) ;-)

Thanks much.


> be able to  merge multiple commits into a single commit. So the
> workflow would be something like
> 
> a) Create a new test branch
> b) git rebase --interactive commit-id

I take back what I said about the man page; 66% into it, after the
memorable first page, in the INTERACTIVE MODE section, it explains
perfectly.


> c) Merge commits,

It seems to call these "squash", instead of "merge". No wonder grep
didn't work!


> d) git format-patch ....

Thanks much. Greatly appreciated.

thanks,
ali

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-24  6:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-24  4:52 git format-patch: skipping interim commits Ali Bahar
2011-07-24  5:42 ` Manish Katiyar
2011-07-24  6:20   ` Ali Bahar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.