Re: [Wireshark-dev] Question about git style
OK On Thu, Jan 18, 2018 at 7:09 PM, Jaap Keuter wrote: > On 07-01-18 22:36, Dario Lombardo wrote: > > If I'm not mistaken, that is not requested. A draft change in gerrit is > a change > > sent to the special branch refs/drafts/master. This is a real draft, that > > differs from a regular change for the fact that it's not visible to > others, > > until it gets promoted to refs/for/master. A draft change can be > reviewed, but > > this requires the author to manually add reviewers. A [WIP] change it's > just a > > regular change, where the author is informing others that the change is > not > > ready to merge. This is a common practice across projects and VCSes, but > it's > > not enforced by anything on git/gerrit. Nothing prevents a [WIP] change > to be > > merged. From my experience Wireshark developers do that to make the > review > > process easier (for instance because petri dish can't be triggered on a > draft > > change), allowing anyone interested in reviewing it on board. > > Dario. > > Hi Dario, > > Maybe you can write something like this on > https://wiki.wireshark.org/Development/SubmittingPatches to make this > more well > known. > > Thanks, > Jaap > > ___ > Sent via:Wireshark-dev mailing list > Archives:https://www.wireshark.org/lists/wireshark-dev > Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev > mailto:wireshark-dev-requ...@wireshark.org?subject= > unsubscribe ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] Question about git style
I'm a dead-tree person when I'm learning things. I do use git-scm.org, but I find the older O'Reilly a little easier to understand. Craig On Jan 18, 2018 1:07 PM, "Jaap Keuter" wrote: > On 02-01-18 17:36, Craig Jackson wrote: > > > > The moral of the story is Read The O'Reilly Book. (RTORB?) And then read > it > > again . . . > > In fact read https://git-scm.com/book/en/v2 > > and this entertaining/geeky video tutorial "Git For Ages 4 And Up" by > Michael > Schwern https://www.youtube.com/watch?v=1ffBJ4sVUb4 > > > ___ > Sent via:Wireshark-dev mailing list > Archives:https://www.wireshark.org/lists/wireshark-dev > Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev > mailto:wireshark-dev-requ...@wireshark.org?subject= > unsubscribe ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] Question about git style
On 07-01-18 22:36, Dario Lombardo wrote: > If I'm not mistaken, that is not requested. A draft change in gerrit is a > change > sent to the special branch refs/drafts/master. This is a real draft, that > differs from a regular change for the fact that it's not visible to others, > until it gets promoted to refs/for/master. A draft change can be reviewed, but > this requires the author to manually add reviewers. A [WIP] change it's just a > regular change, where the author is informing others that the change is not > ready to merge. This is a common practice across projects and VCSes, but it's > not enforced by anything on git/gerrit. Nothing prevents a [WIP] change to be > merged. From my experience Wireshark developers do that to make the review > process easier (for instance because petri dish can't be triggered on a draft > change), allowing anyone interested in reviewing it on board. > Dario. Hi Dario, Maybe you can write something like this on https://wiki.wireshark.org/Development/SubmittingPatches to make this more well known. Thanks, Jaap ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] Question about git style
On 02-01-18 17:36, Craig Jackson wrote: > > The moral of the story is Read The O'Reilly Book. (RTORB?) And then read it > again . . . In fact read https://git-scm.com/book/en/v2 and this entertaining/geeky video tutorial "Git For Ages 4 And Up" by Michael Schwern https://www.youtube.com/watch?v=1ffBJ4sVUb4 ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] Question about git style
On Tue, Jan 2, 2018 at 11:21 AM, Jaap Keuter wrote: > Hi, > > It seems that you’re no stranger to version control systems (VCS), but new > to git. I think it's important in this case to recognise that git is a > distributed VCS. That means that you have (a clone of) a repository on your > own, and gerrit is an online tool on the origin repository. You can commit > to your own repository as much as you want, and decide to push to gerrit > when you’re done. > Being done thus means having your changes completed, or wanting to share > it with, or reviewed by others. Gerrit provides the infrastructure for > that. The first case is assumed when a commit appears in gerrit, if it’s a > Work In Progress a marker ‘[WIP]’ is requested to be prefixed on the commit > summary line. > If I'm not mistaken, that is not requested. A draft change in gerrit is a change sent to the special branch refs/drafts/master. This is a real draft, that differs from a regular change for the fact that it's not visible to others, until it gets promoted to refs/for/master. A draft change can be reviewed, but this requires the author to manually add reviewers. A [WIP] change it's just a regular change, where the author is informing others that the change is not ready to merge. This is a common practice across projects and VCSes, but it's not enforced by anything on git/gerrit. Nothing prevents a [WIP] change to be merged. From my experience Wireshark developers do that to make the review process easier (for instance because petri dish can't be triggered on a draft change), allowing anyone interested in reviewing it on board. Dario. ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] Question about git style
You're correct. I've been using source code control systems since the days of punched cards and tape. (I even wrote a clone of SCCS in Burroughs ALGOL once, for my own edification.) However, I only have a reading knowledge of git. It looks like I have two options when working with gerrit: - Using an initial commit and then amending it repeatedly. - Using multiple commits and then squashing them. The former is pretty simple. The latter would allow me to revert to points other than the most recent one. I guess that both indeed are features of git's distributed nature. You're free to amend history as long as you do it within the privacy of your own repository. The classic centralized/single-stream VCSs would think of that as cooking the books. The moral of the story is Read The O'Reilly Book. (RTORB?) And then read it again . . . Craig Jackson On Tue, Jan 2, 2018 at 5:21 AM, Jaap Keuter wrote: > Hi, > > It seems that you’re no stranger to version control systems (VCS), but new > to git. I think it's important in this case to recognise that git is a > distributed VCS. That means that you have (a clone of) a repository on your > own, and gerrit is an online tool on the origin repository. You can commit > to your own repository as much as you want, and decide to push to gerrit > when you’re done. > Being done thus means having your changes completed, or wanting to share > it with, or reviewed by others. Gerrit provides the infrastructure for > that. The first case is assumed when a commit appears in gerrit, if it’s a > Work In Progress a marker ‘[WIP]’ is requested to be prefixed on the commit > summary line. > Before you push to gerrit you may manipulate your repository as you like > (squash commits, rebase the branch, etc). After pushing to gerrit you > should refrain from ‘changing history’ like this. Additional work and > commits are however possible. > I hope this highlights the difference between your own repository and > gerrit a little. > > Thanks, > Jaap > > > > On 1 Jan 2018, at 23:44, Craig Jackson wrote: > > > > I'm curious whether each submission to gerrit must be a single commit. > I'm accustomed with other source management systems to making a branch and > then committing fairly frequently. I would do intermediate commits before I > had anything complete enough to be added to the mainline code of what I was > working on. > > > > I'm new to git and gerrit, but it seems like gerrit wants each > submission to be a single commit. > > > > What is the best style? Should I do a commit, and then amend it as I > continue to develop? > > > > Craig Jackson > > > ___ > Sent via:Wireshark-dev mailing list > Archives:https://www.wireshark.org/lists/wireshark-dev > Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev > mailto:wireshark-dev-requ...@wireshark.org?subject= > unsubscribe > ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] Question about git style
Hi, It seems that you’re no stranger to version control systems (VCS), but new to git. I think it's important in this case to recognise that git is a distributed VCS. That means that you have (a clone of) a repository on your own, and gerrit is an online tool on the origin repository. You can commit to your own repository as much as you want, and decide to push to gerrit when you’re done. Being done thus means having your changes completed, or wanting to share it with, or reviewed by others. Gerrit provides the infrastructure for that. The first case is assumed when a commit appears in gerrit, if it’s a Work In Progress a marker ‘[WIP]’ is requested to be prefixed on the commit summary line. Before you push to gerrit you may manipulate your repository as you like (squash commits, rebase the branch, etc). After pushing to gerrit you should refrain from ‘changing history’ like this. Additional work and commits are however possible. I hope this highlights the difference between your own repository and gerrit a little. Thanks, Jaap > On 1 Jan 2018, at 23:44, Craig Jackson wrote: > > I'm curious whether each submission to gerrit must be a single commit. I'm > accustomed with other source management systems to making a branch and then > committing fairly frequently. I would do intermediate commits before I had > anything complete enough to be added to the mainline code of what I was > working on. > > I'm new to git and gerrit, but it seems like gerrit wants each submission to > be a single commit. > > What is the best style? Should I do a commit, and then amend it as I continue > to develop? > > Craig Jackson ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] Question about git style
You can do both. In all fairness, we do not enforce a particular working style with Wireshark, but please keep in mind, that other people must review the stuff. That being said, it usually goes with - it should compile and work - after commit. So submitting things, where you and up with a broken mainline will not fly. And for gerri, gerri let's you start special branches as well, they are called "topic". Branches exist as well, but usually if you have more than one patchset, which depend on each other, you give all of them the same topic. cheers Roland On Mon, Jan 1, 2018 at 11:44 PM, Craig Jackson wrote: > I'm curious whether each submission to gerrit must be a single commit. I'm > accustomed with other source management systems to making a branch and then > committing fairly frequently. I would do intermediate commits before I had > anything complete enough to be added to the mainline code of what I was > working on. > > I'm new to git and gerrit, but it seems like gerrit wants each submission > to be a single commit. > > What is the best style? Should I do a commit, and then amend it as I > continue to develop? > > Craig Jackson > > > ___ > Sent via:Wireshark-dev mailing list > Archives:https://www.wireshark.org/lists/wireshark-dev > Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev > mailto:wireshark-dev-requ...@wireshark.org?subject= > unsubscribe > ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
[Wireshark-dev] Question about git style
I'm curious whether each submission to gerrit must be a single commit. I'm accustomed with other source management systems to making a branch and then committing fairly frequently. I would do intermediate commits before I had anything complete enough to be added to the mainline code of what I was working on. I'm new to git and gerrit, but it seems like gerrit wants each submission to be a single commit. What is the best style? Should I do a commit, and then amend it as I continue to develop? Craig Jackson ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe