emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Assistance with patching instructions on Worg
@ 2014-01-31 21:33 John Hendy
  2014-01-31 21:50 ` Thomas S. Dye
  2014-01-31 22:23 ` Josiah Schwab
  0 siblings, 2 replies; 10+ messages in thread
From: John Hendy @ 2014-01-31 21:33 UTC (permalink / raw)
  To: emacs-orgmode

Greetings,


I've only contributed to Worg, not the Org manual. I want to submit a
change to the documentation per an earlier discussion.[1] I'm
attempting to follow the Worg suggestion for submitting patches.[2]

Here was my process

cd ~/.elisp/org.git
git pull
make clean && make

git branch org-src-preserve-whitespace
git checkout org-src-preserve-whitespace

emacs doc/org.texi

[make changes to documentation]

git commit -m "Update documentation to org-src-preserve-indentation."

git format-patch master

But no files were generated... Am I doing something incorrectly?

Here's the current output of =git status=

On branch org-src-preserve-whitespace
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

modified:   doc/org.texi

no changes added to commit (use "git add" and/or "git commit -a")

UPDATE: just on a whim, I did `git commit -am "notes"` and now it
works. Since the file exists, why is -am necessary vs. just -m? Or
perhaps another question is why Worg suggests just -m. Should/would
this work under some circumstance?

I can update Worg with -am if this is the proper/necessary way.


Thanks,
John

[1] https://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg01505.html
[2] http://orgmode.org/worg/org-contribute.html#sec-4

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

* Re: Assistance with patching instructions on Worg
  2014-01-31 21:33 Assistance with patching instructions on Worg John Hendy
@ 2014-01-31 21:50 ` Thomas S. Dye
  2014-01-31 21:58   ` John Hendy
  2014-01-31 22:23 ` Josiah Schwab
  1 sibling, 1 reply; 10+ messages in thread
From: Thomas S. Dye @ 2014-01-31 21:50 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

Hi John,

John Hendy <jw.hendy@gmail.com> writes:

> Greetings,
>
>
> I've only contributed to Worg, not the Org manual. I want to submit a
> change to the documentation per an earlier discussion.[1] I'm
> attempting to follow the Worg suggestion for submitting patches.[2]
>
> Here was my process
>
> cd ~/.elisp/org.git
> git pull
> make clean && make
>
> git branch org-src-preserve-whitespace
> git checkout org-src-preserve-whitespace
>
> emacs doc/org.texi
>
> [make changes to documentation]
>
> git commit -m "Update documentation to org-src-preserve-indentation."
>
> git format-patch master

Here is what I do:

 1. commit your changes to your local copy of the org-mode repository
 
 2. run the following command to wrap up the latest commit on your
       local copy of the repository into a file which can be attached
       to email messages

           git format-patch -o ~/temp/ HEAD~1

       after the command finished you will notice a new file in ~/temp
       with a name like 0001-commit-message-stuff.patch

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: Assistance with patching instructions on Worg
  2014-01-31 21:50 ` Thomas S. Dye
@ 2014-01-31 21:58   ` John Hendy
  0 siblings, 0 replies; 10+ messages in thread
From: John Hendy @ 2014-01-31 21:58 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode

On Fri, Jan 31, 2014 at 3:50 PM, Thomas S. Dye <tsd@tsdye.com> wrote:
> Hi John,
>
> John Hendy <jw.hendy@gmail.com> writes:
>
>> Greetings,
>>
>>
>> I've only contributed to Worg, not the Org manual. I want to submit a
>> change to the documentation per an earlier discussion.[1] I'm
>> attempting to follow the Worg suggestion for submitting patches.[2]
>>
>> Here was my process
>>
>> cd ~/.elisp/org.git
>> git pull
>> make clean && make
>>
>> git branch org-src-preserve-whitespace
>> git checkout org-src-preserve-whitespace
>>
>> emacs doc/org.texi
>>
>> [make changes to documentation]
>>
>> git commit -m "Update documentation to org-src-preserve-indentation."
>>
>> git format-patch master
>
> Here is what I do:
>
>  1. commit your changes to your local copy of the org-mode repository
>
>  2. run the following command to wrap up the latest commit on your
>        local copy of the repository into a file which can be attached
>        to email messages
>
>            git format-patch -o ~/temp/ HEAD~1
>
>        after the command finished you will notice a new file in ~/temp
>        with a name like 0001-commit-message-stuff.patch
>

I can try that, though I'll have to try and figure out how to "un git
commit -am" my file so that I can see if it works with just having
done "git commit -m". Otherwise, I'll just futz with another file and
try your process.

Based on the Worg instructions... is your way preferred, or was
anything wrong with my process such that Worg's instructions *should
have* worked? It seems that they wouldn't work as-is, so if that's the
case, I'll update Worg with the best practice per the list's input.


John

> hth,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com

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

* Re: Assistance with patching instructions on Worg
  2014-01-31 21:33 Assistance with patching instructions on Worg John Hendy
  2014-01-31 21:50 ` Thomas S. Dye
