All of lore.kernel.org
 help / color / mirror / Atom feed
* Rebase/line wrap question
@ 2016-09-28 19:25 Elizabeth Ferdman
  2016-09-28 20:25 ` Alison Schofield
  2016-09-29  6:19 ` [Outreachy kernel] " Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Elizabeth Ferdman @ 2016-09-28 19:25 UTC (permalink / raw)
  To: amsfield22, outreachy-kernel

Hey Alison,

I received some feedback from Greg that I want
to fix and I have a bunch of questions. The plus side is that maybe
some of the answers could go into the tutorial.

First he said "please wrap your changelog comments at 72 columns."

Is this something I add to my .vimrc? I've been using "git commit -m".
Is that causing the issue? I thought git commit messages were supposed
to be less than 50 chars anyway. I'm confused.

The other issue was that my commit didn't apply to his tree. He says
please rebase and resend. I think I need to do:

$ git fetch origin
$ git rebase origin/staging-testing
Then reformat the patch?
$ git format-patch -o ~/mypatches/ HEAD^
$ mutt -H <file>

So I don't need to uncommit/recommit?

Thanks,
Liz



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

* Re: Rebase/line wrap question
  2016-09-28 19:25 Rebase/line wrap question Elizabeth Ferdman
@ 2016-09-28 20:25 ` Alison Schofield
  2016-09-28 21:49   ` Elizabeth Ferdman
  2016-09-29  6:19 ` [Outreachy kernel] " Greg KH
  1 sibling, 1 reply; 5+ messages in thread
From: Alison Schofield @ 2016-09-28 20:25 UTC (permalink / raw)
  To: Elizabeth Ferdman; +Cc: outreachy-kernel

On Wed, Sep 28, 2016 at 12:25:08PM -0700, Elizabeth Ferdman wrote:
> Hey Alison,
> 
> I received some feedback from Greg that I want
> to fix and I have a bunch of questions. The plus side is that maybe
> some of the answers could go into the tutorial.
> 
> First he said "please wrap your changelog comments at 72 columns."
> 
> Is this something I add to my .vimrc? I've been using "git commit -m".
> Is that causing the issue? I thought git commit messages were supposed
> to be less than 50 chars anyway. I'm confused.

"commit message" is that one line message in your Subject line and it
needs to fit in 80chars.  The tutorial tells you about using git with
git log --pretty=oneline --abbrev-commit' to see style used for that
particular file/subsystem.

"changelog" is the next section in the body of the patch. I saw Greg's
message yesterday, and I went off and looked at that a bit.  I think
I always dodge that just by luck and the way I visually like to line
things up.  I googled a bit and see lots of little widgets for
linewrapping text to a certain column size.   Don't know how to
integrate any of those with git commit editing.  Maybe someone else
here does.

w.r.t. using "git commit -m"  - just curious why you are not doing
"git commint -s -v"  per the tutorial?
> 
> The other issue was that my commit didn't apply to his tree. He says
> please rebase and resend. I think I need to do:
> 
assuming you are in your staging tree
> $ git fetch origin
> $ git rebase origin/staging-testing

When this happens git will try to place any commits it finds
in your tree on top of all the stuff it grabbed from greg.
If it doesn't apply nicely, it will give you message to repair.

> Then reformat the patch?

Caveat - if the rebase failed and you had to tweak your patch,
then you may end up needing to git commit --amend -v to update
your changelog.

> $ git format-patch -o ~/mypatches/ HEAD^
> $ mutt -H <file>
> 
> So I don't need to uncommit/recommit?
No, that git rebase does that for you.

Another aside: Whenever Greg sends out a message that he's caught
up on patches, that's certainly a time to rebase.  Also, it could
be part of your daily routine, to make sure you on "top" each
day before you start working on your patches.

Hope that gets you further along,
alisons

> 
> Thanks,
> Liz
> 


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

* Re: Rebase/line wrap question
  2016-09-28 20:25 ` Alison Schofield
@ 2016-09-28 21:49   ` Elizabeth Ferdman
  2016-09-28 22:51     ` Alison Schofield
  0 siblings, 1 reply; 5+ messages in thread
From: Elizabeth Ferdman @ 2016-09-28 21:49 UTC (permalink / raw)
  To: Alison Schofield; +Cc: outreachy-kernel

