Re: [PATCH 1/1] documentation: add lab for first contribution

2019-04-12 Thread Emily Shaffer
On Thu, Apr 11, 2019 at 8:20 PM Junio C Hamano wrote: > > "Emily Shaffer via GitGitGadget" writes: > > > diff --git a/Documentation/MyFirstContribution > > b/Documentation/MyFirstContribution > > new file mode 100644 > > index 00..9b87e424d

Re: [PATCH 0/1] documentation: add lab for first contribution

2019-04-12 Thread Emily Shaffer
On Thu, Apr 11, 2019 at 7:35 PM Junio C Hamano wrote: > > "Emily Shaffer via GitGitGadget" writes: > > > RFC. I am still working on adding a section on handling refs and objects. > > Thanks. Is 'lab' understood widely enough? I _think_ you are > abb

Re: [PATCH 1/1] documentation: add lab for first contribution

2019-04-15 Thread Emily Shaffer
> >> ... then leave it in your example, perhaps? > >> > > > > Good point. :) I had wanted to avoid including my own name/email in the > > tutorial; I used a throwaway "Git Contributor " for the > > example. > > ... > >> Keep a sample sign-off by "A U Thor " here. > > > No, use "A U Thor " as I su

Re: [PATCH v2 0/1] documentation: add lab for first contribution

2019-04-16 Thread Emily Shaffer
On Tue, Apr 16, 2019 at 1:26 PM Emily Shaffer via GitGitGadget wrote: > > RFC. I am still working on adding a section on handling refs and objects. Sorry for the spam; above line was stale in GitGitGadget. The relevant section has been added just before the help page. I think the cha

Re: [PATCH v2 1/1] documentation: add lab for first contribution

2019-04-17 Thread Emily Shaffer
> > This code lab covers how to add a new command to Git and, in the > > process, everything from cloning git/git to getting reviewed on the mail > > "lab"? I thought we settled on "tutorial". Also the place we are > having conversation we call "mailing list", I think. You're right. My find/repl

[PATCH v3] documentation: add lab for first contribution

2019-04-19 Thread Emily Shaffer
d-off-by: Emily Shaffer --- Notable changes in v3: - Changed document name from MyFirstContribution to MyFirstContribution.txt; this reduced the changes to Makefile and eliminated changes to .gitignore. - git send-email section now uses the --cover-letter argument to format-patch, and exp

Re: [PATCH v3] documentation: add lab for first contribution

2019-04-22 Thread Emily Shaffer
On Sun, Apr 21, 2019 at 3:52 AM Junio C Hamano wrote: > > Emily Shaffer writes: > > > This tutorial covers how to add a new command to Git and, in the > > process, everything from cloning git/git to getting reviewed on the > > mailing list. It's meant fo

[PATCH v4] documentation: add tutorial for first contribution

2019-04-23 Thread Emily Shaffer
d-off-by: Emily Shaffer --- Only minor changes from v3, correcting the comments Junio made in his review. - Changed commit subject - Stray monospace typos - Curly brace style Documentation/Makefile|1 + Documentation/MyFirstContribution.txt | 1073 + 2

[PATCH] gitsubmodules: align html and nroff lists

2019-05-01 Thread Emily Shaffer
bulleted area was entirely monospaced in HTML and shown in plaintext in nroff. The bug seems to exist in docbook-xml - I've reported it on May 1 via the docbook-apps mail list - but for now it may make more sense to just work around the issue. Signed-off-by: Emily Shaffer --- Document

Re: [PATCH v4] documentation: add tutorial for first contribution

2019-05-01 Thread Emily Shaffer
to the list. - Emily > > On 2019.04.23 12:34, Emily Shaffer wrote: > [snip] > > +=== Implementation > > + > > +It's probably useful to do at least something besides printing out a > > string. > > +Let's start by having a look at everything we get.

Re: [PATCH 2/2] merge: add --quit

2019-05-02 Thread Emily Shaffer
They both look fine to me, besides a couple typos in the commit message in this one. On Wed, May 01, 2019 at 08:11:52PM +0700, Nguyễn Thái Ngọc Duy wrote: > This allows to cancel the current merge without reseting worktree/index, "resetting". > which is what --abort is for. Like other --quit(s),

Re: [RFE] Allow for "interactive"-like actions in non-interactive rebase

2019-05-06 Thread Emily Shaffer
Hi, On Fri, May 03, 2019 at 06:04:15PM +0300, Konstantin Kharlamov wrote: > Interactive rebase (i.e. for example "git rebase -i HEAD~10") is used most > often to apply an action to a single commit, e.g. "rename", "edit", "fixup", > etc… > > As result, people keep coming up with custom scripts and

Re: [PATCH] commit-graph: fix memory leak

2019-05-06 Thread Emily Shaffer
Hi, This change looks good to me, and like good evidence for the benefits of automated tooling :) Thanks! - Emily On Mon, May 06, 2019 at 02:36:58PM -0700, Josh Steadmon wrote: > Free the commit graph when verify_commit_graph_lite() reports an error. > Credit to OSS-Fuzz for finding this leak.