@ 2014-01-31 22:23 ` Josiah Schwab
  2014-01-31 22:34   ` John Hendy
  1 sibling, 1 reply; 10+ messages in thread
From: Josiah Schwab @ 2014-01-31 22:23 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode


jw.hendy@gmail.com writes:

> emacs doc/org.texi
>
> [make changes to documentation]
>
> git commit -m "Update documentation to org-src-preserve-indentation."
>
> git format-patch master
>
> But no files were generated... Am I doing something incorrectly?

Yes.  You need to explicitly add your changes to the index.

  git add doc/org.text

then git commit -m "message" will behave as you expect.

(Using "git commit -a" worked, because that is like doing a "git add" to
all modified files.)

It sounds like you misunderstand what "git add" does.  If you read a
little bit more about git workflows, I think it will make sense to you.

Perhaps the following link would be useful:
http://stackoverflow.com/questions/3689838/difference-between-head-working-tree-index-in-git

Hope that helps,
Josiah

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

* Re: Assistance with patching instructions on Worg
  2014-01-31 22:23 ` Josiah Schwab
@ 2014-01-31 22:34   ` John Hendy
  2014-01-31 22:51     ` Nick Dokos
  2014-01-31 22:57     ` Josiah Schwab
  0 siblings, 2 replies; 10+ messages in thread
From: John Hendy @ 2014-01-31 22:34 UTC (permalink / raw)
  To: Josiah Schwab; +Cc: emacs-orgmode

On Fri, Jan 31, 2014 at 4:23 PM, Josiah Schwab <jschwab@gmail.com> wrote:
>
> jw.hendy@gmail.com writes:
>
>> emacs doc/org.texi
>>
>> [make changes to documentation]
>>
>> git commit -m "Update documentation to org-src-preserve-indentation."
>>
>> git format-patch master
>>
>> But no files were generated... Am I doing something incorrectly?
>
> Yes.  You need to explicitly add your changes to the index.
>
>   git add doc/org.text
>
> then git commit -m "message" will behave as you expect.
>
> (Using "git commit -a" worked, because that is like doing a "git add" to
> all modified files.)
>
> It sounds like you misunderstand what "git add" does.  If you read a
> little bit more about git workflows, I think it will make sense to you.

Perhaps, though I'm familiar with `git -am "comment"` on my own stuff.
I was just following along with Worg, which doesn't mention doing
that. I'm now thinking that `git add` must be implied in the line
=make some changes (1)=?


John

>
> Perhaps the following link would be useful:
> http://stackoverflow.com/questions/3689838/difference-between-head-working-tree-index-in-git
>
> Hope that helps,
> Josiah
>

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

* Re: Assistance with patching instructions on Worg
  2014-01-31 22:34   ` John Hendy
@ 2014-01-31 22:51     ` Nick Dokos
  2014-01-31 22:57     ` Josiah Schwab
  1 sibling, 0 replies; 10+ messages in thread
From: Nick Dokos @ 2014-01-31 22:51 UTC (permalink / raw)
  To: emacs-orgmode

John Hendy <jw.hendy@gmail.com> writes:

> On Fri, Jan 31, 2014 at 4:23 PM, Josiah Schwab <jschwab@gmail.com> wrote:
>>
>> jw.hendy@gmail.com writes:
>>
>>> emacs doc/org.texi
>>>
>>> [make changes to documentation]
>>>
>>> git commit -m "Update documentation to org-src-preserve-indentation."
>>>
>>> git format-patch master
>>>
>>> But no files were generated... Am I doing something incorrectly?
>>
>> Yes.  You need to explicitly add your changes to the index.
>>
>>   git add doc/org.text
>>
>> then git commit -m "message" will behave as you expect.
>>
>> (Using "git commit -a" worked, because that is like doing a "git add" to
>> all modified files.)
>>
>> It sounds like you misunderstand what "git add" does.  If you read a
>> little bit more about git workflows, I think it will make sense to you.
>
> Perhaps, though I'm familiar with `git -am "comment"` on my own stuff.
> I was just following along with Worg, which doesn't mention doing
> that. I'm now thinking that `git add` must be implied in the line
> =make some changes (1)=?
>

No, it does need the git add (or equivalently in this case, git commit -a).
Worg is wrong, so if you could fix it, that would be good.

One additional point: ``git status'' is invaluable. The first thing I do
when I go into a git repo or after an interruption is ``git status'' to
orient myself. It tells me what branch I'm on, what files are modified,
what files have been added already so they will be part of the next
commit, what files are present but not part of the repo and it gives you
explicit instructions about how to undo anything that is not right
*before* you commit.

Nick

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

* Re: Assistance with patching instructions on Worg
  2014-01-31 22:34   ` John Hendy
  2014-01-31 22:51     ` Nick Dokos
@ 2014-01-31 22:57     ` Josiah Schwab
  2014-01-31 22:59       ` John Hendy
  1 sibling, 1 reply; 10+ messages in thread
From: Josiah Schwab @ 2014-01-31 22:57 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode


jw.hendy@gmail.com writes:

> I was just following along with Worg, which doesn't mention doing
> that. I'm now thinking that `git add` must be implied in the line
> =make some changes (1)=?

Yes, I agree; as written, there is an implicit `git add`.  I think it
would be reasonable to make that explicit.

Best,
Josiah

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

* Re: Assistance with patching instructions on Worg
  2014-01-31 22:57     ` Josiah Schwab
