Re: [PATCH 08/12] t5520: use test_cmp_rev where possible

2019-10-23 Thread Eric Sunshine
On Fri, Oct 18, 2019 at 2:52 PM Denton Liu wrote: > On Thu, Oct 17, 2019 at 07:41:44PM -0400, Eric Sunshine wrote: > > On Thu, Oct 17, 2019 at 7:17 PM Denton Liu wrote: > > > - test "$COPY" = "$(git rev-parse --verify me/copy)" && > > &g

Re: [PATCH 4/5] t4108: demonstrate bug in apply

2019-10-23 Thread Eric Sunshine
On Wed, Oct 23, 2019 at 8:04 AM Denton Liu wrote: > Currently, apply does not respect the merge.conflictStyle setting. > Demonstrate this by making the 'apply with --3way' test case generic and > extending it to show that the configuration of > merge.conflictStyle = diff3 causes a breakage. > > Ch

Re: [PATCH 2/2] ci(visual-studio): actually run the tests in parallel

2019-10-20 Thread Eric Sunshine
On Sun, Oct 20, 2019 at 4:39 PM Johannes Schindelin via GitGitGadget wrote: > [...] > During that transition, we needed to implement a new way to run the test > suite in parallel, as Visual Studio users typically will only have a Git > Bash available (which does not ship with `make` nore with supp

Re: [PATCH 3/6] completion: return the index of found word from __git_find_on_cmdline()

2019-10-18 Thread Eric Sunshine
On Fri, Oct 18, 2019 at 10:37 AM SZEDER Gábor wrote: > On Thu, Oct 17, 2019 at 01:52:27PM -0400, Eric Sunshine wrote: > > > + case "$1" in > > > + --show-idx) show_idx=y ;; > > > + *) return 1 ;; &

Re: [PATCH 5/6] completion: list existing working trees for 'git worktree' subcommands

2019-10-18 Thread Eric Sunshine
On Fri, Oct 18, 2019 at 11:00 AM SZEDER Gábor wrote: > On Thu, Oct 17, 2019 at 02:08:12PM -0400, Eric Sunshine wrote: > > It is a long-standing To-Do[1] for "git worktree list [--porcelain]" > > to indicate whether a worktree is locked, prunable, etc. Looking at > >

Re: [PATCH 4.5/12] t5520: replace test -f with test-lib functions

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 7:35 PM Denton Liu wrote: > Although `test -f` has the same functionality as test_path_is_file(), in > the case where test_path_is_file() fails, we get much better debugging > information. > > Replace `test -f` with test_path_is_file() so that future developers > will have

Re: [PATCH 09/12] t5520: test single-line files by git with test_cmp

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 7:17 PM Denton Liu wrote: > In case an invocation of a Git command fails within the subshell, the > failure will be masked. Replace the subshell with a file-redirection and > a call to test_cmp. > > Signed-off-by: Denton Liu > --- > diff --git a/t/t5520-pull.sh b/t/t5520-p

Re: [PATCH 08/12] t5520: use test_cmp_rev where possible

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 7:17 PM Denton Liu wrote: > In case an invocation of `git rev-list` fails within the subshell, the > failure will be masked. Remove the subshell and use test_cmp_rev() so > that failures can be discovered. > > Signed-off-by: Denton Liu > --- > diff --git a/t/t5520-pull.sh

Re: [PATCH 07/12] t5520: replace test -{n,z} with test-lib functions

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 7:17 PM Denton Liu wrote: > Instead of using `test -n` or `test -z`, replace them respectively with > invocations of test_file_not_empty() and test_must_be_empty(). > > Signed-off-by: Denton Liu > --- > diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh > @@ -206,15 +206,18 @@

Re: [PATCH 04/12] t5520: replace test -f with test_path_is_file

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 7:17 PM Denton Liu wrote: > Although `test -f` has the same functionality as test_path_is_file(), in > the case where test_path_is_file() fails, we get much better debugging > information. Replace `test -f` with test_path_is_file so that future > developers will have a bett

Re: [PATCH 5/6] completion: list existing working trees for 'git worktree' subcommands

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 1:35 PM SZEDER Gábor wrote: > Complete the paths of existing working trees for 'git worktree's > 'move', 'remove', 'lock', and 'unlock' subcommands. > [...] > Arguably 'git worktree unlock ' should only complete locked > working trees, but 'git worktree list --porcelain' do

Re: [PATCH 3/6] completion: return the index of found word from __git_find_on_cmdline()

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 1:35 PM SZEDER Gábor wrote: > When using the __git_find_on_cmdline() helper function so far we've > only been interested in which one of a set of words appear on the > command line. To complete options for some of 'git worktree's > subcommands in the following patches we'l