Re: [PATCH v3 00/16] Add new command 'restore'

2019-05-06 Thread Emily Shaffer
Hiya, On Thu, Apr 25, 2019 at 04:45:44PM +0700, Nguyễn Thái Ngọc Duy wrote: > v3 changes are really small > > - gitcli.txt is updated to mention the --staged/--worktree pair, in > comparison to --cached/--index which is also mention there. > > - The patch 'rm --staged' is dropped. It could com

Re: [PATCH v3 00/16] Add new command 'restore'

2019-05-07 Thread Emily Shaffer
On Tue, May 07, 2019 at 05:36:56PM +0700, Duy Nguyen wrote: > On Tue, May 7, 2019 at 9:21 AM Emily Shaffer wrote: > > I've got a usability comment, as we're giving restore a try within > > Google for now. > > Thanks. I thought I was the only guinea pig :D and obv

Re: [PATCH v4] documentation: add tutorial for first contribution

2019-05-07 Thread Emily Shaffer
On Thu, May 02, 2019 at 07:11:04PM -0700, Phil Hord wrote: > On Tue, Apr 23, 2019 at 12:35 PM Emily Shaffer > wrote: > > > > This tutorial covers how to add a new command to Git and, in the > > process, everything from cloning git/git to getting reviewed on the > >

Re: [PATCH v4] documentation: add tutorial for first contribution

2019-05-07 Thread Emily Shaffer
On Mon, May 06, 2019 at 03:28:44PM -0700, Jonathan Tan wrote: > Sorry for not looking at this sooner. > > Firstly, I'm not sure if this file should be named without the ".txt", > like SubmittingPatches. I should mention that during this change's life as a GitGitGadget PR, dscho performed a revie

[PATCH v5 2/2] documentation: add anchors to MyFirstContribution

2019-05-07 Thread Emily Shaffer
n to being prettier, the custom IDs also enable anchor linking to work with asciidoc-generated pages. This change compiles with no warnings using `asciidoctor -b html5 Documentation/MyFirstContribution.txt`. Signed-off-by: Emily Shaffer --- Documentation/MyFirstContribution.txt | 35

[PATCH v5 1/2] documentation: add tutorial for first contribution

2019-05-07 Thread Emily Shaffer
ed-by: Johannes Schindelin Reviewed-by: Jonathan Tan Signed-off-by: Emily Shaffer --- Documentation/Makefile|1 + Documentation/MyFirstContribution.txt | 1075 + 2 files changed, 1076 insertions(+) create mode 100644 Documentation/MyFirstContributio

[PATCH v5 0/2] documentation: add lab for first contribution

2019-05-07 Thread Emily Shaffer
explanation of `git commit --amend` - Remove braces to bring code sample into Git style - Typo, word-reversal, and early line break fixes - Add neglected argument to `git send-email` samples to actually include patches Emily Shaffer (2): documentation: add tutorial for first contribution docum

Re: [PATCH v5 1/2] documentation: add tutorial for first contribution

