Re: splitting off shell test framework

2017-08-23 Thread Adam Spiers
On 23 August 2017 at 16:47, Jeff King <p...@peff.net> wrote: > On Wed, Aug 23, 2017 at 02:46:30PM +0100, Adam Spiers wrote: >> >> Done at least once already: >> >> >> >> http://comments.gmane.org/gmane.comp.version-control.git/201591 >> [...] &g

Re: splitting off shell test framework

2017-08-23 Thread Adam Spiers
I got a helpful response to the following question almost 5 years ago: On 12 November 2012 at 23:09, Adam Spiers <g...@adamspiers.org> wrote: > On Mon, Nov 12, 2012 at 6:18 PM, Drew Northup <n1xim.em...@gmail.com> wrote: >> On Mon, Nov 12, 2012 at 11:37 AM, Adam Spiers <g.

Re: [PATCH 0/1] add git-splice subcommand for non-interactive branch splicing

2017-07-31 Thread Adam Spiers
On 31 July 2017 at 23:18, Junio C Hamano <gits...@pobox.com> wrote: > Adam Spiers <g...@adamspiers.org> writes: > > > Therefore there is a risk that each new UI for higher-level workflows > > will end up re-implementing these mid-level operations. This > > un

[PATCH 0/1] add git-splice subcommand for non-interactive branch splicing

2017-07-31 Thread Adam Spiers
course very welcome! Thanks, Adam Adam Spiers (1): add git-splice command for non-interactive branch splicing .gitignore | 1 +- Documentation/git-splice.txt | 125 ++- Makefile | 1 +- git-splice.sh| 737 ++

[PATCH 1/1] add git-splice command for non-interactive branch splicing

2017-07-31 Thread Adam Spiers
is persisted to disk, and thereby supports standard --abort and --continue semantics just like git's other extended workflow commands. It also handles more complex cases, as described in the manual page. Signed-off-by: Adam Spiers <g...@adamspiers.org> --- .gitignore

RFC: new git-transplant subcommand for non-interactively moving commits between branches

2016-05-29 Thread Adam Spiers
On Fri, May 27, 2016 at 03:08:11PM +0100, Adam Spiers wrote: > Hi all, > > I finally got around to implementing a new git subcommand which I've > wanted for quite a while. I've called it git-splice. [snipped] > Next steps, and the future > -- > >

Re: RFC: new git-splice subcommand for non-interactive branch splicing

2016-05-28 Thread Adam Spiers
ck of who prefers what :-/ > On Fri, 27 May 2016, Adam Spiers wrote: > > My feeling is that rebase -i provides something tremendously > > important, which the vast majority of users use on a regular basis, > > but that git is currently missing a convenient way to > >

Re: RFC: new git-splice subcommand for non-interactive branch splicing

2016-05-27 Thread Adam Spiers
Hi Johannes, Thanks for the quick reply! Responses inline below: On Fri, May 27, 2016 at 05:27:14PM +0200, Johannes Schindelin wrote: > On Fri, 27 May 2016, Adam Spiers wrote: > > > Description > > --- > > > > git-splice(1) non-interactively splices

RFC: new git-splice subcommand for non-interactive branch splicing

2016-05-27 Thread Adam Spiers
Hi all, I finally got around to implementing a new git subcommand which I've wanted for quite a while. I've called it git-splice. Description --- git-splice(1) non-interactively splices the current branch by removing a range of commits from within it and/or cherry-picking a range of

new screencast demo: git-deps facilitating porting between branches

2015-02-25 Thread Adam Spiers
Hi again, On 19 January 2015 at 00:11, Adam Spiers g...@adamspiers.org wrote: I'm pleased to announce this is ready for testing; here are more details along with a short screencast demonstration: http://blog.adamspiers.org/2015/01/19/git-deps/ I just quickly made another screencast demo

[ANNOUNCE] git-deps: commit dependency analysis / visualization

2015-01-18 Thread Adam Spiers
On Sun, Jan 04, 2015 at 01:08:03AM +, Adam Spiers wrote: Hi all, Thanks to my employer's generous Hack Week policy[0], I have the luxury of being able to spend most of next week hacking on a git commit dependency inference tool which I built 14 months ago but never got round

RFC: web UI for commit dependency inference tool

2015-01-03 Thread Adam Spiers
Hi all, Thanks to my employer's generous Hack Week policy[0], I have the luxury of being able to spend most of next week hacking on a git commit dependency inference tool which I built 14 months ago but never got round to polishing up or publically announcing. In this email I'll briefly explain

Re: questions / suggestions about history simplification

2013-12-22 Thread Adam Spiers
On Sat, Dec 21, 2013 at 10:44:43PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: I doubt it. 75% of the work for such a person to understand the behaviour from such an example is to understand what kind of history the example is building. Agreed. And that's

prevent gitk collapsing tree view when viewing a different commit?

2013-12-19 Thread Adam Spiers
Hi all, If I launch gitk, switch the lower right pane from Patch view mode to Tree view, expand a few directories, and then changing to viewing a different commit, the tree automatically collapses again. This is really annoying when trying to view changes to the tree structure over time; is

script for reproducing history example in git-log(1) man page

2013-12-19 Thread Adam Spiers
I wanted to be able to experiment with the TREESAME example given in the git-log(1) man page, so I built this script which recreates it: - 8 - 8 - 8 - 8 - 8 - #!/bin/bash mkdir git-log-example cd git-log-example git init # I echo asdf foo; echo

Re: prevent gitk collapsing tree view when viewing a different commit?

2013-12-19 Thread Adam Spiers
On Thu, Dec 19, 2013 at 01:57:43PM -0500, Marc Branchaud wrote: On 13-12-19 10:15 AM, Adam Spiers wrote: If I launch gitk, switch the lower right pane from Patch view mode to Tree view, expand a few directories, and then changing to viewing a different commit, the tree automatically

questions / suggestions about history simplification

2013-12-19 Thread Adam Spiers
On Thu, Dec 19, 2013 at 06:36:45PM +, Adam Spiers wrote: I wanted to be able to experiment with the TREESAME example given in the git-log(1) man page, so I built this script which recreates it: [snipped] Would it be worth including this in (say) contrib/, and then referring to it from

Re: questions / suggestions about history simplification

2013-12-19 Thread Adam Spiers
On Thu, Dec 19, 2013 at 11:10:44AM -0800, Jonathan Nieder wrote: Adam Spiers wrote: Hmm, another related option would be to add a new test case which tests that git log behaves in the way the man page says it does, in this case. Yes, please! If you have a rough patch in that direction

Re: questions / suggestions about history simplification

2013-12-19 Thread Adam Spiers
On Thu, Dec 19, 2013 at 12:39:05PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: Ah OK, that makes sense now, but not the most intuitive choice of name IMHO. I would have gone for something like --all-commits, but I guess it's way too late to change now. Besides

Re: questions / suggestions about history simplification

2013-12-19 Thread Adam Spiers
On Thu, Dec 19, 2013 at 12:37:53PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: On Thu, Dec 19, 2013 at 06:36:45PM +, Adam Spiers wrote: I wanted to be able to experiment with the TREESAME example given in the git-log(1) man page, so I built this script which

Re: questions / suggestions about history simplification

2013-12-19 Thread Adam Spiers
On Thu, Dec 19, 2013 at 07:03:33PM +, Adam Spiers wrote: I still don't understand a few things about history simplification: 1. The --full-history without parent rewriting correctly asserts that commit Q will be shown. But AFAICS this contradicts the documented behaviour Commits

Re: Subtree: My Status

2013-12-14 Thread Adam Spiers
On Thu, Dec 12, 2013 at 11:26:36AM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: On Mon, Apr 22, 2013 at 09:18:46AM +0200, Jeremy Rosen wrote: David Green wrote: Please remember that I don't consider myself a gatekeeper to git subtree. In fact I could use some

git cherry could honour cherry-picked from commit messages?

2013-10-07 Thread Adam Spiers
Currently git cherry determines whether a commit has been merged upstream by calculating its patch-id and looking for that in the upstream branch. Is there any reason why it couldn't also look for (cherry picked from commit ...) lines which are automatically added by cherry-pick's -x switch?

Re: git cherry could honour cherry-picked from commit messages?

2013-10-07 Thread Adam Spiers
On Mon, Oct 07, 2013 at 09:16:17PM +0100, Adam Spiers wrote: Currently git cherry determines whether a commit has been merged upstream by calculating its patch-id and looking for that in the upstream branch. Is there any reason why it couldn't also look for (cherry picked from commit

tools for making upstreaming / backporting easier in git

2013-09-21 Thread Adam Spiers
Hi all, Back in April, I announced a couple of scripts I'd written to wrap around git-cherry and git-notes, which help when you have more than a trivial number of commits to upstream / backport from one branch to another. Since then I've improved these scripts, and also written a higher-level

Re: cdgit: cd relative to git workdir root

2013-09-16 Thread Adam Spiers
On Mon, Sep 16, 2013 at 09:01:14PM +0200, Thomas Koch wrote: Hi, I frequently have the need to cd back to the root of the current git workdir and created to alias for this: git alias root = rev-parse --show-toplevel shell alias cdgit = cd $(git root) Maybe somebody likes this. I