Re: [PATCH 2/2] Make "git branch -d" prune missing worktrees automatically.

2019-10-17 Thread Eric Sunshine
On Thu, Oct 17, 2019 at 12:28 PM Peter Jones wrote: > Currently, if you do: > > $ git branch zonk origin/master > $ git worktree add zonk zonk > $ rm -rf zonk > $ git branch -d zonk > > You get the following error: > > $ git branch -d zonk > error: Cannot delete branch 'zonk' checked out at > '/h

Re: [PATCH v3 1/1] quote: handle numm and empty strings in sq_quote_buf_pretty

2019-10-07 Thread Eric Sunshine
On Mon, Oct 7, 2019 at 12:17 PM Garima Singh via GitGitGadget wrote: > quote: handle numm and empty strings in sq_quote_buf_pretty What is "numm"? What does it mean to "handle" these things? A possible rewrite of the subject to explain the problem more precisely rather than using generalizations

Re: [PATCH 1/1] range-diff: internally force `diff.noprefix=false`

2019-10-02 Thread Eric Sunshine
On Wed, Oct 2, 2019 at 2:05 PM Johannes Schindelin via GitGitGadget wrote: > When parsing the diffs, `range-diff` expects to see the prefixes `a/` > and `b/` in the diff headers. > > These prefixes can be forced off via the config setting > `diff.noprefix=true`. As `range-diff` is not prepared for

Re: Feature request: different exit codes for git stash depending on whether stash was created or not

2019-09-27 Thread Eric Sunshine
On Fri, Sep 27, 2019 at 8:55 AM Ian Kemp wrote: > Currently, git stash's exit code is 0 regardless of whether it > performed a stash operation or not. Third parties invoking git stash > are therefore unable to determine whether a stash was actually made or > not. > > It would be helpful if there w

Re: [PATCH v2] git-svn: trim leading and trailing whitespaces in author name

