git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Documentation/howto: tracking git.git
@ 2021-05-14 12:49 Bagas Sanjaya
  2021-05-14 13:49 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Bagas Sanjaya @ 2021-05-14 12:49 UTC (permalink / raw)
  To: git; +Cc: gitster, Bagas Sanjaya

Document how to track git.git repository for Git development.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Documentation/Makefile                  |  1 +
 Documentation/howto/tracking-gitgit.txt | 79 +++++++++++++++++++++++++
 2 files changed, 80 insertions(+)
 create mode 100644 Documentation/howto/tracking-gitgit.txt

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 2aae4c9cbb..2b5b8b28b0 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -84,6 +84,7 @@ SP_ARTICLES += howto/rebase-from-internal-branch
 SP_ARTICLES += howto/keep-canonical-history-correct
 SP_ARTICLES += howto/maintain-git
 SP_ARTICLES += howto/coordinate-embargoed-releases
+SP_ARTICLES += howto/tracking-gitgit
 API_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt)))
 SP_ARTICLES += $(API_DOCS)
 
diff --git a/Documentation/howto/tracking-gitgit.txt b/Documentation/howto/tracking-gitgit.txt
new file mode 100644
index 0000000000..61dbd2540b
--- /dev/null
+++ b/Documentation/howto/tracking-gitgit.txt
@@ -0,0 +1,79 @@
+From: Bagas Sanjaya <bagasdotme@gmail.com>
+Date: Fri, 14 May 2021 13:26:33 +0700
+Subject: Tracking git.git
+Abstract: How to track git.git repository for Git development
+Content-type: text/asciidoc
+
+Tracking git.git
+================
+
+This short document shows how to track git.git (source code repository
+for Git) for purposes of Git development.
+
+Available Branches
+------------------
+
+There are several branches on git.git with different purposes:
+
+master::
+This is the most stable branch. Changes (topics) that are merged
+to master should have been stabilized in next and suitable for
+production use. Feature releases (vX.Y.0) are cut from this
+branch.
+
+next::
+This is where topics that haven't been yet merged to master are
+stabilized and tested for breakage and regressions. It gives
+a summary forecast of what next batch of topics that will be
+merged to master looks like.
+
+seen::
+This is the most bleeding edge branch where all excited
+developments happened. All proposed topics are queued in seen
+by the maintainer. However, these may be buggy (have breakage or
+regressions). When topics queued are deemed good and ready for
+inclusion, they are graduated to next for stabilization.
+
+maint::
+This branch is used for preparing maintenance releases. Bugfixes
+for feature release (vX.Y.0) are accumulated in maint. Then at
+some point, the tip of the branch is tagged with vX.Y.Z.
+
+todo::
+This contains helper tools written by the maintainer to ease
+maintaining Git. Also, "What's cooking in Git" messages are
+prepared in todo before being sent to the mailing list.
+
+Tracking
+--------
+
+If you don't have git.git clone handy, you can obtain one by:
+
+----
+$ git clone https://github.com/git/git.git git
+----
+
+Now you can start hacking your topics. Don't forget to read
+`Documentation/SubmittingPatches` for instructions on patch
+submission.
+
+After some time, there will be updates to git.git. First, fetch them:
+
+----
+$ git fetch origin
+----
+
+Then pull the updates.
+
+ - For `master`, `next`, `maint`, and `todo`, you can do fast-forward
+   pull:
+
+ $ git pull --ff-only
+
+ - For `seen`, DO NOT pull with `git pull`. This is because seen is
+   in constant flux, and most often your local seen is divergent from
+   the origin, caused by force-push from the maintainer. Attempting
+   to pull either via merge or rebase will most likely end in
+   conflict. Instead, pull by resetting the local seen to the origin:
+
+ $ git reset --hard origin/seen

base-commit: df6c4f722c94641d5a9ea5496511f7043433abc2
-- 
2.25.1


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

* Re: [PATCH] Documentation/howto: tracking git.git
  2021-05-14 12:49 [PATCH] Documentation/howto: tracking git.git Bagas Sanjaya