On Wed, Sep 28, 2016 at 01:25:01PM -0700, Alison Schofield wrote:
> On Wed, Sep 28, 2016 at 12:25:08PM -0700, Elizabeth Ferdman wrote:
> > Hey Alison,
> > 
> > I received some feedback from Greg that I want
> > to fix and I have a bunch of questions. The plus side is that maybe
> > some of the answers could go into the tutorial.
> > 
> > First he said "please wrap your changelog comments at 72 columns."
> > 
> > Is this something I add to my .vimrc? I've been using "git commit -m".
> > Is that causing the issue? I thought git commit messages were supposed
> > to be less than 50 chars anyway. I'm confused.
> 
> "commit message" is that one line message in your Subject line and it
> needs to fit in 80chars.  The tutorial tells you about using git with
> git log --pretty=oneline --abbrev-commit' to see style used for that
> particular file/subsystem.
> 
> "changelog" is the next section in the body of the patch. I saw Greg's
> message yesterday, and I went off and looked at that a bit.  I think
> I always dodge that just by luck and the way I visually like to line
> things up.  I googled a bit and see lots of little widgets for
> linewrapping text to a certain column size.   Don't know how to
> integrate any of those with git commit editing.  Maybe someone else
> here does.
> 
> w.r.t. using "git commit -m"  - just curious why you are not doing
> "git commint -s -v"  per the tutorial?

I meant to say that I have been doing "git commit -s -v -m <msg>"
But I just realized that was pointless and just causing me more work.
> > 
> > The other issue was that my commit didn't apply to his tree. He says
> > please rebase and resend. I think I need to do:
> > 
> assuming you are in your staging tree
> > $ git fetch origin
> > $ git rebase origin/staging-testing
> 
> When this happens git will try to place any commits it finds
> in your tree on top of all the stuff it grabbed from greg.
> If it doesn't apply nicely, it will give you message to repair.
> 
> > Then reformat the patch?
> 
> Caveat - if the rebase failed and you had to tweak your patch,
> then you may end up needing to git commit --amend -v to update
> your changelog.
> 
got it, thanks!
> > $ git format-patch -o ~/mypatches/ HEAD^
> > $ mutt -H <file>
> > 
> > So I don't need to uncommit/recommit?
> No, that git rebase does that for you.
> 
> Another aside: Whenever Greg sends out a message that he's caught
> up on patches, that's certainly a time to rebase.  Also, it could
> be part of your daily routine, to make sure you on "top" each
> day before you start working on your patches.
> 
yes, I had a feeling I should've been rebasing more often but the
tutorial didn't explicitly say that. When we say "rebase" should you
always assume that we're doing both of these commands?
$ git fetch origin 
$ git rebase origin/staging-testing

And would it also be a good idea to actually do those 2 before sending the
patch...?

> Hope that gets you further along,
> alisons
>
Thanks so much for all your help.
Liz
> > 
> > Thanks,
> > Liz
> > 


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

* Re: Rebase/line wrap question
  2016-09-28 21:49   ` Elizabeth Ferdman
@ 2016-09-28 22:51     ` Alison Schofield
  0 siblings, 0 replies; 5+ messages in thread
From: Alison Schofield @ 2016-09-28 22:51 UTC (permalink / raw)
  To: Elizabeth Ferdman; +Cc: outreachy-kernel