2019-09-12 Thread Eric Sunshine
On Thu, Sep 12, 2019 at 10:56 AM Tobias Klauser wrote: > v2: > - move whitespace trimming below defined'ness check as per Eric Sunshine's >review comment > diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm > @@ -1494,6 +1494,7 @@ sub check_author { > if (!defined $author || length $autho

Re: [PATCH] git-svn: trim leading and trailing whitespaces in author name

2019-09-12 Thread Eric Sunshine
On Thu, Sep 12, 2019 at 7:59 AM Tobias Klauser wrote: > In some cases, the svn author names might contain leading or trailing > whitespaces, leading to messages such as: > > Author: user1 >not defined in authors.txt > > (the trailing newline leads to the line break). The user "user1" is > de

Re: [PATCH 1/1] reset: support the --stdin option

2019-09-04 Thread Eric Sunshine
On Wed, Sep 4, 2019 at 5:38 PM Johannes Schindelin via GitGitGadget wrote: > Just like with other Git commands, this option makes it read the paths > from the standard input. It comes in handy when resetting many, many > paths at once and wildcards are not an option (e.g. when the paths are > gene

Re: [PATCH 2/2] git-gui: add horizontal scrollbar to commit buffer

2019-09-04 Thread Eric Sunshine
On Wed, Sep 4, 2019 at 4:10 PM Bert Wesarg wrote: > While the commit message widget has a configurable fixed width, it > nevertheless allows to write commit messages which exceed this limit. > Though it does not show this content because there is not scrollbar for > this widget. No it is. "No it

Re: [PATCH 1/2] git-gui: warn if the commit message contains lines longer than the set limit

2019-09-04 Thread Eric Sunshine
On Wed, Sep 4, 2019 at 4:10 PM Bert Wesarg wrote: > The commit message widget does not wrap the next and has a configurable s/next/text/ > fixed width to avoid creating too wide commit messages. Though this was > only enforced in the GUI. Now we also check the commit message at commit > time for

Re: [PATCH 0/9] [RFC] New sparse-checkout builtin and "cone" mode

2019-09-02 Thread Eric Sunshine
On Sat, Aug 24, 2019 at 1:40 AM Elijah Newren wrote: > My $0.02: I think `git worktree add` should not only adopt the setting > of core.sparseCheckout from the current worktree, but it should also > adopt the $GIT_DIR/info/sparse-checkout file too. As another example in favor of imbuing "git work

Re: [PATCH v3] merge-options.txt: clarify meaning of various ff-related options

2019-08-30 Thread Eric Sunshine
On Fri, Aug 30, 2019 at 3:57 PM Junio C Hamano wrote: > If we want to dedicate one paragraph for each of these options, we > can and should make the introductory paragraph lighter by saying > something like > > Specifies how a merge is handled when the merged-in history > is alread

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Eric Sunshine
On Thu, Aug 29, 2019 at 7:12 PM Jon Simons wrote: > On 8/29/19 3:45 PM, Eric Sunshine wrote: > > On Thu, Aug 29, 2019 at 6:38 PM Jon Simons wrote: > >> + test_write_lines /* >sparse-src/all-files && > > > > Hmm, does this work correctly? I would ex

Re: [PATCH v2 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-29 Thread Eric Sunshine
On Thu, Aug 29, 2019 at 6:38 PM Jon Simons wrote: > Fix a bug in partial cloning with sparse filters by ensuring to check > for 'have_git_dir' before attempting to resolve the sparse filter OID. > [...] > Signed-off-by: Jon Simons > --- > diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-cl

Re: [PATCH v3 3/4] Recommend git-filter-repo instead of git-filter-branch

2019-08-29 Thread Eric Sunshine
On Wed, Aug 28, 2019 at 8:07 PM Elijah Newren wrote: > filter-branch suffers from a deluge of disguised dangers that disfigure > history rewrites (i.e. deviate from the deliberate changes). [...] > Signed-off-by: Elijah Newren > --- > diff --git a/Documentation/git-filter-branch.txt > b/Document

Re: [PATCH 1/2] list-objects-filter: only parse sparse OID when 'have_git_dir'

2019-08-28 Thread Eric Sunshine
On Wed, Aug 28, 2019 at 4:27 PM Jon Simons wrote: > Fix a bug in partial cloning with sparse filters by ensuring to check > for 'have_git_dir' before attempting to resolve the sparse filter OID. > [...] > Signed-off-by: Jon Simons > --- > diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-cl

Re: [PATCH v2 3/4] Recommend git-filter-repo instead of git-filter-branch

2019-08-27 Thread Eric Sunshine
On Tue, Aug 27, 2019 at 8:22 PM Elijah Newren wrote: > filter-branch suffers from a deluge of disguised dangers that disfigure > history rewrites (i.e. deviate from the deliberate changes). [...] > > Signed-off-by: Elijah Newren > --- > diff --git a/Documentation/git-filter-branch.txt > b/Docume

Re: [PATCH v2 2/4] t3427: accelerate this test by using fast-export and fast-import

2019-08-27 Thread Eric Sunshine
On Tue, Aug 27, 2019 at 8:22 PM Elijah Newren wrote: > fast-export and fast-import can easily handle the simple rewrite that > was being done by filter-branch, and should be significantly faster on > systems with a slow fork. Timings from before and after on two laptops > that I have access to (m

Re: [PATCH 08/13] t4014: let sed open its own files

2019-08-25 Thread Eric Sunshine
On Sat, Aug 24, 2019 at 4:27 AM Denton Liu wrote: > In some cases, we were using a redirection operator to feed input into > sed. However, since sed is capable of opening its own files and provides > better error messages on IO failure, make sed open its own files instead > of redirecting input in

Re: [PATCH v3 02/13] t4014: s/expected/expect/

2019-08-20 Thread Eric Sunshine
On Tue, Aug 20, 2019 at 3:19 AM Denton Liu wrote: > For test cases, the usual convention is to name expected output files > "expect", not "expected". Replace all instances with "expected" with s/with "expected"/of "expected"/ > "expect" except for one case where the "expected" is used as the nam

Re: [PATCH 1/1] commit-graph: add --[no-]progress to write and verify.

2019-08-20 Thread Eric Sunshine
On Tue, Aug 20, 2019 at 2:38 PM Garima Singh via GitGitGadget wrote: > Add --[no-]progress to git commit-graph write and verify. > The progress feature was introduced in 7b0f229 > ("commit-graph write: add progress output", 2018-09-17) but > the ability to opt-out was overlooked. > > Signed-off-by

Re: [PATCH v2 1/1] rebase.c: make sure current branch isn't moved when autostashing

2019-08-20 Thread Eric Sunshine
On Tue, Aug 20, 2019 at 4:12 PM Ben Wijen wrote: > diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh > @@ -306,4 +302,13 @@ test_expect_success 'branch is left alone when possible' > ' > +test_expect_success 'never change upstream branch' ' > + test_when_finished "git r

Re: [PATCH v2 4/4] format-patch: learn --infer-cover-letter option

2019-08-19 Thread Eric Sunshine
On Mon, Aug 19, 2019 at 7:53 PM Denton Liu wrote: > We used to populate the subject of the cover letter generated by > git-format-patch with "*** SUBJECT HERE ***". However, if a user submits > multiple patchsets, they may want to keep a consistent subject between > rerolls. > > If git-format-patc

Re: [PATCH v2 3/4] config/format.txt: make clear the default value of format.coverLetter

2019-08-19 Thread Eric Sunshine
On Mon, Aug 19, 2019 at 7:53 PM Denton Liu wrote: > diff --git a/Documentation/config/format.txt b/Documentation/config/format.txt > @@ -74,7 +74,8 @@ format.signOff:: > format.coverLetter:: > - A boolean that controls whether to generate a cover-letter when > + A boolean which lets y

Re: [PATCH v2 2/4] Doc: add more detail for git-format-patch

2019-08-19 Thread Eric Sunshine
On Mon, Aug 19, 2019 at 7:53 PM Denton Liu wrote: > In git-format-patch.txt, we were missing some key user information. > First of all, using the `--to` and `--cc` options don't override > `format.to` and `format.cc` variables, respectively. They add on to each > other. Document this. This entire

Re: [PATCH v2 1/4] t4014: clean up style

2019-08-19 Thread Eric Sunshine
On Mon, Aug 19, 2019 at 7:53 PM Denton Liu wrote: > In Git's tests, there is typically no space between the redirection > operator and the filename. Remove these spaces. > > Since output is silenced when running without `-v` and debugging > output is useful with `-v`, remove redirections to /dev/n

Re: [PATCH 3/3] format-patch: infer cover letter from branch description

2019-08-19 Thread Eric Sunshine
On Sun, Aug 18, 2019 at 10:37 PM Denton Liu wrote: > We used to populate the subject of the cover letter generated by > git-format-patch with "*** SUBJECT HERE ***". However, if a user submits > multiple patchsets, they may want to keep a consistent subject between > rerolls. > > If git-format-pat

Re: [PATCH 2/3] Doc: add more detail for git-format-patch

2019-08-19 Thread Eric Sunshine
On Sun, Aug 18, 2019 at 10:37 PM Denton Liu wrote: > In git-format-patch.txt, we were missing some key user information. > First of all, using the `--to` and `--cc` options don't override > `format.to` and `format.cc` variables, respectively. They add on to each > other. Document this. > > In addi

Re: [PATCH 3/3] sequencer: simplify root commit creation

2019-08-19 Thread Eric Sunshine
On Mon, Aug 19, 2019 at 5:18 AM Phillip Wood via GitGitGadget wrote: > Adapt try_to_commit() to create a new root commit rather than special > casing this in run_git_commit(). The significantly reduces the amount of s/The/This/ > special case code for creating the root commit and reduces the num

Re: [PATCH 1/3] t4014: clean up style

2019-08-19 Thread Eric Sunshine
On Sun, Aug 18, 2019 at 10:38 PM Denton Liu wrote: > diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh > @@ -96,7 +97,7 @@ test_expect_success "format-patch doesn't consider merge > commits" ' > git merge --no-ff slave && > - cnt=$(git format-patch -3 --stdout | grep "^

Re: [PATCH 13/14] t4002: make hash independent

2019-08-18 Thread Eric Sunshine
On Sun, Aug 18, 2019 at 3:21 PM brian m. carlson wrote: > Refactor out the hard-coded object IDs and use test_oid to provide > values for both SHA-1 and SHA-256. s/Refactor out/Factor out/ > Signed-off-by: brian m. carlson

Re: [PATCH 11/14] t3903: abstract away SHA-1-specific constants

2019-08-18 Thread Eric Sunshine
On Sun, Aug 18, 2019 at 3:21 PM brian m. carlson wrote: > Abstract away the SHA-1-specific constants by sanitizing diff output to > remove the index lines, since it's clear from the assertions in question > that we are not interested in the specific object IDs. > > Signed-off-by: brian m. carlson

Re: [PATCH 2/4] archive-tar: fix pax extended header length calculation

2019-08-17 Thread Eric Sunshine
On Sat, Aug 17, 2019 at 12:24 PM René Scharfe wrote: > A pax extended header records starts with a decimal number. Its value s/records/record/ > is the length of the whole record, including its own length. > > The calculation of that number if strbuf_append_ext_header() is off by s/if/in/ > o

Re: [PATCH] worktree remove: clarify error message on dirty worktree

2019-08-13 Thread Eric Sunshine
les. So, it deserves an error message which mentions untracked files explicitly. We could actually parse the output of "git status --porcelain" (which is invoked just above this spot) and provide a more specific error message ("...contains modified files" or "...contains untracked files") but that's probably not worth the effort. Anyhow, for what it's worth: Reviewed-by: Eric Sunshine

Re: Windows absolute drive path detection incomplete

2019-08-08 Thread Eric Sunshine
On Thu, Aug 8, 2019 at 12:45 PM Christopher Ertl wrote: > So I'm proposing to remove the check for the drive letter being alpha in > `has_dos_drive_prefix` macro: > > #define has_dos_drive_prefix(path) \ > ( (path)[1] == ':' ? 2 : 0) Nit: This isn't safe and will access memory beyond end

Re: [PATCH] grep: skip UTF8 checks explicitally

2019-07-21 Thread Eric Sunshine
On Sun, Jul 21, 2019 at 2:31 PM Carlo Marcelo Arenas Belón wrote: > grep: skip UTF8 checks explicitally s/explicitally/explicitly/ > Usually PCRE is compiled with JIT support, and therefore the code > path used includes calling pcre2_jit_match (for PCRE2), that ignores > invalid UTF-8 in the cor

Re: [PATCH v2] transport-helper: enforce atomic in push_refs_with_push

2019-07-18 Thread Eric Sunshine
On Thu, Jul 18, 2019 at 11:22 AM SZEDER Gábor wrote: > C99 'for' loop initial declaration, i.e. 'for (int i = 0; i < n; i++)', > is not allowed in Git's codebase yet, to maintain compatibility with > some older compilers. > [...] > [1] The Azure Pipelines builds have been using Ubuntu 16.04 images

Re: [PATCH] t5319: don't trip over a user name with whitespace

2019-06-30 Thread Eric Sunshine
On Sun, Jun 30, 2019 at 2:57 PM Johannes Sixt wrote: > On my Windows system where the POSIX commands are provided by MSYS2, > I observe this output: > > $ ls -l Makefile > -rw-r--r-- 1 Johannes Sixt 197121 101780 Jun 30 09:33 Makefile > > Notice the blank in the user name. Obviously, extracting th

Re: [PATCH 1/6] test-lib: introduce test_commit_bulk

2019-06-28 Thread Eric Sunshine
On Fri, Jun 28, 2019 at 7:04 PM SZEDER Gábor wrote: > On Fri, Jun 28, 2019 at 05:32:35PM -0400, Eric Sunshine wrote: > > On Fri, Jun 28, 2019 at 5:39 AM Jeff King wrote: > > > + in_dir=${indir:+-C "$indir"} > > > > Doesn't this suffer the probl

Re: [PATCH 1/6] test-lib: introduce test_commit_bulk

2019-06-28 Thread Eric Sunshine
On Fri, Jun 28, 2019 at 5:39 AM Jeff King wrote: > [...] > For bulk creation, we can do much better by using fast-import, but it's > often a pain to generate the input. Let's provide a helper to do so. > [...] > Signed-off-by: Jeff King > --- > diff --git a/t/test-lib-functions.sh b/t/test-lib-fu

Re: Git installation

2019-06-28 Thread Eric Sunshine
On Fri, Jun 28, 2019 at 11:03 AM garrett dean wrote: > I have been trying to install for on my PC for Windows ten and at > first I was having a hang when it reached the end. Now pop ups are > appearing saying there are configuration problems. You'll likely get more helpful responses by contacting

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

2019-06-27 Thread Eric Sunshine
On Thu, Jun 27, 2019 at 6:31 PM Emily Shaffer wrote: > On Thu, Jun 27, 2019 at 01:37:58AM -0400, Eric Sunshine wrote: > > Don't localize the die() message via _() here or in the preceding > > OBJ_COMMIT case. > > I'm a little surprised by that. Is it because die() i

Re: [PATCH 2/2] mingw: use Unicode functions explicitly

2019-06-27 Thread Eric Sunshine
On Thu, Jun 27, 2019 at 5:37 AM Johannes Schindelin via GitGitGadget wrote: > Many Win32 API functions actually exist in two variants: one with > the `A` suffix that takes ANSI parameters (`char *` or `const char *`) > and one with the `W` suffix that takes Unicode parameters (`wchar_t *` > or `co

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer wrote: > It may be illuminating to see which objects were not included within a > given filter. This also demonstrates, since filter-spec "tree:1" is > used, that the 'omitted' list contains all objects which are omitted, > not just the first objects w

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 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 > are following the revision walking tutorial will be encouraged to run > the revision walk with

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer wrote: > Provide a demonstration of a revision walk which traverses all types of > object, not just commits. This type of revision walk is used for > operations such as creating packfiles and performing fetches or clones, > so it's useful to teach new

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer wrote: > The final installment in the tutorial about sorting revision walk > outputs. This commit reverses the commit list, so that we see newer > commits last (handy since we aren't using a pager). > > It's important to note that rev->reverse needs to

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer wrote: > Order the revision walk by author or commit dates, to demonstrate how to s/,// > 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. > > Si

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer wrote: > In order to demonstrate how to create grep filters for revision walks, > filter the walk performed by cmd_walken() to print only commits which > are authored by someone with a gmail address. > [...] > Signed-off-by: Emily Shaffer > --- > diff

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer wrote: > Add the final steps needed and implement the walk loop itself. We add a > method walken_commit_walk() which performs the final setup to revision.c > and then iterates over commits from get_revision(). > [...] > Signed-off-by: Emily Shaffer >

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer wrote: > `struct rev_info` is what's used by the struct itself. What "struct itself"? Do you mean 'struct rev_info' is used by the _walk_ itself? Or something? > `repo_init_revisions()` initializes the struct; then we need to set it > up for the walk

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer wrote: > For now, we have no configuration options we want to set up for > ourselves, but in the future we may need to. At the very least, we > should invoke git_default_config() for each config option; we will do so > inside of a skeleton config callb

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer wrote: > It's expected that Git commands support '-h' in order to provide a > consistent user experience (and this expectation is enforced by the > test suite). '-h' is captured by parse_options() by default; in order to > support this flag, we add a s

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

2019-06-26 Thread Eric Sunshine
On Wed, Jun 26, 2019 at 7:51 PM Emily Shaffer wrote: > It's expected that Git commands support '-h' in order to provide a > consistent user experience (and this expectation is enforced by the > test suite). '-h' is captured by parse_options() by default; in order to > support this flag, we add a s

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

2019-06-23 Thread Eric Sunshine
On Wed, Jun 19, 2019 at 7:36 PM Emily Shaffer wrote: > On Wed, Jun 19, 2019 at 04:13:35AM -0400, Eric Sunshine wrote: > > Maybe I got confused because the tiny cmd_walken() snippets followed > > one another so closely (or because I got interrupted several times > > during the

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

2019-06-21 Thread Eric Sunshine
On Fri, Jun 21, 2019 at 1:19 PM Junio C Hamano wrote: > Eric Sunshine writes: > > On Fri, Jun 21, 2019 at 6:43 AM Christian Couder > > wrote: > >> On Thu, Jun 20, 2019 at 11:29 PM Emily Shaffer > >> wrote: > >> > It doesn't require 1

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

2019-06-21 Thread Eric Sunshine
On Fri, Jun 21, 2019 at 6:43 AM Christian Couder wrote: > On Thu, Jun 20, 2019 at 11:29 PM Emily Shaffer > wrote: > > 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]...' > > Yeah sure, I wi

Re: [PATCH 13/17] msvc: support building Git using MS Visual C++

2019-06-19 Thread Eric Sunshine
On Tue, Jun 18, 2019 at 8:24 AM Jeff Hostetler via GitGitGadget wrote: > With this patch, Git can be built using the Microsoft toolchain, via: > > make MSVC=1 [DEBUG=1] > > Third party libraries are built from source using the open source > "vcpkg" tool set. See https://github.com/Microsof

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

2019-06-19 Thread Eric Sunshine
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: > > > +int cmd_walken(int argc, const char **argv, const char *prefix) > > > +{ &g

Re: [PATCH 02/17] t0001 (mingw): do not expect a specific order of stdout/stderr

2019-06-18 Thread Eric Sunshine
On Wed, Jun 19, 2019 at 2:19 AM Johannes Sixt wrote: > Am 19.06.19 um 01:12 schrieb Eric Sunshine: > > On Tue, Jun 18, 2019 at 8:24 AM Johannes Schindelin via GitGitGadget > > wrote: > >> printf ".git\nfatal: Needed a single revision\n" >expect &

Re: [PATCH 15/17] msvc: do not pretend to support all signals

2019-06-18 Thread Eric Sunshine
On Tue, Jun 18, 2019 at 8:24 AM Jeff Hostetler via GitGitGadget wrote: > This special-cases various signals that are not supported on Windows, > such as SIGPIPE. These cause the UCRT to throw asserts (at least in > debug mode). > > Signed-off-by: Jeff Hostetler > Signed-off-by: Johannes Schindeli

Re: [PATCH 03/17] cache-tree.c: avoid reusing the DEBUG constant

2019-06-18 Thread Eric Sunshine
On Tue, Jun 18, 2019 at 8:24 AM Jeff Hostetler via GitGitGadget wrote: > In MSVC, the DEBUG constant is set automatically whenever compiling with > debug information. > > This is clearly not what was intended in cache-tree.c, so let's use a less > ambiguous constant there. s/constant/macro name/

Re: [PATCH 02/17] t0001 (mingw): do not expect a specific order of stdout/stderr

2019-06-18 Thread Eric Sunshine
On Tue, Jun 18, 2019 at 8:24 AM Johannes Schindelin via GitGitGadget wrote: > When redirecting stdout/stderr to the same file, we cannot guarantee > that stdout will come first. > > In fact, in this test case, it seems that an MSVC build always prints > stderr first. > > In any case, this test cas

Re: windows: error cannot lock ref ... unable to create lock

2019-06-18 Thread Eric Sunshine
On Tue, Jun 18, 2019 at 12:39 PM Anthony Sottile wrote: > + git fetch origin --tags > Unpacking objects: 100% (10/10), done. > From https://github.com/asottile-archive/git-windows-branch-test > * [new branch] master -> origin/master > error: cannot lock ref 'refs/remotes/origin/pr/aux':

Re: [PATCH 1/1] submodule foreach: fix recursion of options

2019-06-12 Thread Eric Sunshine
On Wed, Jun 12, 2019 at 2:10 PM Morian Sonnet via GitGitGadget wrote: > [...] > . Add -- before the command to execute, such that now correctly > > git --super-prefix submodule--helper \ > foreach --recursive -- git reset --hard > > is called. > > Signed-off-by: Morian Sonnet > --- >

Re: [PATCH 03/10] t1450: make hash size independent

2019-06-11 Thread Eric Sunshine
On Tue, Jun 11, 2019 at 7:03 PM Jonathan Tan wrote: > > test_expect_success 'alternate objects are correctly blamed' ' > > test_when_finished "rm -rf alt.git .git/objects/info/alternates" && > > + path=$(test_oid numeric) && > > + path=$(test_oid_to_path "$path") && > > Double assig

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

2019-06-10 Thread Eric Sunshine
On Mon, Jun 10, 2019 at 5:27 PM Junio C Hamano wrote: > Eric Sunshine writes: > >> +#include > >> +#include "builtin.h" > > > > Git source files must always include cache.h or git-compat-util.h (or, > > for builtins, builtin.h) as the very

Re: [PATCH 03/10] t1450: make hash size independent

2019-06-10 Thread Eric Sunshine
On Sun, Jun 9, 2019 at 6:44 PM brian m. carlson wrote: > Replace several hard-coded full and partial object IDs with variables or > computed values. Create junk data to stuff inside an invalid tree that > can be either 20 or 32 bytes long. Compute a binary all-zeros object ID > instead of hard-c

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

2019-06-07 Thread Eric Sunshine
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 > require a space between the object ID and name. > [...] > Signed-off-by: Emily Shaffer > --- > Not

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

2019-06-06 Thread Eric Sunshine
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 > all-object walk, and adding some configuration changes to both walk > types. It intentionally does

Re: Git self test failure on Solaris 11.3

2019-06-06 Thread Eric Sunshine
On Thu, Jun 6, 2019 at 1:35 PM Jeff King wrote: > On Thu, Jun 06, 2019 at 01:18:01PM -0400, Eric Sunshine wrote: > > > > not ok 12 - check normal git operations: twelve packs > > > > Jeff Walton reported this to me privately. I'm not familiar with this > >

Re: Git self test failure on Solaris 11.3

2019-06-06 Thread Eric Sunshine
[forwarding to the Git list] On Sun, Jun 2, 2019 at 6:23 AM Jeffrey Walton wrote: > On Sun, Jun 2, 2019 at 5:09 AM Jeffrey Walton wrote: > > I'm catching a self test failure on Solaris 11.3. Git 2.21 from sources. > > > > ok 8 - check normal git operations: two packs > > ok 9 - add more packs >

Re: worktree add already exists

2019-06-03 Thread Eric Sunshine
On Mon, Jun 3, 2019 at 5:47 AM Duy Nguyen wrote: > On Sun, Jun 2, 2019 at 2:11 PM Eric Sunshine wrote: > > On Mon, May 27, 2019 at 11:32 AM Ingo Wolf wrote: > > > I would like to attach an existing dir to git (make it a workdir) and > > > then update the index wit

Re: [RFC PATCH] doc: change 'The standard email format' to 'The standard date format'

2019-06-02 Thread Eric Sunshine
On Sat, Jun 1, 2019 at 4:12 PM Victory Osikwemhe wrote: > The current content of date-formats.txt under the RFC 2822 section > specifies 'The standard email format' whereas the format specified > is a date format > > Signed-off-by: Victory Osikwemhe > --- > diff --git a/Documentation/date-formats

Re: worktree add already exists

2019-06-02 Thread Eric Sunshine
On Mon, May 27, 2019 at 11:32 AM Ingo Wolf wrote: > $ ls -a barework > ./ ../ test.txt > $ git -C bare worktree add --no-checkout ../barework > Preparing worktree (new branch 'barework') > fatal: '../barework' already exists > $ git -C bare branch >barework > * master > Why this doesn't just

Re: [PATCH v2 1/3] diff-parseopt: correct variable types that are used by parseopt

2019-05-29 Thread Eric Sunshine
On Wed, May 29, 2019 at 5:11 AM Nguyễn Thái Ngọc Duy wrote: > Most number-related OPT_ macros store the value in an 'int' > variable. Many of the variables in 'struct diff_options' have a > different type, but during the conversion to using parse_options() I > failed to notice and correct. > > The

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

2019-05-23 Thread Eric Sunshine
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 > use it into the CodingGuidelines (which is where other useful > environment settings like DEVELOP

Re: [PATCH 3/3] clone: auto-enable git-credential-store when necessary

2019-05-20 Thread Eric Sunshine
On Sun, May 19, 2019 at 2:42 PM Jeff King wrote: > If the user clones with a URL containing a password and has no > credential helper configured, we're stuck. We don't want to write the > password into .git/config because that risks accidentally disclosing it. > But if we don't record it somewhere

Re: [PATCH 1/3] transport_anonymize_url(): support retaining username

2019-05-19 Thread Eric Sunshine
On Sun, May 19, 2019 at 2:37 PM Jeff King wrote: > [...] > - credential_form_url() parses a URL and decodes the specific s/form/from/ > elements, but it's hard to convert it back into a regular URL. It > treats "host:port" as a single unit, meaning it needs to be > re-encoded speci

Re: getting pull/push/fetch url

2019-05-17 Thread Eric Sunshine
On Fri, May 17, 2019 at 3:30 AM clime wrote: > for my app, i need to be able get remote urls (fetch/pull/push) so > that i can derive some information from those, e.g. pull url netloc > from which i derive where other custom endpoints (binary file storage) > related to the remote git repo is locat

Re: [PATCH] worktree add: be tolerant of corrupt worktrees

2019-05-17 Thread Eric Sunshine
On Mon, May 13, 2019 at 6:50 AM Nguyễn Thái Ngọc Duy wrote: > find_worktree() can die() unexpectedly because it uses real_path() > instead of the gentler version. When it's used in 'git worktree add' [1] > and there's a bad worktree, this die() could prevent people from adding > new worktrees. Th

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 8:19 PM Jeff King wrote: > On Thu, May 16, 2019 at 07:16:54PM -0400, Eric Sunshine wrote: > > Is there > > any existing code in Git for doing the relative fixups you mention for > > other Git environment variables? > > You can assign local_repo_e

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 6:17 PM Jeff King wrote: > On Thu, May 16, 2019 at 06:25:24PM +0700, Duy Nguyen wrote: > > So you probably can still make it work by backing up $GIT_INDEX_FILE > > (in case you need it), then unset it before you use "git worktree" (or > > cd to it if you keep a permanent se

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 7:42 AM Duy Nguyen wrote: > On Thu, May 16, 2019 at 6:33 PM Eric Sunshine wrote: > > You run afoul of it in other situations, as well. For instance, say > > you have your index file in a non-standard location: > > > > $ export GIT_

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 7:45 AM Duy Nguyen wrote: > On Thu, May 16, 2019 at 6:39 PM Eric Sunshine wrote: > > Thinking more clearly on it, a better fix might be for git-worktree to > > deal with this itself, converting such a path to absolute before > > cd'ing to the

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 7:25 AM Duy Nguyen wrote: > pre-commit hook sets GIT_INDEX_FILE to this "index.lock" so you have > the latest index content (which is not the same as from > $GIT_DIR/index). This variable will interfere with any commands that > work on a different worktree. I think that th

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 7:33 AM Eric Sunshine wrote: > I researched this also and concluded that it's a bug in git-commit. > You run afoul of it in other situations, as well. For instance, say > you have your index file in a non-standard location: > > $ export GIT_INDEX_F

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 7:25 AM Duy Nguyen wrote: > pre-commit hook sets GIT_INDEX_FILE to this "index.lock" so you have > the latest index content (which is not the same as from > $GIT_DIR/index). This variable will interfere with any commands that > work on a different worktree. > > So you proba

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

2019-05-15 Thread Eric Sunshine
On Wed, May 15, 2019 at 4:11 AM Philip Oakley wrote: > It is not immediately obvious how to use the `git help` system to show > the git(1) page, with its overview and its background and coordinating > material, such as environment variables. > > Let's simply list it as the last few words of the la

  1   2   3   4   5   6   7   8   9   10   >