@ 2014-01-31 22:59       ` John Hendy
  2014-02-02 15:27         ` John Hendy
  0 siblings, 1 reply; 10+ messages in thread
From: John Hendy @ 2014-01-31 22:59 UTC (permalink / raw)
  To: Josiah Schwab; +Cc: emacs-orgmode

On Fri, Jan 31, 2014 at 4:57 PM, Josiah Schwab <jschwab@gmail.com> wrote:
>
> jw.hendy@gmail.com writes:
>
>> I was just following along with Worg, which doesn't mention doing
>> that. I'm now thinking that `git add` must be implied in the line
>> =make some changes (1)=?
>
> Yes, I agree; as written, there is an implicit `git add`.  I think it
> would be reasonable to make that explicit.

Will do, and thanks for the quick assistance all!

John

>
> Best,
> Josiah

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

* Re: Assistance with patching instructions on Worg
  2014-01-31 22:59       ` John Hendy
@ 2014-02-02 15:27         ` John Hendy
  2014-02-02 17:28           ` Bastien
  0 siblings, 1 reply; 10+ messages in thread
From: John Hendy @ 2014-02-02 15:27 UTC (permalink / raw)
  To: Josiah Schwab; +Cc: emacs-orgmode

Just confirming the change of Worg. I used the same format specified
in the Worg git page:
- Changed page: http://orgmode.org/worg/org-contribute.html#sec-4-2
- Worg git referred to: http://orgmode.org/worg/worg-git.html

Having seen that page, I wondered if it should instructions to use
`git add file.ext` if files are created? I left that alone for now,
figuring that I'm at a lower-than-most level of git intelligence :)

By the way, I love that Worg updates immediately now!


John

On Fri, Jan 31, 2014 at 4:59 PM, John Hendy <jw.hendy@gmail.com> wrote:
> On Fri, Jan 31, 2014 at 4:57 PM, Josiah Schwab <jschwab@gmail.com> wrote:
>>
>> jw.hendy@gmail.com writes:
>>
>>> I was just following along with Worg, which doesn't mention doing
>>> that. I'm now thinking that `git add` must be implied in the line
>>> =make some changes (1)=?
>>
>> Yes, I agree; as written, there is an implicit `git add`.  I think it
>> would be reasonable to make that explicit.
>
> Will do, and thanks for the quick assistance all!
>
> John
>
>>
>> Best,
>> Josiah

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

* Re: Assistance with patching instructions on Worg
  2014-02-02 15:27         ` John Hendy
@ 2014-02-02 17:28           ` Bastien
  0 siblings, 0 replies; 10+ messages in thread
From: Bastien @ 2014-02-02 17:28 UTC (permalink / raw)
  To: John Hendy; +Cc: Josiah Schwab, emacs-orgmode

Hi John,

thanks for the update on Worg!

John Hendy <jw.hendy@gmail.com> writes:

> Having seen that page, I wondered if it should instructions to use
> `git add file.ext` if files are created? I left that alone for now,
> figuring that I'm at a lower-than-most level of git intelligence :)

When it comes to Git instructions, we are never explicit enough,
so feel free to give as much details as you (needed) want.

Thanks!

-- 
 Bastien

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

end of thread, other threads:[~2014-02-02 17:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-31 21:33 Assistance with patching instructions on Worg John Hendy
2014-01-31 21:50 ` Thomas S. Dye
2014-01-31 21:58   ` John Hendy
2014-01-31 22:23 ` Josiah Schwab
2014-01-31 22:34   ` John Hendy
2014-01-31 22:51     ` Nick Dokos
2014-01-31 22:57     ` Josiah Schwab
2014-01-31 22:59       ` John Hendy
2014-02-02 15:27         ` John Hendy
2014-02-02 17:28           ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).