2019-05-07 Thread Emily Shaffer
> +Add a line to `#include "config.h"`. Then, add the following bits to the > +function body: > + > + > + const char *cfg_name; > + > +... > + > + git_config(git_default_config, NULL) > + if (git_config_get_string_const("user.name", &cfg_name) > 0) { > + printf(_("No nam

Re: [PATCH v5 1/2] documentation: add tutorial for first contribution

2019-05-08 Thread Emily Shaffer
On Wed, May 08, 2019 at 12:46:47PM +0900, Junio C Hamano wrote: > Emily Shaffer writes: > > > +=== Clone the Git Repository > > + > > +Git is mirrored in a number of locations. Clone the repository from one of > > them; > > +https://git-scm.com/downloads sugg

Re: Proposal: Remembering message IDs sent with git send-email

2019-05-08 Thread Emily Shaffer
On Wed, May 08, 2019 at 07:10:13PM -0400, Drew DeVault wrote: > I want to gather some thoughts about this. Say you've written a patch > series and are getting ready to send a -v2. If you set > --in-reply-to=ask, it'll show you a list of emails you've recently sent, > and their subject lines, and as

Re: Proposal: Remembering message IDs sent with git send-email

2019-05-09 Thread Emily Shaffer
On Thu, May 09, 2019 at 12:50:25PM -0400, Drew DeVault wrote: > On 2019-05-08 5:19 PM, Emily Shaffer wrote: > > What I think might be useful (and what I was hoping you were going to > > talk about when I saw the subject line) would be if the Message-Id is > > conveniently st

Re: [PATCH] git.c: show usage for accessing the git(1) help page

2019-05-14 Thread Emily Shaffer
On Tue, May 14, 2019 at 04:24:50PM +0100, Philip Oakley wrote: > It is not immediately obvious how to use the `git help` system > to show the git(1) page, with all its background and ccordinating > material, such as environment variables. > > Let's simply list it as the last few words of the last

[RFC PATCH] grep: provide sane default to grep_source struct

2019-05-15 Thread Emily Shaffer
but is reachable in the event that someone rolls their own revision walk and neglects to set rev_info->grep_filter->status_only. Conceivably, someone might want to print all changed lines of all commits which match some regex. Signed-off-by: Emily Shaffer --- Hiya, I ran into this issue while I

Re: [RFC PATCH] grep: provide sane default to grep_source struct

2019-05-16 Thread Emily Shaffer
On Wed, May 15, 2019 at 08:11:52PM -0700, Jonathan Nieder wrote: > Hi, > > Emily Shaffer wrote: > > > grep_buffer creates a struct grep_source gs and calls grep_source() > > with it. However, gs.name is null, which eventually produces a > > segmentation fault in &g

[PATCH v2] grep: provide sane default to grep_source struct

2019-05-16 Thread Emily Shaffer
and a valid name field is expected but not given. This path should be unreachable now, but in the future may become reachable if developers want to add the ability to use grep_buffer() in prepared in-core data and provide hints to the user about where the data came from. Signed-off-by: Emily Shaff

[PATCH v6 0/2] documentation: add tutorial for first contribution

2019-05-17 Thread Emily Shaffer
Only minor changes since v5. Removed 'official' from the blurb about the Github mirror, and removed some spurious braces around oneline code branches. Emily Shaffer (2): documentation: add tutorial for first contribution documentation: add anchors to MyFirstContribution Doc

[PATCH v6 1/2] documentation: add tutorial for first contribution

2019-05-17 Thread Emily Shaffer
ed-by: Johannes Schindelin Reviewed-by: Jonathan Tan Signed-off-by: Emily Shaffer --- Documentation/Makefile|1 + Documentation/MyFirstContribution.txt | 1074 + 2 files changed, 1075 insertions(+) create mode 100644 Documentation/MyFirstContributio

[PATCH v6 2/2] documentation: add anchors to MyFirstContribution

2019-05-17 Thread Emily Shaffer
n to being prettier, the custom IDs also enable anchor linking to work with asciidoc-generated pages. This change compiles with no warnings using `asciidoctor -b html5 Documentation/MyFirstContribution.txt`. Signed-off-by: Emily Shaffer --- Documentation/MyFirstContribution.txt | 35

[PATCH] doc: hint about GIT_DEBUGGER

2019-05-17 Thread Emily Shaffer
to pick gdb by default, or you can hand it your own debugger if you like to use something else (or if you want custom flags for gdb). Hopefully document that intent within CodingGuidelines. Signed-off-by: Emily Shaffer --- Maybe this isn't the right place for this patch. But right now git

Re: [PATCH] doc: hint about GIT_DEBUGGER

2019-05-20 Thread Emily Shaffer
[snip] > > + - You can launch gdb around your program using the shorthand GIT_DEBUGGER. > > + Run `GIT_DEBUGGER=1 ./bin-wrappers/git foo` to simply use gdb as is, or > > + run `GIT_DEBUGGER=debugger-binary some-args ./bin-wrappers/git foo` to > > Missing some quotes around debugger-binary and

[PATCH v2] doc: hint about GIT_DEBUGGER

2019-05-20 Thread Emily Shaffer
to pick gdb by default, or you can hand it your own debugger if you like to use something else (or if you want custom flags for gdb). Hopefully document that intent within CodingGuidelines. Signed-off-by: Emily Shaffer --- Documentation/CodingGuidelines | 6 ++ 1 file changed, 6 insertions

Re: [PATCH v2] doc: hint about GIT_DEBUGGER

2019-05-21 Thread Emily Shaffer
On Tue, May 21, 2019 at 09:06:18AM -0700, Elijah Newren wrote: > On Mon, May 20, 2019 at 6:01 PM Emily Shaffer wrote: > > > > We check for a handy environment variable GIT_DEBUGGER when running via > > bin-wrappers/, but this feature is undocumented. Add a hint to how t

Re: [PATCH v2] grep: provide sane default to grep_source struct

2019-05-21 Thread Emily Shaffer
On Thu, May 16, 2019 at 06:02:54PM -0400, Jeff King wrote: > On Thu, May 16, 2019 at 02:44:44PM -0700, Emily Shaffer wrote: > > > grep_buffer creates a struct grep_source gs and calls grep_source() > > with it. However, gs.name is null, which eventually produces a > &g

[PATCH v3] grep: provide sane default to grep_source struct

2019-05-21 Thread Emily Shaffer
and a valid name field is expected but not given. This path should be unreachable now, but in the future may become reachable if developers want to add the ability to use grep_buffer() in prepared in-core data and provide hints to the user about where the data came from. Signed-off-by: Emily Sha

[PATCH v3] doc: hint about GIT_DEBUGGER in CodingGuidelines

2019-05-22 Thread Emily Shaffer
default, or you can hand it your own debugger if you like to use something else (or if you want custom flags for gdb). This commit documents that intent within CodingGuidelines. Signed-off-by: Emily Shaffer --- Since v2, only the commit message has changed. Removed some weak language to make the

[PATCH v4] grep: fail if call could output and name is null

2019-05-23 Thread Emily Shaffer
how to fix the issue - by providing grep_source::name or setting grep_opt::status_only - and they are warned of the potential for a segfault unconditionally, rather than only if there is a match. Noticed while adding such a call to a tutorial on revision walks. Signed-off-by: Emily Shaffer Rev

Re: [PATCH v1 1/5] list-objects-filter: refactor into a context struct

2019-05-23 Thread Emily Shaffer
On Tue, May 21, 2019 at 05:21:50PM -0700, Matthew DeVore wrote: > The next patch will create and manage filters in a new way, which means > that this bundle of data will have to be managed at a new callsite. Make > this bundle of data more manageable by putting it in a struct and > making it part o

Re: [PATCH v1 2/5] list-objects-filter-options: error is localizeable

2019-05-23 Thread Emily Shaffer
On Tue, May 21, 2019 at 05:21:51PM -0700, Matthew DeVore wrote: > The "invalid filter-spec" message is user-facing and not a BUG, so make > it localizeable. What does it look like? Is it human-readable in its current form? I ask because (without having looked ahead) I think you're going to move it

Re: [PATCH v3] doc: hint about GIT_DEBUGGER in CodingGuidelines

2019-05-28 Thread Emily Shaffer
On Thu, May 23, 2019 at 06:09:17AM -0400, Eric Sunshine wrote: > On Wed, May 22, 2019 at 8:56 PM Emily Shaffer wrote: > > We check for a handy environment variable GIT_DEBUGGER when running via > > bin-wrappers/, but this feature is undocumented. Add a hint to how to >

[PATCH v4] doc: hint about GIT_DEBUGGER in CodingGuidelines

2019-05-28 Thread Emily Shaffer
We check for a handy environment variable GIT_DEBUGGER when running via bin-wrappers/, but this feature is undocumented. Add a hint to how to use it into the CodingGuidelines (which is where other useful environment settings like DEVELOPER are documented). Signed-off-by: Emily Shaffer

Re: [PATCH v1 3/5] list-objects-filter: implement composite filters

2019-05-28 Thread Emily Shaffer
On Tue, May 21, 2019 at 05:21:52PM -0700, Matthew DeVore wrote: > Allow combining filters such that only objects accepted by all filters > are shown. The motivation for this is to allow getting directory > listings without also fetching blobs. This can be done by combining > blob:none with tree:. T

Re: [PATCH v6 1/2] documentation: add tutorial for first contribution

2019-05-29 Thread Emily Shaffer
On Sun, May 26, 2019 at 09:48:26AM +0200, Christian Couder wrote: > On Fri, May 17, 2019 at 11:48 PM Emily Shaffer > wrote: > > > > This tutorial covers how to add a new command to Git and, in the > > process, everything from cloning git/git to getting reviewed on th

[PATCH] doc: add some nit fixes to MyFirstContribution

2019-05-29 Thread Emily Shaffer
A trial run-through of the tutorial revealed a few typos and missing commands in the tutorial itself. This commit fixes typos, clarifies which lines to keep or modify in some places, and adds a section on putting the git-psuh binary into the gitignore. Signed-off-by: Emily Shaffer --- This patch

Is --filter-print-omitted correct/used/needed?

2019-06-06 Thread Emily Shaffer
Yesterday while down a rabbit hole, I discovered an interesting thing about the 'omitted' object in many filters in list-objects-filter-options.h. It appears that when we call list-objects.h:traverse_commit_list_filtered() with a non-NULL 'omitted' argument, we still perform a walk of all objects

[PATCH] documentation: add tutorial for revision walking

2019-06-06 Thread Emily Shaffer
intentionally does not cover how to create new commands or search for options from the command line or gitconfigs. There is an associated patchset at https://github.com/nasamuffin/git/tree/revwalk that contains a reference implementation of the code generated by this tutorial. Signed-off-by: Emily Shaffer

[RFC PATCH 01/13] walken: add infrastructure for revwalk demo

2019-06-06 Thread Emily Shaffer
tutorial in Documentation/MyFirstRevWalk.txt. Signed-off-by: Emily Shaffer --- Makefile | 1 + builtin.h| 1 + builtin/walken.c | 14 ++ 3 files changed, 16 insertions(+) create mode 100644 builtin/walken.c diff --git a/Makefile b/Makefile index 8a7e235352..a25d46c7a3

[RFC PATCH 00/13] example implementation of revwalk tutorial

2019-06-06 Thread Emily Shaffer
). I'm sending them for review by the list to check for consistency with the Git codebase, so they aren't a bad example for new contributors. Thanks for any reviews, all! - Emily Emily Shaffer (13): walken: add infrastructure for revwalk demo walken: add usage to enable -h w

[RFC PATCH 05/13] walken: configure rev_info and prepare for walk

2019-06-06 Thread Emily Shaffer
empty, and the walk would terminate immediately. Signed-off-by: Emily Shaffer --- builtin/walken.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/builtin/walken.c b/builtin/walken.c index 5d1666a5da..c101db38c7 100644 --- a/builtin/walken.c +++ b/bu

[RFC PATCH 04/13] walken: add handler to git_config

2019-06-06 Thread Emily Shaffer
on when we need it. Signed-off-by: Emily Shaffer --- builtin/walken.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/builtin/walken.c b/builtin/walken.c index dcee906556..5d1666a5da 100644 --- a/builtin/walken.c +++ b/builtin/walken.c @@ -6,6 +6,7 @@ #include

[RFC PATCH 08/13] walken: demonstrate various topographical sorts

2019-06-06 Thread Emily Shaffer
Order the revision walk by author or commit dates, to demonstrate how to apply topo_sort to a revision walk. While following the tutorial, new contributors are guided to run a walk with each sort and compare the results. Signed-off-by: Emily Shaffer --- builtin/walken.c | 5 + 1 file

[RFC PATCH 13/13] walken: reverse the object walk order

2019-06-06 Thread Emily Shaffer
x27;s recommended to pipe the output through `head` or `tail` or to redirect it into a file. Signed-off-by: Emily Shaffer --- builtin/walken.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/walken.c b/builtin/walken.c index d93725ee88..4bfee3a2d7 100644 --- a/builtin/walken.c

[RFC PATCH 09/13] walken: demonstrate reversing a revision walk list

2019-06-06 Thread Emily Shaffer
tup_revisions(). (This is mentioned in the accompanying tutorial.) Signed-off-by: Emily Shaffer --- builtin/walken.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/walken.c b/builtin/walken.c index 716d31f04e..86c8d29c48 100644 --- a/builtin/walken.c +++ b/builtin/walken.c @

[RFC PATCH 06/13] walken: perform our basic revision walk

2019-06-06 Thread Emily Shaffer
to `git log --oneline`. Signed-off-by: Emily Shaffer --- builtin/walken.c | 41 + 1 file changed, 41 insertions(+) diff --git a/builtin/walken.c b/builtin/walken.c index c101db38c7..9cf19a24ab 100644 --- a/builtin/walken.c +++ b/builtin/walken.c @@ -7,8

[RFC PATCH 02/13] walken: add usage to enable -h

2019-06-06 Thread Emily Shaffer
o pass, so we'll do so - cmd_walken is now open for business. Signed-off-by: Emily Shaffer --- builtin/walken.c | 12 git.c| 1 + 2 files changed, 13 insertions(+) diff --git a/builtin/walken.c b/builtin/walken.c index bfeaa5188d..5ae7c7d93f 100644 --- a/builtin

[RFC PATCH 10/13] walken: add unfiltered object walk from HEAD

2019-06-06 Thread Emily Shaffer
e the unfiltered version, as this will make the tutorial easier to follow. This commit is part of a tutorial on revision walking. Signed-off-by: Emily Shaffer --- builtin/walken.c | 79 ++-- 1 file changed, 77 insertions(+), 2 deletions(-) diff --

[RFC PATCH 07/13] walken: filter for authors from gmail address

2019-06-06 Thread Emily Shaffer
to create their own more generalized grep filters during revision walks. Signed-off-by: Emily Shaffer --- builtin/walken.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/builtin/walken.c b/builtin/walken.c index 9cf19a24ab..6c0f4e7b7a 100644 --- a/builtin

[RFC PATCH 12/13] walken: count omitted objects

2019-06-06 Thread Emily Shaffer
inues to dereference omitted trees and commits. This is part of a tutorial on performing revision walks. Signed-off-by: Emily Shaffer --- builtin/walken.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/builtin/walken.c b/builtin/walken.c index f2c98bcd6b..d93

[RFC PATCH 03/13] walken: add placeholder to initialize defaults

2019-06-06 Thread Emily Shaffer
Eventually, we will want a good place to initialize default variables for use during our revision walk(s) in `git walken`. For now, there's nothing to do here, but let's add the scaffolding so that it's easy to tell where to put the setup later on. Signed-off-by: Emily Shaffe

[RFC PATCH 11/13] walken: add filtered object walk

2019-06-06 Thread Emily Shaffer
objects seen in each case. Signed-off-by: Emily Shaffer --- builtin/walken.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/builtin/walken.c b/builtin/walken.c index 408af6c841..f2c98bcd6b 100644 --- a/builtin/walken.c +++ b/builtin/walken.c @@ -13,6 +13,7

Re: Is --filter-print-omitted correct/used/needed?

2019-06-07 Thread Emily Shaffer
On Fri, Jun 07, 2019 at 02:57:01PM -0400, Jeff Hostetler wrote: > > > On 6/7/2019 2:38 AM, Christian Couder wrote: > > On Thu, Jun 6, 2019 at 10:18 PM Emily Shaffer > > wrote: > > > > > > > > > I grepped the Git source and found that we only

[PATCH] revision: remove stray whitespace when name empty

2019-06-07 Thread Emily Shaffer
'git rev-list' even if it's piped into a file. Signed-off-by: Emily Shaffer --- I don't see any reason _not_ to remove this stray whitespace at the end, since it seems like it just gets in the way of easy scripting. I also think this case will only present itself for root trees. Not

Re: [PATCH] revision: remove stray whitespace when name empty

2019-06-12 Thread Emily Shaffer
On Fri, Jun 07, 2019 at 08:42:45PM -0400, Eric Sunshine wrote: > On Fri, Jun 7, 2019 at 6:59 PM Emily Shaffer wrote: > > Teach show_object_with_name() to avoid writing a space before a name > > which is empty. Also teach tests for rev-list --objects --filter to not > > requir

Re: [PATCH] revision: remove stray whitespace when name empty

2019-06-12 Thread Emily Shaffer
On Mon, Jun 10, 2019 at 09:29:14AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Your patch only helps with this at all because you're using the "tree:1" > > ... > > because there you'll have actual names which cat-file will choke on. So > > it seems like this is helping only a very limi

[PATCH v2] rev-list: teach --oid-only to enable piping

2019-06-13 Thread Emily Shaffer
OID: git rev-list --objects --filter=tree:1 --max-count=1 HEAD \ | xargs -I% echo "AA%AA" Now, it can be piped directly, as in the added test case: git rev-list --objects --oid-only HEAD | git cat-file --batch-check Signed-off-by: Emily Shaffer Change-Id: I489bdf0a8215532e540175

[RFC PATCH] rev-list: clarify --abbrev and --abbrev-commit usage

2019-06-13 Thread Emily Shaffer
bbrev is an optional addition to the --abbrev-commit option. --no-abbrev remains on a separate line as it can still be used to disable OID abbreviation even if --abbrev-commit has been specified. Signed-off-by: Emily Shaffer Change-Id: If9b1198938e1a3515ae6740241f7b791fb7a88bd --- I thought thi

Re: [RFC PATCH] rev-list: clarify --abbrev and --abbrev-commit usage

2019-06-14 Thread Emily Shaffer
On Fri, Jun 14, 2019 at 12:18:41PM -0400, Jeff King wrote: > On Thu, Jun 13, 2019 at 03:15:41PM -0700, Emily Shaffer wrote: > > > I thought this was odd when I was working on the other rev-list changes > > - --abbrev doesn't do anything on its own. It looks like it doe

Re: [RFC PATCH] rev-list: clarify --abbrev and --abbrev-commit usage

2019-06-14 Thread Emily Shaffer
On Fri, Jun 14, 2019 at 05:27:14PM -0400, Jeff King wrote: > On Fri, Jun 14, 2019 at 01:59:50PM -0700, Emily Shaffer wrote: > > > > So no, I cannot see a way in which "rev-list --abbrev" is useful without > > > "--abbrev-commit". Which means that perh

Re: [PATCH v2] rev-list: teach --oid-only to enable piping

2019-06-14 Thread Emily Shaffer
On Fri, Jun 14, 2019 at 01:25:59PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > But I wonder if things would be simpler if we did not touch the commit > > code path at all. I.e., if this were simply "--no-object-names", and it > > touched only show_object(). > > Yeah, that sounds more

Re: [PATCH v2] rev-list: teach --oid-only to enable piping

2019-06-14 Thread Emily Shaffer
On Fri, Jun 14, 2019 at 12:07:28PM -0400, Jeff King wrote: > On Thu, Jun 13, 2019 at 02:51:03PM -0700, Emily Shaffer wrote: > > +test_expect_success 'rev-list --objects --oid-only is usable by cat-file' ' > > + git rev-list --objects --oid-only --all >list-outpu

[PATCH v3] rev-list: teach --no-object-names to enable piping

2019-06-14 Thread Emily Shaffer
end of the OID: git rev-list --objects --filter=tree:1 --max-count=1 HEAD \ | xargs -I% echo "AA%AA" Now, it can be piped directly, as in the added test case: git rev-list --objects --no-object-names HEAD | git cat-file --batch-check Signed-off-by:

Re: [RFC PATCH 11/13] walken: add filtered object walk

2019-06-17 Thread Emily Shaffer
On Fri, Jun 07, 2019 at 03:15:53PM -0400, Jeff Hostetler wrote: > > > On 6/6/2019 9:08 PM, Emily Shaffer wrote: > > Demonstrate how filter specs can be used when performing a revision walk > > of all object types. In this case, tree depth is used. Contributors who > >

Re: [PATCH] documentation: add tutorial for revision walking

2019-06-17 Thread Emily Shaffer
On Fri, Jun 07, 2019 at 02:21:07AM -0400, Eric Sunshine wrote: > On Thu, Jun 6, 2019 at 9:08 PM Emily Shaffer wrote: > > [...] > > The tutorial covers a basic overview of the structs involved during > > revision walk, setting up a basic commit walk, setting up a basic >

Re: [PATCH] documentation: add tutorial for revision walking

2019-06-17 Thread Emily Shaffer
On Mon, Jun 10, 2019 at 01:49:41PM -0700, Junio C Hamano wrote: > Emily Shaffer writes: > > > +My First Revision Walk > > +== > > + > > +== What's a Revision Walk? > > + > > +The revision walk is a key concept in Git - this is

Re: [PATCH] documentation: add tutorial for revision walking

2019-06-17 Thread Emily Shaffer
On Mon, Jun 10, 2019 at 01:25:14PM -0700, Junio C Hamano wrote: > Emily Shaffer writes: > > > I'll also be mailing an RFC patchset In-Reply-To this message; the RFC > > patchset should not be merged to Git, as I intend to host it in my own > > mirror as an example. I

Re: [PATCH v3] rev-list: teach --no-object-names to enable piping

2019-06-18 Thread Emily Shaffer
On Mon, Jun 17, 2019 at 03:32:34PM -0700, Junio C Hamano wrote: > Emily Shaffer writes: > > > Allow easier parsing by cat-file by giving rev-list an option to print > > only the OID of a non-commit object without any additional information. > > This is a short-term

[PATCH v4] rev-list: teach --no-object-names to enable piping

2019-06-18 Thread Emily Shaffer
end of the OID: git rev-list --objects --filter=tree:1 --max-count=1 HEAD | xargs -I% echo "AA%AA" Now, it can be piped directly, as in the added test case: git rev-list --objects --no-object-names HEAD | git cat-file --batch-check Signed-off-by:

Re: [PATCH v4] rev-list: teach --no-object-names to enable piping

2019-06-19 Thread Emily Shaffer
On Wed, Jun 19, 2019 at 07:08:14AM -0700, Junio C Hamano wrote: > Emily Shaffer writes: > > > Since v3, added a corresponding "--object-names" arg to pair with > > "--no-object-names", and "last-one-wins" logic. Also added a test to > >

[PATCH v5] rev-list: teach --no-object-names to enable piping

2019-06-19 Thread Emily Shaffer
end of the OID: git rev-list --objects --filter=tree:1 --max-count=1 HEAD | xargs -I% echo "AA%AA" Now, it can be piped directly, as in the added test case: git rev-list --objects --no-object-names HEAD | git cat-file --batch-check Signed-off-by:

Re: [RFC PATCH] rev-list: clarify --abbrev and --abbrev-commit usage

2019-06-19 Thread Emily Shaffer
On Wed, Jun 19, 2019 at 05:21:59PM -0400, Jeff King wrote: > On Fri, Jun 14, 2019 at 03:56:54PM -0700, Emily Shaffer wrote: > > > > Ah, I see. I don't consider "|" to indicate an exclusion to the point > > > that the options are rejected. Only that you would

Re: [PATCH] documentation: add tutorial for revision walking

2019-06-19 Thread Emily Shaffer
On Wed, Jun 19, 2019 at 04:13:35AM -0400, Eric Sunshine wrote: > On Mon, Jun 17, 2019 at 7:20 PM Emily Shaffer wrote: > > On Fri, Jun 07, 2019 at 02:21:07AM -0400, Eric Sunshine wrote: > > > On Thu, Jun 6, 2019 at 9:08 PM Emily Shaffer > > > wrote: > > > &g

Re: [PATCH] documentation: add tutorial for revision walking

2019-06-20 Thread Emily Shaffer
On Wed, Jun 19, 2019 at 08:17:29AM -0700, Junio C Hamano wrote: > Emily Shaffer writes: > > > Maybe there's a case for storing them as a set of patch files that are > > revision-controlled somewhere within Documentation/? There was some > > discussion on the IRC a

Re: [PATCH] doc: improve usage string in MyFirstContribution

2019-06-20 Thread Emily Shaffer
On Thu, Jun 20, 2019 at 12:13:15AM +0200, Christian Couder wrote: > SYNOPSIS > > [verse] > -'git-psuh' > +'git-psuh ...' It doesn't require 1 or more args - you can run it with no args. So it might be better suited to state the args as optional: 'git psuh [arg]...' > > stati

[PATCH v2] documentation: add tutorial for revision walking

2019-06-26 Thread Emily Shaffer
intentionally does not cover how to create new commands or search for options from the command line or gitconfigs. There is an associated patchset at https://github.com/nasamuffin/git/tree/revwalk that contains a reference implementation of the code generated by this tutorial. Signed-off-by: Emily Shaffer

[RFC PATCH v2 04/13] walken: add handler to git_config

2019-06-26 Thread Emily Shaffer
on when we need it. Signed-off-by: Emily Shaffer --- builtin/walken.c | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/builtin/walken.c b/builtin/walken.c index daae4f811a..2474a0d7b2 100644 --- a/builtin/walken.c +++ b/builtin/walken.c

[RFC PATCH v2 00/13] example implementation of revwalk tutorial

2019-06-26 Thread Emily Shaffer
ed between human- and machine-readable output with trace_printf() and printf(), to turn the command into plumbing. - More changes as mentioned in the tutorial patch. Thanks. - Emily Emily Shaffer (13): walken: add infrastructure for revwalk demo walken: add usage to enable -h walken: add p

[RFC PATCH v2 01/13] walken: add infrastructure for revwalk demo

2019-06-26 Thread Emily Shaffer
tutorial in Documentation/MyFirstRevWalk.txt. Signed-off-by: Emily Shaffer Change-Id: I64297621919412f54701e111366e99c4ef0feae3 --- Makefile | 1 + builtin.h| 1 + builtin/walken.c | 13 + 3 files changed, 15 insertions(+) create mode 100644 builtin/walken.c diff --git a

[RFC PATCH v2 02/13] walken: add usage to enable -h

2019-06-26 Thread Emily Shaffer
ke parse_options(). With this change, we can now add cmd_walken to the builtins set and expect tests to pass, so we'll do so - cmd_walken is now open for business. Signed-off-by: Emily Shaffer Change-Id: I2919dc1efadb82acb335617ea24371c84b03bbce --- builtin/walken.c | 25 ++

[RFC PATCH v2 07/13] walken: filter for authors from gmail address

2019-06-26 Thread Emily Shaffer
to create their own more generalized grep filters during revision walks. Signed-off-by: Emily Shaffer --- builtin/walken.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/builtin/walken.c b/builtin/walken.c index 335dcb6b21..da2d197914 100644 --- a/builtin

[RFC PATCH v2 03/13] walken: add placeholder to initialize defaults

2019-06-26 Thread Emily Shaffer
Eventually, we will want a good place to initialize default variables for use during our revision walk(s) in `git walken`. For now, there's nothing to do here, but let's add the scaffolding so that it's easy to tell where to put the setup later on. Signed-off-by: Emily Shaffe

[RFC PATCH v2 12/13] walken: count omitted objects

2019-06-26 Thread Emily Shaffer
inues to dereference omitted trees and commits. This is part of a tutorial on performing revision walks. Signed-off-by: Emily Shaffer --- builtin/walken.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/builtin/walken.c b/builtin/walken.c index a744d042d8..dc5

[RFC PATCH v2 08/13] walken: demonstrate various topographical sorts

2019-06-26 Thread Emily Shaffer
Order the revision walk by author or commit dates, to demonstrate how to apply topo_sort to a revision walk. While following the tutorial, new contributors are guided to run a walk with each sort and compare the results. Signed-off-by: Emily Shaffer Change-Id

[RFC PATCH v2 10/13] walken: add unfiltered object walk from HEAD

2019-06-26 Thread Emily Shaffer
e the unfiltered version, as this will make the tutorial easier to follow. This commit is part of a tutorial on revision walking. Signed-off-by: Emily Shaffer Change-Id: If3b11652ba011b28d29b1c3984dac4a3f80a5f53 --- builtin/walken.c | 88 +++- 1 file ch

[RFC PATCH v2 13/13] walken: reverse the object walk order

2019-06-26 Thread Emily Shaffer
x27;s recommended to pipe the output through `head` or `tail` or to redirect it into a file. Signed-off-by: Emily Shaffer Change-Id: I91883b209a61ae4d87855878291e487fe36220c4 --- builtin/walken.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/walken.c b/builtin/walken.c index dc59f

[RFC PATCH v2 11/13] walken: add filtered object walk

2019-06-26 Thread Emily Shaffer
objects seen in each case. Signed-off-by: Emily Shaffer Change-Id: I6d22ba153c1afbc780c261c47f1fa03ea478b5ed --- builtin/walken.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/builtin/walken.c b/builtin/walken.c index 42b23ba1ec..a744d042d8 100644 --- a

[RFC PATCH v2 05/13] walken: configure rev_info and prepare for walk

2019-06-26 Thread Emily Shaffer
empty, and the walk would terminate immediately. Signed-off-by: Emily Shaffer Change-Id: I76754b740227cf17a449f3f536dbbe37031e6f9a --- builtin/walken.c | 50 1 file changed, 50 insertions(+) diff --git a/builtin/walken.c b/builtin/walken.c

[RFC PATCH v2 06/13] walken: perform our basic revision walk

2019-06-26 Thread Emily Shaffer
to `git log --oneline`. Signed-off-by: Emily Shaffer Change-Id: If6dc5f3c9d14df077b99e42806cf790c96191582 --- builtin/walken.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/builtin/walken.c b/builtin/walken.c index c463eca843..335dcb6b21 100644

[RFC PATCH v2 09/13] walken: demonstrate reversing a revision walk list

2019-06-26 Thread Emily Shaffer
tup_revisions(). (This is mentioned in the accompanying tutorial.) Signed-off-by: Emily Shaffer --- builtin/walken.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/walken.c b/builtin/walken.c index 6cc451324a..958923c172 100644 --- a/builtin/walken.c +++ b/builtin/walken.c @

  1   2   >