@ 2021-05-14 13:49 ` Junio C Hamano
  2021-05-14 15:27   ` Đoàn Trần Công Danh
  2021-05-15  3:32   ` Bagas Sanjaya
  0 siblings, 2 replies; 5+ messages in thread
From: Junio C Hamano @ 2021-05-14 13:49 UTC (permalink / raw)
  To: Bagas Sanjaya; +Cc: git

Bagas Sanjaya <bagasdotme@gmail.com> writes:

> +Available Branches
> +------------------
> +
> +There are several branches on git.git with different purposes:
> +
> +master::
> +This is the most stable branch. Changes (topics) that are merged
> +to master should have been stabilized in next and suitable for
> +production use. Feature releases (vX.Y.0) are cut from this
> +branch.

Isn't "maint" meant to be more stable?

> +next::
> +This is where topics that haven't been yet merged to master are
> +stabilized and tested for breakage and regressions. It gives
> +a summary forecast of what next batch of topics that will be
> +merged to master looks like.
> +
> +seen::
> +This is the most bleeding edge branch where all excited
> +developments happened. All proposed topics are queued in seen
> +by the maintainer. However, these may be buggy (have breakage or
> +regressions). When topics queued are deemed good and ready for
> +inclusion, they are graduated to next for stabilization.

This is inconsistent with what has been written elsewhere about this
integration branch.  In short, you should not read anything more
than "the maintainer happens to have seen these topics" out of the
fact that a topic is in 'seen'.  Not all proposed topics will be in
this branch, and a branch that was in 'seen' on one day may not be
there the next day, but that does not mean anything (certainly it
does not mean the topic has been "rejected").

> +Tracking
> +--------
> +
> +If you don't have git.git clone handy, you can obtain one by:
> +
> +----
> +$ git clone https://github.com/git/git.git git
> +----
> +
> +Now you can start hacking your topics. Don't forget to read
> +`Documentation/SubmittingPatches` for instructions on patch
> +submission.
> +
> +After some time, there will be updates to git.git. First, fetch them:
> +
> +----
> +$ git fetch origin
> +----
> +
> +Then pull the updates.
> +
> + - For `master`, `next`, `maint`, and `todo`, you can do fast-forward
> +   pull:
> +
> + $ git pull --ff-only

I do not see a point in doing this for all of these branches, and
I'd rather not to see this recommended to people who "track to
develop" at all.  It may make sense to do so if you do not do any
development of your own and will always stay on 'master' to check
out, build, test and install from the upstream, though.

For those who track to develop", if you want a reference point to
work from, you can do "git fetch origin" and then run

    $ git checkout -b mytopic origin/master

for a new feature, and

    $ git checkout -b myfix origin/maint

for a fix.  You can track your progress with

    $ git log origin/master..mytopic
    $ git log origin/master..myfix

If you are fixing a longstanding bug, you may even want to do

    $ git checkout -b myfix-for-2.29-and-above v2.29.3
    $ git log origin/master..myfix-for-2.29-and-above

To test your various topics, you would then do

    $ git checkout -B trial origin/master
    $ git merge mytopic
    $ git merge myfix
    ... build, test, install, employ it for daily use ...

And you can make sure you do not step on toes of others by doing
trial merges

    $ git checkout -B trial origin/seen ;# or origin/next
    $ git merge mytopic
    $ git merge myfix
    ... build and test

which is highly recommended.  This will give you a chance to notice
who, if any, are working in areas of the codebase that potentially
overlaps with what you are working on before you even send out your
series for review.

> + - For `seen`, DO NOT pull with `git pull`. This is because seen is
> +   in constant flux, and most often your local seen is divergent from
> +   the origin, caused by force-push from the maintainer. Attempting
> +   to pull either via merge or rebase will most likely end in
> +   conflict. Instead, pull by resetting the local seen to the origin:
> +
> + $ git reset --hard origin/seen

Even better, do not even create your own 'seen' branch at all.  If
you are interested in what is going on

    $ git log --first-parent --oneline origin/master..origin/seen

might be worth paying attention to, and checking out the tip of
topics of other people you seen in the output and playing with it on
a detached HEAD may also be useful, and if you find bugs in other's
work, you can futz with the code from that commit and you may end up
with a patch you can send as an improvement suggestion to the
original author of the topic.  But 'seen' as a whole is rarely of
interest, except for the purpose of learning what other topics may
be in flight.  Nobody sane is supposed to be running the version
from 'seen'; after all, the selection criteria of the topics in it
is "some of the topics that the maintainer happened to have seen",
and not even "these topics are interesting, promising and are wished
to be in 'next' someday".


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

* Re: [PATCH] Documentation/howto: tracking git.git
  2021-05-14 13:49 ` Junio C Hamano
@ 2021-05-14 15:27   ` Đoàn Trần Công Danh
  2021-05-15  3:32   ` Bagas Sanjaya
  1 sibling, 0 replies; 5+ messages in thread
From: Đoàn Trần Công Danh @ 2021-05-14 15:27 UTC (permalink / raw)
  To: Bagas Sanjaya; +Cc: git, Junio C Hamano