Re: [PATCH] check-ignore: Add option to ignore index contents

2013-08-29 Thread Adam Spiers
On Thu, Aug 29, 2013 at 11:46:52PM +0100, Dave Williams wrote: check-ignore currently shows how .gitignore rules would treat untracked paths. Tracked paths do not generate useful output. This prevents debugging of why a path became tracked unexpectedly unless that path is first removed from

git-rnotes: git-notes wrapper for sharing notes between repositories

2013-04-29 Thread Adam Spiers
On Sat, Apr 27, 2013 at 02:21:19PM +0100, Adam Spiers wrote: Hi all, I just wrote a wrapper around git cherry which adds a splash of colour, and facilitates exclusion of commits which should never be upstreamed, by using a git-notes(1) namespace as a blacklist. It's just a quick hack

improvements to checks for core.notesRef / GIT_NOTES_REF / --ref

2013-04-29 Thread Adam Spiers
On Mon, Apr 29, 2013 at 02:32:05PM +0100, Adam Spiers wrote: I've just written another quick wrapper around 'git notes' which makes it less painless to share notes to and from remote repositories: https://github.com/aspiers/git-config/blob/master/bin/git-rnotes This makes sharing

Re: improvements to checks for core.notesRef / GIT_NOTES_REF / --ref

2013-04-29 Thread Adam Spiers
On Mon, Apr 29, 2013 at 10:13:32AM -0700, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: static struct notes_tree *init_notes_check(const char *subcommand) ... Can we relax this to refs/, to allow better isolation of namespaces for remote notes? Also, the check

[PATCH] t0008: use named pipe (FIFO) to test check-ignore streaming

2013-04-29 Thread Adam Spiers
with the redirection wizardry required to make this work. http://article.gmane.org/gmane.comp.version-control.git/220916 Signed-off-by: Adam Spiers g...@adamspiers.org --- t/t0008-ignores.sh | 38 +- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/t

Re: improvements to checks for core.notesRef / GIT_NOTES_REF / --ref

2013-04-29 Thread Adam Spiers
On Tue, Apr 30, 2013 at 02:32:33AM +0200, Johan Herland wrote: On Mon, Apr 29, 2013 at 11:40 PM, Adam Spiers g...@adamspiers.org wrote: [snipped] IMHO the more similar the merge's user experience is to a standard merge, the better, since that would minimise the number of merging workflows

git-icing: sugary wrapper around git-cherry

