Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Sample command line workflow with git and gerrit

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Wed, 26 Feb 2014 10:30:01 +0100
On Wed, Feb 26, 2014 at 09:51:13AM +0100, Joerg Mayer wrote:
> I sent the sample workflow for two reasons:
> 1) Receive feedback whether I did something "stupid" (aka newbie error)
> 2) Start creating a little bit of help for newbies

Attached a revised version on how I'd like to go forward. The quicker we
have the workflows the less time consuming things are going to get for
others :-)

Ciao
     Jörg


This idea of the file is to collect example workflows to make
it easier getting started with git/gerrit.

Once we have covered the most important use cases this file should
a) be moved to either wiki.wireshark.org or the wsdg
b) be enhanced by linking to or including screenshots of the gerrit
   GUI

Please improve this file by adding
- ideas to the toc
- Filling in items from the toc
- corrections/enhancements to existing examples

TOC
===
- Modify a file, submit change
- TODO: Modify a file, submit change, change file then resubmit
- TODO: Modify a file, submit change then drop the change
- ....

Modify a file
=============
- Create a new branch called 'newsupdate' (git checkout)
- Modify ./NEWS (vi)
- Check whether there are other changes (git status, optional)
- Submit to the local git repository (git commit)
- Submit the changes for review (git review)
- Review and submit my own change (gerrit review)
    ["Normal" users: Wait for this to happen]
- Switch back to development master (git checkout)
- Delete the development branch (git branch)

jmayer@egg:~/work/wireshark/git(master)> git checkout -b newsupdate
Switched to a new branch 'newsupdate'
jmayer@egg:~/work/wireshark/git(newsupdate)> vi NEWS
jmayer@egg:~/work/wireshark/git(newsupdate)> git status
[...]
#       modified:   NEWS
[...]
jmayer@egg:~/work/wireshark/git(newsupdate)> git commit -a
[newsupdate c159b39] As long as the NEWS file is part of the source distribution it really needs to be updated every time the file docbook/release-notes.asciidoc get changed.
 1 file changed, 65 insertions(+), 48 deletions(-)
jmayer@egg:~/work/wireshark/git(newsupdate)> git review
remote: Resolving deltas: 100% (2/2)
remote: Processing changes: new: 1, refs: 1, done
remote:
remote: New Changes:
remote:   https://code.wireshark.org/review/398
remote:
To ssh://jmayer@xxxxxxxxxxxxxxxxxx:29418/wireshark
 * [new branch]      HEAD -> refs/publish/master/newsupdate
jmayer@egg:~/work/wireshark/git(newsupdate)> gerrit review 398,1 --submit --code-review +2
jmayer@egg:~/work/wireshark/git(newsupdate)> git checkout master
Switched to branch 'master'
jmayer@egg:~/work/wireshark/git(master)> git branch -D newsupdate
Deleted branch newsupdate (was c159b39).

-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.