On 2021-05-14 22:49:52+0900, Junio C Hamano <gitster@pobox.com> wrote:
> Bagas Sanjaya <bagasdotme@gmail.com> writes:
> 
> > +Available Branches
> > +------------------
> > +
> > +There are several branches on git.git with different purposes:
> > +
> > +master::
> > +This is the most stable branch. Changes (topics) that are merged
> > +to master should have been stabilized in next and suitable for
> > +production use. Feature releases (vX.Y.0) are cut from this
> > +branch.
> 
> Isn't "maint" meant to be more stable?
> 
> > +next::
> > +This is where topics that haven't been yet merged to master are
> > +stabilized and tested for breakage and regressions. It gives
> > +a summary forecast of what next batch of topics that will be
> > +merged to master looks like.
> > +
> > +seen::
> > +This is the most bleeding edge branch where all excited
> > +developments happened. All proposed topics are queued in seen
> > +by the maintainer. However, these may be buggy (have breakage or
> > +regressions). When topics queued are deemed good and ready for
> > +inclusion, they are graduated to next for stabilization.
> 
> This is inconsistent with what has been written elsewhere about this
> integration branch.  In short, you should not read anything more
> than "the maintainer happens to have seen these topics" out of the
> fact that a topic is in 'seen'.  Not all proposed topics will be in
> this branch, and a branch that was in 'seen' on one day may not be
> there the next day, but that does not mean anything (certainly it
> does not mean the topic has been "rejected").

Well, I think most of this document's points has been written in
Documentation/howto/maintain-git.txt and
Documentation/SubmittingPatches.txt.

With only 2 above points, I think if we have this document in,
we'll have more things to maintain :shrug:

-- 
Danh

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

* Re: [PATCH] Documentation/howto: tracking git.git
  2021-05-14 13:49 ` Junio C Hamano
  2021-05-14 15:27   ` Đoàn Trần Công Danh
@ 2021-05-15  3:32   ` Bagas Sanjaya
  2021-05-16  0:57     ` Junio C Hamano
  1 sibling, 1 reply; 5+ messages in thread
From: Bagas Sanjaya @ 2021-05-15  3:32 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On 14/05/21 20.49, Junio C Hamano wrote:
> Bagas Sanjaya <bagasdotme@gmail.com> writes:
> 
>> +Available Branches
>> +------------------
>> +
>> +There are several branches on git.git with different purposes:
>> +
>> +master::
>> +This is the most stable branch. Changes (topics) that are merged
>> +to master should have been stabilized in next and suitable for
>> +production use. Feature releases (vX.Y.0) are cut from this
>> +branch.
> 
> Isn't "maint" meant to be more stable?
> 

I think "maint" is maintenance branch for latest feature release.
For feature stabilization it happens on "main", so "master" is fully
polished.

>> +next::
>> +This is where topics that haven't been yet merged to master are
>> +stabilized and tested for breakage and regressions. It gives
>> +a summary forecast of what next batch of topics that will be
>> +merged to master looks like.
>> +
>> +seen::
>> +This is the most bleeding edge branch where all excited
>> +developments happened. All proposed topics are queued in seen
>> +by the maintainer. However, these may be buggy (have breakage or
>> +regressions). When topics queued are deemed good and ready for
>> +inclusion, they are graduated to next for stabilization.
> 
> This is inconsistent with what has been written elsewhere about this
> integration branch.  In short, you should not read anything more
> than "the maintainer happens to have seen these topics" out of the
> fact that a topic is in 'seen'.  Not all proposed topics will be in
> this branch, and a branch that was in 'seen' on one day may not be
> there the next day, but that does not mean anything (certainly it
> does not mean the topic has been "rejected").
> 
>> +Tracking
>> +--------
>> +
>> +If you don't have git.git clone handy, you can obtain one by:
>> +
>> +----
>> +$ git clone https://github.com/git/git.git git
>> +----
>> +
>> +Now you can start hacking your topics. Don't forget to read
>> +`Documentation/SubmittingPatches` for instructions on patch
>> +submission.
>> +
>> +After some time, there will be updates to git.git. First, fetch them:
>> +
>> +----
>> +$ git fetch origin
>> +----
>> +
>> +Then pull the updates.
>> +
>> + - For `master`, `next`, `maint`, and `todo`, you can do fast-forward
>> +   pull:
>> +
>> + $ git pull --ff-only
> 
> I do not see a point in doing this for all of these branches, and
> I'd rather not to see this recommended to people who "track to
> develop" at all.  It may make sense to do so if you do not do any
> development of your own and will always stay on 'master' to check
> out, build, test and install from the upstream, though.
> 

