emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Sending commits to Org
@ 2012-09-20 11:40 Sebastien Vauban
  2012-09-20 17:07 ` Philipp Kroos
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastien Vauban @ 2012-09-20 11:40 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Just a Git question that puzzles me for long about how to send commits per
email to Org ML?

In the documentation (http://orgmode.org/worg/org-contribute.html), it's
written:

#+begin_src sh
  git commit -m "Your message"
  git format-patch master
#+end_src          ^^^^^^

When I follow it, there is no 0001-patch.txt file created...

I must write:

#+begin_src sh
  git format-patch origin/master
#+end_src          ^^^^^^^^^^^^^

for such patch files to be created. Is it a documentation bug, or some feature
of my (Git) installation?

Best regards,
  Seb


-- 
Sebastien Vauban

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

* Re: Sending commits to Org
  2012-09-20 11:40 Sending commits to Org Sebastien Vauban
@ 2012-09-20 17:07 ` Philipp Kroos
  2012-09-22 17:58   ` Jarmo Hurri
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Kroos @ 2012-09-20 17:07 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: wxhgmqzgwmuf

Hi,

I think you're still on master when you make your changes.
git maintains your *local copy* of master as 'master', whereas the 
original, unchanged upstream branch master is still available as 
'origin/master'. You create a patch against a different branch, and 
since you are on 'master' which differs from 'origin/master', it works 
like you described.
If you first create a branch on your side and switch to it before making 
changes, you can run format-patch against your local copy of master as 
well.
That is,

#+begin_src sh
  git branch local
  git checkout local
  # make your changes
  git commit -m "Your message"
  git format-patch master
#+end_src          ^^^^^^

This is also the procedure described in 
http://orgmode.org/worg/org-contribute.html#sec-4
under *Sending commits, and it should work fine this way.

philipp


On Thu, Sep 20, 2012 at 01:40:55PM +0200, Sebastien Vauban wrote:
> Hello,
> 
> Just a Git question that puzzles me for long about how to send commits per
> email to Org ML?
> 
> In the documentation (http://orgmode.org/worg/org-contribute.html), it's
> written:
> 
> #+begin_src sh
>   git commit -m "Your message"
>   git format-patch master
> #+end_src          ^^^^^^
> 
> When I follow it, there is no 0001-patch.txt file created...
> 
> I must write:
> 
> #+begin_src sh
>   git format-patch origin/master
> #+end_src          ^^^^^^^^^^^^^
> 
> for such patch files to be created. Is it a documentation bug, or some feature
> of my (Git) installation?
> 
> Best regards,
>   Seb
> 
> 
> -- 
> Sebastien Vauban
> 
> 

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

* Re: Sending commits to Org
  2012-09-20 17:07 ` Philipp Kroos
@ 2012-09-22 17:58   ` Jarmo Hurri
  2012-09-23  7:21     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Jarmo Hurri @ 2012-09-22 17:58 UTC (permalink / raw)
  To: emacs-orgmode

Philipp Kroos <Philipp.Kroos@t-online.de> writes:

> If you first create a branch on your side and switch to it before
> making changes, you can run format-patch against your local copy of
> master as well.

Or, if you are a git newbie like me, and fail to read the relevant part
of the org page on contributing, and make your changes in the original
master, you can also create patches from the original master branch
using the HEAD identifier. For example,

git format-patch HEAD~1

gives you a patch of the last commita. If, after having made your changes
in the master branch, a pull has resulted in newer changes, you can
create more patches by increasing the "argument" to head. For example,
currently I need to run

git format-patch HEAD~3

to re-create a patch of my own, local changes. I hope (?) this patch is
as good as one that would be created by having my own branch.

Sorry if the terminology is a bit mixed, but as I said, I am a git
newbie. (As a long-time CVS user I would need to reserve some time to
study the manual...)

--
Jarmo

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

* Re: Sending commits to Org
  2012-09-22 17:58   ` Jarmo Hurri
@ 2012-09-23  7:21     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2012-09-23  7:21 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-orgmode

Hi Jarmo,

Jarmo Hurri <jarmo.hurri@syk.fi> writes:

> Or, if you are a git newbie like me, and fail to read the relevant part
> of the org page on contributing, and make your changes in the original
> master, you can also create patches from the original master branch
> using the HEAD identifier.

You should try to always edit from a dedicated branch.

If you commit something in master and want to discard this
commit later on, you will end up in trouble.  

Git makes it really easy to deal with branch.  I found this
short and useful video:

  http://www.youtube.com/watch?v=RDGzF2M-zlo

HTH,

-- 
 Bastien

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

end of thread, other threads:[~2012-09-23  7:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-20 11:40 Sending commits to Org Sebastien Vauban
2012-09-20 17:07 ` Philipp Kroos
2012-09-22 17:58   ` Jarmo Hurri
2012-09-23  7:21     ` 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).