On Wed, Sep 28, 2016 at 02:49:15PM -0700, Elizabeth Ferdman wrote:
> On Wed, Sep 28, 2016 at 01:25:01PM -0700, Alison Schofield wrote:
> > On Wed, Sep 28, 2016 at 12:25:08PM -0700, Elizabeth Ferdman wrote:
> > > Hey Alison,
> > > 
> > > I received some feedback from Greg that I want
> > > to fix and I have a bunch of questions. The plus side is that maybe
> > > some of the answers could go into the tutorial.
> > > 
> > > First he said "please wrap your changelog comments at 72 columns."
> > > 
> > > Is this something I add to my .vimrc? I've been using "git commit -m".
> > > Is that causing the issue? I thought git commit messages were supposed
> > > to be less than 50 chars anyway. I'm confused.
> > 
> > "commit message" is that one line message in your Subject line and it
> > needs to fit in 80chars.  The tutorial tells you about using git with
> > git log --pretty=oneline --abbrev-commit' to see style used for that
> > particular file/subsystem.
> > 
> > "changelog" is the next section in the body of the patch. I saw Greg's
> > message yesterday, and I went off and looked at that a bit.  I think
> > I always dodge that just by luck and the way I visually like to line
> > things up.  I googled a bit and see lots of little widgets for
> > linewrapping text to a certain column size.   Don't know how to
> > integrate any of those with git commit editing.  Maybe someone else
> > here does.
> > 
> > w.r.t. using "git commit -m"  - just curious why you are not doing
> > "git commint -s -v"  per the tutorial?
> 
> I meant to say that I have been doing "git commit -s -v -m <msg>"
> But I just realized that was pointless and just causing me more work.
> > > 
> > > The other issue was that my commit didn't apply to his tree. He says
> > > please rebase and resend. I think I need to do:
> > > 
> > assuming you are in your staging tree
> > > $ git fetch origin
> > > $ git rebase origin/staging-testing
> > 
> > When this happens git will try to place any commits it finds
> > in your tree on top of all the stuff it grabbed from greg.
> > If it doesn't apply nicely, it will give you message to repair.
> > 
> > > Then reformat the patch?
> > 
> > Caveat - if the rebase failed and you had to tweak your patch,
> > then you may end up needing to git commit --amend -v to update
> > your changelog.
> > 
> got it, thanks!
> > > $ git format-patch -o ~/mypatches/ HEAD^
> > > $ mutt -H <file>
> > > 
> > > So I don't need to uncommit/recommit?
> > No, that git rebase does that for you.
> > 
> > Another aside: Whenever Greg sends out a message that he's caught
> > up on patches, that's certainly a time to rebase.  Also, it could
> > be part of your daily routine, to make sure you on "top" each
> > day before you start working on your patches.
> > 
> yes, I had a feeling I should've been rebasing more often but the
> tutorial didn't explicitly say that. When we say "rebase" should you
> always assume that we're doing both of these commands?
> $ git fetch origin 
> $ git rebase origin/staging-testing

That a Yes, from me, because I still follow the routines I learned in that
first patch tutorial.  I've seen other methods, but I keep doing this 
simple method that works for me.  
> 
> And would it also be a good idea to actually do those 2 before sending the
> patch...?
Yes.  

> 
> > Hope that gets you further along,
> > alisons
> >
> Thanks so much for all your help.
> Liz
> > > 
> > > Thanks,
> > > Liz
> > > 


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

* Re: [Outreachy kernel] Rebase/line wrap question
  2016-09-28 19:25 Rebase/line wrap question Elizabeth Ferdman
  2016-09-28 20:25 ` Alison Schofield
@ 2016-09-29  6:19 ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2016-09-29  6:19 UTC (permalink / raw)
  To: Elizabeth Ferdman; +Cc: amsfield22, outreachy-kernel

On Wed, Sep 28, 2016 at 12:25:08PM -0700, Elizabeth Ferdman wrote:
> Hey Alison,
> 
> I received some feedback from Greg that I want
> to fix and I have a bunch of questions. The plus side is that maybe
> some of the answers could go into the tutorial.
> 
> First he said "please wrap your changelog comments at 72 columns."
> 
> Is this something I add to my .vimrc? I've been using "git commit -m".
> Is that causing the issue? I thought git commit messages were supposed
> to be less than 50 chars anyway. I'm confused.
> 
> The other issue was that my commit didn't apply to his tree. He says
> please rebase and resend. I think I need to do:
> 
> $ git fetch origin
> $ git rebase origin/staging-testing
> Then reformat the patch?

If you use 'git rebase -i origin/staging-testing' you will get the
option to reformat/rewrite the commit message for the patch (it will be
one of the options for the list of commits, see the git rebase
documentation for details).

That's what I use when I have to rebase and edit things up, saves you a
step or two.

hope this helps,

greg k-h


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

end of thread, other threads:[~2016-09-29  6:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-28 19:25 Rebase/line wrap question Elizabeth Ferdman
2016-09-28 20:25 ` Alison Schofield
2016-09-28 21:49   ` Elizabeth Ferdman
2016-09-28 22:51     ` Alison Schofield
2016-09-29  6:19 ` [Outreachy kernel] " Greg KH

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.