2013-04-27 Thread Adam Spiers
Hi all, I just wrote a wrapper around git cherry which adds a splash of colour, and facilitates exclusion of commits which should never be upstreamed, by using a git-notes(1) namespace as a blacklist. It's just a quick hack and Ruby probably won't be to everyone's taste, but I thought I'd

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-24 Thread Adam Spiers
On Mon, Apr 22, 2013 at 11:03:44AM -0700, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: On Thu, Apr 11, 2013 at 03:11:32PM -0400, Jeff King wrote: I always get a little nervous with sleeps in the test suite, as they are indicative that we are trying to avoid some race

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-15 Thread Adam Spiers
On Mon, Apr 15, 2013 at 09:48:22AM +1000, Duy Nguyen wrote: On Mon, Apr 15, 2013 at 9:25 AM, Adam Spiers g...@adamspiers.org wrote: The introduction of argc also makes it possible to invoke check_ignore() with arguments which are not self-consistent. This is the same problem with main

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-14 Thread Adam Spiers
On Sat, Apr 13, 2013 at 09:09:33AM +1000, Duy Nguyen wrote: On Sat, Apr 13, 2013 at 1:03 AM, Adam Spiers g...@adamspiers.org wrote: -static int check_ignore(const char *prefix, const char **pathspec) +static int check_ignore(int argc, const char **argv, const char *prefix) { struct

Re: [PATCH v3 5/5] Documentation: add caveats about I/O buffering for check-{attr,ignore}

2013-04-12 Thread Adam Spiers
On Thu, Apr 11, 2013 at 07:12:22PM -0700, Junio C Hamano wrote: It is usually OK to re-flow the text in the paragraph you are touching. After all, for the purpose of reviewing, people can just blindly apply and then ask diff --color-words. In this case, however, there was some changes that

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-12 Thread Adam Spiers
On Fri, Mar 15, 2013 at 01:06:38PM +0700, Nguyễn Thái Ngọc Duy wrote: check-ignore (at least the test suite) seems to rely on the pattern order. PATHSPEC_KEEP_ORDER is introduced to explictly express this. The lack of PATHSPEC_MAXDEPTH_VALID is sufficient because it's the only flag that

Re: [PATCH 2/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 01:31:45AM -0400, Jeff King wrote: On Thu, Apr 11, 2013 at 02:59:32AM +0100, Adam Spiers wrote: @@ -111,14 +110,11 @@ static int check_ignore_stdin_paths(struct path_exclude_check check, const char die(line is badly quoted

Re: [PATCH 1/5] check-ignore: move setup into cmd_check_ignore()

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 01:25:53AM -0400, Jeff King wrote: On Thu, Apr 11, 2013 at 02:59:31AM +0100, Adam Spiers wrote: -static int check_ignore(const char *prefix, const char **pathspec) +static int check_ignore(struct path_exclude_check check, + const char *prefix, const

Re: [PATCH 2/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 02:59:32AM +0100, Adam Spiers wrote: +test_expect_success STDBUF 'streaming support for --stdin' ' + ( + echo one + sleep 2 + echo two + ) | stdbuf -oL git check-ignore -v -n --stdin out I just noticed that this patch

[PATCH v2 1/5] t0008: remove duplicated test fixture data

2013-04-11 Thread Adam Spiers
The expected contents of STDOUT for the final --stdin tests can be derived from the expected contents of STDOUT for the same tests when --verbose is given, in the same way that test_expect_success_multi derives this for earlier tests. Signed-off-by: Adam Spiers g...@adamspiers.org --- t/t0008

[PATCH v2 3/5] check-ignore: move setup into cmd_check_ignore()

2013-04-11 Thread Adam Spiers
-by: Adam Spiers g...@adamspiers.org --- builtin/check-ignore.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c index 59acf74..e2d3006 100644 --- a/builtin/check-ignore.c +++ b/builtin/check

[PATCH v2 2/5] check-ignore: add -n / --non-matching option

2013-04-11 Thread Adam Spiers
-off-by: Adam Spiers g...@adamspiers.org --- Documentation/git-check-ignore.txt | 15 + builtin/check-ignore.c | 46 -- t/t0008-ignores.sh | 122 +++-- 3 files changed, 134 insertions(+), 49 deletions(-) diff --git

[PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
API. Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/check-ignore.c | 15 +-- t/t0008-ignores.sh | 28 +++- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c index e2d3006..c00a7d6

[PATCH v2 5/5] Documentation: add caveats about I/O buffering for check-{attr,ignore}

2013-04-11 Thread Adam Spiers
. Somebody has to buffer; the pipe buffers provide some leeway, but they are limited. Thanks to Peff for pointing this out: http://article.gmane.org/gmane.comp.version-control.git/220534 Signed-off-by: Adam Spiers g...@adamspiers.org --- Documentation/git-check-attr.txt | 5 + Documentation

[PATCH v3 5/5] Documentation: add caveats about I/O buffering for check-{attr,ignore}

2013-04-11 Thread Adam Spiers
://article.gmane.org/gmane.comp.version-control.git/220534 Signed-off-by: Adam Spiers g...@adamspiers.org --- Documentation/git-check-attr.txt | 5 + Documentation/git-check-ignore.txt | 5 + Documentation/git.txt | 7 --- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 03:11:32PM -0400, Jeff King wrote: I always get a little nervous with sleeps in the test suite, as they are indicative that we are trying to avoid some race condition, which means that the test can fail when the system is under load, or when a tool like valgrind is used

Re: [PATCH v2 4/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-11 Thread Adam Spiers
On Thu, Apr 11, 2013 at 05:04:30PM -0400, Aaron Schrab wrote: At 13:05 +0100 11 Apr 2013, Adam Spiers g...@adamspiers.org wrote: The above use case suggests that empty STDIN is actually a reasonable scenario (e.g. when the caller doesn't know in advance whether any queries need to be fed

[PATCH 1/5] check-ignore: move setup into cmd_check_ignore()

2013-04-10 Thread Adam Spiers
-by: Adam Spiers g...@adamspiers.org --- builtin/check-ignore.c | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c index 0240f99..0a4eef1 100644 --- a/builtin/check-ignore.c +++ b/builtin/check

[PATCH 3/5] Documentation: add caveats about I/O buffering for check-{attr,ignore}

2013-04-10 Thread Adam Spiers
. Somebody has to buffer; the pipe buffers provide some leeway, but they are limited. Thanks to Peff for pointing this out: http://article.gmane.org/gmane.comp.version-control.git/220534 Signed-off-by: Adam Spiers g...@adamspiers.org --- Documentation/git-check-attr.txt | 5 + Documentation

[PATCH 2/5] check-ignore: allow incremental streaming of queries via --stdin

2013-04-10 Thread Adam Spiers
API. Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/check-ignore.c | 16 ++-- t/t0008-ignores.sh | 29 - 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c index 0a4eef1..ce4b1ad

[PATCH 5/5] check-ignore: add -n / --non-matching option

2013-04-10 Thread Adam Spiers
-off-by: Adam Spiers g...@adamspiers.org --- Documentation/git-check-ignore.txt | 15 + builtin/check-ignore.c | 46 -- t/t0008-ignores.sh | 122 +++-- 3 files changed, 134 insertions(+), 49 deletions(-) diff --git

[PATCH 4/5] t0008: remove duplicated test fixture data

2013-04-10 Thread Adam Spiers
The expected contents of STDOUT for the final --stdin tests can be derived from the expected contents of STDOUT for the same tests when --verbose is given, in the same way that test_expect_success_multi derives this for earlier tests. Signed-off-by: Adam Spiers g...@adamspiers.org --- t/t0008

[PATCH] t: make PIPE a standard test prerequisite

2013-04-10 Thread Adam Spiers
The 'PIPE' test prerequisite was already defined identically by t9010 and t9300, therefore it makes sense to make it a predefined prerequisite. Signed-off-by: Adam Spiers g...@adamspiers.org --- My first attempt at writing a test for check-ignore's new streaming behaviour involved mkfifo, during

RFC: two minor tweaks to check-ignore to help git-annex assistant

2013-04-08 Thread Adam Spiers
-by: Adam Spiers g...@adamspiers.org --- Documentation/git-check-ignore.txt | 15 + builtin/check-ignore.c | 43 -- 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/Documentation/git-check-ignore.txt b/Documentation/git-check

Re: [PATCH 2/2] format-patch: --inline-single

2013-02-22 Thread Adam Spiers
On Thu, Feb 21, 2013 at 06:13:28PM -0500, Jeff King wrote: On Thu, Feb 21, 2013 at 12:26:22PM -0800, Junio C Hamano wrote: Some people may find it convenient to append a simple patch at the bottom of a discussion e-mail separated by a scissors mark, ready to be applied with git am -c.

Re: Re* [PATCH 2/2] check-ignore.c: fix segfault with '.' argument from repo root

2013-02-20 Thread Adam Spiers
On Tue, Feb 19, 2013 at 06:53:07PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: OK, thanks for the information. IMHO it would be nice if 'git format-patch' and 'git am' supported this style of inline patch inclusion, but maybe there are good reasons to discourage

Re: [PATCH v2 2/2] check-ignore.c, dir.c: fix segfault with '.' argument from repo root

2013-02-20 Thread Adam Spiers
On Tue, Feb 19, 2013 at 06:47:23PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: Remove a sweep-the-issue-under-the-rug conditional in check-ignore that avoided to pass an empty string to the callchain while at it. It is a valid question to ask for check-ignore

Re: [BUG] git-check-ignore: Segmentation fault

2013-02-19 Thread Adam Spiers
On Tue, Feb 19, 2013 at 5:24 AM, Zoltan Klinger zoltan.klin...@gmail.com wrote: Hi there, The new git-check-ignore command seg faults when (1) it is called with single dot path name at $GIT_DIR level _AND_ (2) and .gitignore has at least one directory pattern. Git version:

[PATCH 2/2] check-ignore.c: fix segfault with '.' argument from repo root

2013-02-19 Thread Adam Spiers
directory would never typically be ignored, but of course it should not segfault in this case. Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/check-ignore.c | 2 +- t/t0008-ignores.sh | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/builtin/check-ignore.c b/builtin

[PATCH 1/2] t0008: document test_expect_success_multi

2013-02-19 Thread Adam Spiers
of t0008. Signed-off-by: Adam Spiers g...@adamspiers.org --- t/t0008-ignores.sh | 10 ++ 1 file changed, 10 insertions(+) diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh index d7df719..ebe7c70 100755 --- a/t/t0008-ignores.sh +++ b/t/t0008-ignores.sh @@ -75,6 +75,16 @@ test_check_ignore

Re: Proposal: sharing .git/config

2013-02-19 Thread Adam Spiers
On Tue, Feb 19, 2013 at 9:25 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Hi, I have this itch where I want to share my remotes config between machines. In my fork, I should be able to specify where my upstream sources are, so remotes get set up automatically when I clone. There are

Re: [PATCH 2/2] check-ignore.c: fix segfault with '.' argument from repo root

2013-02-19 Thread Adam Spiers
On Tue, Feb 19, 2013 at 5:54 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: Fix a corner case where check-ignore would segfault when run with the '.' argument from the top level of a repository, due to prefix_path() converting '.' into the empty string

[PATCH v2 2/2] check-ignore.c, dir.c: fix segfault with '.' argument from repo root

2013-02-19 Thread Adam Spiers
issue. Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/check-ignore.c | 2 +- dir.c | 8 t/t0008-ignores.sh | 5 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c index 709535c..0240f99

Re: [PATCH v2 2/2] check-ignore.c, dir.c: fix segfault with '.' argument from repo root

2013-02-19 Thread Adam Spiers
On Tue, Feb 19, 2013 at 7:59 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: Fix a corner case where check-ignore would segfault when run with the '.' argument from the top level of a repository, due to prefix_path() converting '.' into the empty string

Re: [PATCH v2 2/2] check-ignore.c, dir.c: fix segfault with '.' argument from repo root

2013-02-19 Thread Adam Spiers
On Tue, Feb 19, 2013 at 02:03:01PM -0800, Junio C Hamano wrote: I started to suspect that may be the right approach. Why not do this? -- 8 -- From: Junio C Hamano gits...@pobox.com Date: Tue, 19 Feb 2013 11:56:44 -0800 Subject: [PATCH] name-hash: allow hashing an empty string Usually we

Re: Re* [PATCH 2/2] check-ignore.c: fix segfault with '.' argument from repo root

2013-02-19 Thread Adam Spiers
On Tue, Feb 19, 2013 at 11:56:44AM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: Fair enough. I'll reply to this with a new version.[0] [0] I wish there was a clean way to include the new version inline, but as I've noted before, there doesn't seem

[PATCH] clean.c, ls-files.c: respect encapsulation of exclude_list_groups

2013-01-16 Thread Adam Spiers
dir.exclude_list_groups[EXC_CMDL]. Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/clean.c| 6 +++--- builtin/ls-files.c | 15 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/builtin/clean.c b/builtin/clean.c index b098288..b9cb7ad 100644 --- a/builtin

Re: What's cooking in git.git (Jan 2013, #06; Mon, 14)

2013-01-15 Thread Adam Spiers
On Mon, Jan 14, 2013 at 10:23 PM, Junio C Hamano gits...@pobox.com wrote: * as/check-ignore (2013-01-10) 12 commits (merged to 'next' on 2013-01-14 at 9df2afc) + t0008: avoid brace expansion + add git-check-ignore sub-command + setup.c: document get_pathspec() + add.c: extract new

Re: [PATCH] t0008: avoid brace expansion

2013-01-09 Thread Adam Spiers
On Wed, Jan 9, 2013 at 11:49 PM, René Scharfe rene.scha...@lsrfire.ath.cx wrote: Brace expansion is not required by POSIX and not supported by dash nor NetBSD's sh. Explicitly list all combinations instead. Good catch, thanks! -- To unsubscribe from this list: send the line unsubscribe git in

Re: [PATCH] t0008: avoid brace expansion

2013-01-09 Thread Adam Spiers
On Thu, Jan 10, 2013 at 12:18 AM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: On Wed, Jan 9, 2013 at 11:49 PM, René Scharfe rene.scha...@lsrfire.ath.cx wrote: Brace expansion is not required by POSIX and not supported by dash nor NetBSD's sh. Explicitly

Re: [PATCH v3 02/19] Improve documentation and comments regarding directory traversal API

2013-01-06 Thread Adam Spiers
On Wed, Jan 02, 2013 at 12:54:19PM +, Adam Spiers wrote: On Tue, Jan 1, 2013 at 8:52 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: diff --git a/dir.c b/dir.c index ee8e711..89e27a6 100644 --- a/dir.c +++ b/dir.c @@ -2,6 +2,8

Re: [PATCH v3 11/19] dir.c: use a single struct exclude_list per source of excludes

2013-01-06 Thread Adam Spiers
On Fri, Jan 04, 2013 at 01:03:59PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: diff --git a/builtin/clean.c b/builtin/clean.c index 0c7b3d0..bd18b88 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -97,9 +97,10 @@ int cmd_clean(int argc, const char **argv

Re: [PATCH v3 11/19] dir.c: use a single struct exclude_list per source of excludes

2013-01-06 Thread Adam Spiers
On Fri, Jan 04, 2013 at 11:54:34PM -0800, Junio C Hamano wrote: Junio C Hamano gits...@pobox.com writes: Adam Spiers g...@adamspiers.org writes: diff --git a/builtin/clean.c b/builtin/clean.c index 0c7b3d0..bd18b88 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -97,9 +97,10

[PATCH] api-allocation-growing.txt: encourage better variable naming

2013-01-06 Thread Adam Spiers
not on their type. Signed-off-by: Adam Spiers g...@adamspiers.org --- Documentation/technical/api-allocation-growing.txt | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Documentation/technical/api-allocation-growing.txt b/Documentation/technical/api-allocation

Re: as/check-ignore (was Re: What's cooking in git.git (Jan 2013, #02; Thu, 3))

2013-01-06 Thread Adam Spiers
On Fri, Jan 04, 2013 at 01:13:12PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: On Thu, Jan 3, 2013 at 7:17 PM, Junio C Hamano gits...@pobox.com wrote: * as/check-ignore (2012-12-28) 19 commits - Add git-check-ignore sub-command - setup.c: document get_pathspec

[PATCH v4 00/11] new git check-ignore sub-command

2013-01-06 Thread Adam Spiers
and the diffstat of each individual patch. This series is also available via the check-ignore-v4 tag in: git://github.com/aspiers/git.git Adam Spiers (11): dir.c: use a single struct exclude_list per source of excludes dir.c: keep track of where patterns came from dir.c: provide clear_directory

[PATCH v4 04/11] dir.c: improve docs for match_pathspec() and match_pathspec_depth()

2013-01-06 Thread Adam Spiers
Fix a grammatical issue in the description of these functions, and make it more obvious how and why seen[] can be reused across multiple invocations. Signed-off-by: Adam Spiers g...@adamspiers.org --- dir.c | 38 ++ dir.h | 6 ++ 2 files changed, 32

[PATCH v4 02/11] dir.c: keep track of where patterns came from

2013-01-06 Thread Adam Spiers
. from the CLI. Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/clean.c| 4 ++-- builtin/ls-files.c | 5 +++-- dir.c | 26 -- dir.h | 21 +++-- 4 files changed, 44 insertions(+), 12 deletions(-) diff --git a/builtin

[PATCH v4 05/11] add.c: remove unused argument from validate_pathspec()

2013-01-06 Thread Adam Spiers
The 'argc' argument passed to validate_pathspec() was never used. Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/add.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index c689f37..1f62ba3 100644 --- a/builtin/add.c +++ b

[PATCH v4 10/11] setup.c: document get_pathspec()

2013-01-06 Thread Adam Spiers
Since we have just created a new pathspec-handling library, now is a good time to add some comments explaining get_pathspec(). Signed-off-by: Adam Spiers g...@adamspiers.org --- The deprecation warning is new since v3. setup.c | 19 +++ 1 file changed, 19 insertions(+) diff

[PATCH v4 11/11] add git-check-ignore sub-command

2013-01-06 Thread Adam Spiers
This works in a similar manner to git-check-attr. Thanks to Jeff King and Junio C Hamano for the idea: http://thread.gmane.org/gmane.comp.version-control.git/108671/focus=108815 Signed-off-by: Adam Spiers g...@adamspiers.org --- Several minor improvements since v3: - rename char *dir to slash

[PATCH v4 09/11] add.c: extract new die_if_path_beyond_symlink() for reuse

2013-01-06 Thread Adam Spiers
This will be reused by a new git check-ignore command. Also document validate_pathspec(). Signed-off-by: Adam Spiers g...@adamspiers.org --- Unlike v3, this series doesn't make validate_pathspec() public. builtin/add.c | 10 ++ pathspec.c| 12 pathspec.h| 1 + 3

[PATCH v4 08/11] add.c: extract check_path_for_gitlink() from treat_gitlinks() for reuse

2013-01-06 Thread Adam Spiers
Extract the body of the for loop in treat_gitlinks() into a separate check_path_for_gitlink() function so that it can be reused elsewhere. This paves the way for a new check-ignore sub-command. Also document treat_gitlinks(). Signed-off-by: Adam Spiers g...@adamspiers.org --- Unlike v3

[PATCH v4 07/11] pathspec.c: rename newly public functions for clarity

2013-01-06 Thread Adam Spiers
() - find_pathspecs_matching_against_index() Signed-off-by: Adam Spiers g...@adamspiers.org --- builtin/add.c | 4 ++-- pathspec.c| 17 + pathspec.h| 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index e51ba44..8c3fdf9 100644 --- a/builtin

[PATCH v4 06/11] add.c: move pathspec matchers into new pathspec.c for reuse

2013-01-06 Thread Adam Spiers
comments documenting these newly public functions, including clarifications that they operate on the index. Signed-off-by: Adam Spiers g...@adamspiers.org --- The v3 version of this patch extracted 5 functions from add.c to pathspec.c, two of which did not need to be extracted. Here we use more fine

Re: [PATCH] api-allocation-growing.txt: encourage better variable naming

2013-01-06 Thread Adam Spiers
On Sun, Jan 06, 2013 at 12:29:33PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: The documentation for the ALLOC_GROW API implicitly encouraged developers to use ary as the variable name for the array which is dynamically grown. However ary is an unusual

Re: [PATCH v3 11/19] dir.c: use a single struct exclude_list per source of excludes

2013-01-06 Thread Adam Spiers
On Sun, Jan 06, 2013 at 12:25:48PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: On Fri, Jan 04, 2013 at 01:03:59PM -0800, Junio C Hamano wrote: Adam Spiers g...@adamspiers.org writes: diff --git a/builtin/clean.c b/builtin/clean.c index 0c7b3d0..bd18b88

Re: [PATCH v3 11/19] dir.c: use a single struct exclude_list per source of excludes

2013-01-06 Thread Adam Spiers
On Sun, Jan 06, 2013 at 10:53:11PM +, Adam Spiers wrote: That's a valid point. However, the ary[0] part which assumes external knowledge of the internal implementation can trivially be avoided by squashing this patch onto the commit we are discussing: [snipped] diff --git a/builtin/ls

Re: What's cooking in git.git (Jan 2013, #02; Thu, 3)

2013-01-04 Thread Adam Spiers
On Thu, Jan 3, 2013 at 7:17 PM, Junio C Hamano gits...@pobox.com wrote: * as/check-ignore (2012-12-28) 19 commits - Add git-check-ignore sub-command - setup.c: document get_pathspec() - pathspec.c: extract new validate_path() for reuse - pathspec.c: move reusable code from builtin/add.c

Re: [PATCH v3 02/19] Improve documentation and comments regarding directory traversal API

2013-01-02 Thread Adam Spiers
On Tue, Jan 1, 2013 at 8:52 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: diff --git a/Documentation/technical/api-directory-listing.txt b/Documentation/technical/api-directory-listing.txt index 0356d25..944fc39 100644 --- a/Documentation/technical/api

Re: [PATCH 1/2] dir.c: Make git-status --ignored more consistent

2012-12-30 Thread Adam Spiers
On Sun, Dec 30, 2012 at 2:54 PM, Antoine Pelisse apeli...@gmail.com wrote: By the way, that merges without conflicts with Adam's series, but it will not compile as he renamed functions that I'm now using (path_excluded() - is_path_excluded() that is). Ah, renames! I forgot about those. By

Re: Hold your fire, please

2012-12-29 Thread Adam Spiers
On Fri, Dec 28, 2012 at 11:52 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Primarily in order to force me concentrate on the releng for the upcoming release, and also to encourage contributors to focus on finding and fixing any last minute regressions

Re: [PATCH v3 18/19] setup.c: document get_pathspec()

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:36 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: Since we have just created a new pathspec-handling library, now is a good time to add some comments explaining get_pathspec(). Signed-off-by: Adam Spiers g...@adamspiers.org

Re: [PATCH v3 16/19] pathspec.c: move reusable code from builtin/add.c

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:32 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: diff --git a/pathspec.h b/pathspec.h new file mode 100644 index 000..8bb670b --- /dev/null +++ b/pathspec.h @@ -0,0 +1,5 @@ +extern char *find_used_pathspec(const char

Re: [PATCH v3 17/19] pathspec.c: extract new validate_path() for reuse

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:44 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: This will be reused by a new git check-ignore command. Signed-off-by: Adam Spiers g...@adamspiers.org --- pathspec.c | 20 ++-- pathspec.h | 1 + 2 files

Re: [PATCH v3 16/19] pathspec.c: move reusable code from builtin/add.c

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:48 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: diff --git a/pathspec.c b/pathspec.c new file mode 100644 index 000..8aea0d2 --- /dev/null +++ b/pathspec.c @@ -0,0 +1,99 @@ +#include cache.h +#include dir.h +#include

Re: [PATCH v3 16/19] pathspec.c: move reusable code from builtin/add.c

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:45 PM, Adam Spiers g...@adamspiers.org wrote: On Fri, Dec 28, 2012 at 8:32 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: diff --git a/pathspec.h b/pathspec.h new file mode 100644 index 000..8bb670b --- /dev/null +++ b

Re: [PATCH v3 18/19] setup.c: document get_pathspec()

2012-12-28 Thread Adam Spiers
On Fri, Dec 28, 2012 at 8:40 PM, Adam Spiers g...@adamspiers.org wrote: On Fri, Dec 28, 2012 at 8:36 PM, Junio C Hamano gits...@pobox.com wrote: Adam Spiers g...@adamspiers.org writes: Since we have just created a new pathspec-handling library, now is a good time to add some comments

  1   2   >