But when someone clones git.git, Git will automatically checkout default
branch (which is "master") after cloning. If he wants to checkout other
branches, he had to "git checkout next" for example. I wrote it above
under the assumption that someone had already checkout other branches
before.

> For those who track to develop", if you want a reference point to
> work from, you can do "git fetch origin" and then run
> 
>      $ git checkout -b mytopic origin/master
> 
> for a new feature, and
> 
>      $ git checkout -b myfix origin/maint
> 
> for a fix.  You can track your progress with
> 
>      $ git log origin/master..mytopic
>      $ git log origin/master..myfix
> 

I think git log above shows only commits that are on mytopic/myfix/
whatever that aren't on origin/master.

> If you are fixing a longstanding bug, you may even want to do
> 
>      $ git checkout -b myfix-for-2.29-and-above v2.29.3
>      $ git log origin/master..myfix-for-2.29-and-above
> 
> To test your various topics, you would then do
> 
>      $ git checkout -B trial origin/master
>      $ git merge mytopic
>      $ git merge myfix
>      ... build, test, install, employ it for daily use ...
> 
> And you can make sure you do not step on toes of others by doing
> trial merges
> 
>      $ git checkout -B trial origin/seen ;# or origin/next
>      $ git merge mytopic
>      $ git merge myfix
>      ... build and test
> 
> which is highly recommended.  This will give you a chance to notice
> who, if any, are working in areas of the codebase that potentially
> overlaps with what you are working on before you even send out your
> series for review.
> 
>> + - For `seen`, DO NOT pull with `git pull`. This is because seen is
>> +   in constant flux, and most often your local seen is divergent from
>> +   the origin, caused by force-push from the maintainer. Attempting
>> +   to pull either via merge or rebase will most likely end in
>> +   conflict. Instead, pull by resetting the local seen to the origin:
>> +
>> + $ git reset --hard origin/seen
> 
> Even better, do not even create your own 'seen' branch at all.  If
> you are interested in what is going on
> 
>      $ git log --first-parent --oneline origin/master..origin/seen
> 

OK.

> might be worth paying attention to, and checking out the tip of
> topics of other people you seen in the output and playing with it on
> a detached HEAD may also be useful, and if you find bugs in other's
> work, you can futz with the code from that commit and you may end up
> with a patch you can send as an improvement suggestion to the
> original author of the topic.  But 'seen' as a whole is rarely of
> interest, except for the purpose of learning what other topics may
> be in flight.  Nobody sane is supposed to be running the version
> from 'seen'; after all, the selection criteria of the topics in it
> is "some of the topics that the maintainer happened to have seen",
> and not even "these topics are interesting, promising and are wished
> to be in 'next' someday".
>
Thanks for your review.

-- 
An old man doll... just what I always wanted! - Clara

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

* Re: [PATCH] Documentation/howto: tracking git.git
  2021-05-15  3:32   ` Bagas Sanjaya
@ 2021-05-16  0:57     ` Junio C Hamano
  0 siblings, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2021-05-16  0:57 UTC (permalink / raw)
  To: Bagas Sanjaya; +Cc: git

Bagas Sanjaya <bagasdotme@gmail.com> writes:

> On 14/05/21 20.49, Junio C Hamano wrote:
>> Bagas Sanjaya <bagasdotme@gmail.com> writes:
>> 
>>> +Available Branches
>>> +------------------
>>> +
>>> +There are several branches on git.git with different purposes:
>>> +
>>> +master::
>>> +This is the most stable branch. Changes (topics) that are merged
>>> +to master should have been stabilized in next and suitable for
>>> +production use. Feature releases (vX.Y.0) are cut from this
>>> +branch.
>> Isn't "maint" meant to be more stable?
>> 
>
> I think "maint" is maintenance branch for latest feature release.
> For feature stabilization it happens on "main", so "master" is fully
> polished.

With the status of being back-then-most polished plus only fixes and
no unnecessary new features that can introduce unstability yet to be
discovered, by definition 'maint' ought to be "more stable" than
'master', no?

In any case, as Đoàn Trần Công Danh pointed out, I think we have
most of these written down elsewhere, and it is easier for readers
if we can find a way to reorganize them and incorporate new stuff
that is brought in by this proposal.


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

end of thread, other threads:[~2021-05-16  1:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 12:49 [PATCH] Documentation/howto: tracking git.git Bagas Sanjaya
2021-05-14 13:49 ` Junio C Hamano
2021-05-14 15:27   ` Đoàn Trần Công Danh
2021-05-15  3:32   ` Bagas Sanjaya
2021-05-16  0:57     ` Junio C Hamano

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

	https://80x24.org/mirrors/git.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).