Re: splitting off shell test framework

2017-08-23 Thread Adam Spiers
On 23 August 2017 at 16:47, Jeff King 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 >> [...] >> >> but sa

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 wrote: > On Mon, Nov 12, 2012 at 6:18 PM, Drew Northup wrote: >> On Mon, Nov 12, 2012 at 11:37 AM, Adam Spiers wrote: >>> As it turned out to be fairly easy,

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 wrote: > Adam Spiers writes: > > > Therefore there is a risk that each new UI for higher-level workflows > > will end up re-implementing these mid-level operations. This > > undesirable situation could be avoided if git itsel

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

2017-07-31 Thread Adam Spiers
All feedback is of 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
te 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 --- .gitignore | 1 +- Documentation/git-

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 com

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 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

[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 month

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 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 buil

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 th

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 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 bui

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 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 ch

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

Re: questions / suggestions about history simplification

2013-12-19 Thread Adam Spiers
On Thu, Dec 19, 2013 at 12:20:52PM -0800, Junio C Hamano wrote: > Adam Spiers writes: > > > 2. What difference does --dense ever make? > > It is set by default, and --sparse is its opposite option, i.e. it > turns revs->dense off. Ah. It appears to be missing from th

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 referrin

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, t

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;

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 there

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 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 > >> &

Re: Subtree: My Status

2013-12-12 Thread Adam Spiers
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 help reviewing and approving > > patches. > > If anyone thinks a patch looks good, let Junio know. It's my

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 > "(che

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? Th

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 CLI

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 th

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 fro

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 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 &g

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

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

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 writes: > > > static struct notes_tree *init_notes_check(const char *subcommand) > > ... > > Can we relax this to "refs/", to allow better isolation of namespaces > &g

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-rno

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. > &

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 mention

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 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 tryin

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 wrote: > >> > The introduction of argc also makes it possible to invoke > >> > check_ignore() with arguments which are not self-consistent. > >> >

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 wrote: > >> -static int check_ignore(const char *prefix, const char **pathspec) > >> +static int check_ignore(int argc, const char **argv, const char *prefix) >

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 reo

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 th

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 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 t

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 u

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

2013-04-11 Thread Adam Spiers
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 --- Documentation/git-check-attr.txt | 5 + Documentation/git-check-ignore.txt | 5 + Docume

[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 --- Documentation/git-check-attr.txt | 5 + Documentation/git-check

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

2013-04-11 Thread Adam Spiers
ned-off-by: Adam Spiers --- 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 a/Documentation

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

2013-04-11 Thread Adam Spiers
he existing pathspec API. Signed-off-by: Adam Spiers --- 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 3/5] check-ignore: move setup into cmd_check_ignore()

2013-04-11 Thread Adam Spiers
: Adam Spiers --- 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-ignore.c @@ -63,30

[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 --- t/t0008-ignores.sh | 16

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

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, > > +

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 > > d

[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 --- My first attempt at writing a test for check-ignore's new streaming behaviour involved mkfifo, during

[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 --- t/t0008-ignores.sh | 16

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

2013-04-10 Thread Adam Spiers
he existing pathspec API. Signed-off-by: Adam Spiers --- 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
ned-off-by: Adam Spiers --- 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 a/Documentation

[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 --- Documentation/git-check-attr.txt | 5 + Documentation/git-check

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

2013-04-10 Thread Adam Spiers
: Adam Spiers --- 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-ignore.c @@ -53,30

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

2013-04-08 Thread Adam Spiers
ng check-ignore process, and for each of these files, STDOUT will indicate whether that file matched a pattern or not. (Without this option, it would be impossible to tell whether the absence of output for a given file meant that it didn't match any pattern, or that the output hadn't bee

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

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 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 a

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 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 m

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 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'v

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 > Date: Tue, 19 Feb 2013 11:56:44 -0800 > Subject: [PATCH] name-hash: allow hashing an empty string > > Usually we do not p

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 wrote: > Adam Spiers 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 th

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

2013-02-19 Thread Adam Spiers
rs present or future have a similar issue. Signed-off-by: Adam Spiers --- 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 70

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 wrote: > Adam Spiers 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

Re: Proposal: sharing .git/config

2013-02-19 Thread Adam Spiers
On Tue, Feb 19, 2013 at 9:25 AM, Ramkumar Ramachandra 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 also other th

[PATCH 1/2] t0008: document test_expect_success_multi

2013-02-19 Thread Adam Spiers
t0008. Signed-off-by: Adam Spiers --- 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

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

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

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

2013-02-19 Thread Adam Spiers
On Tue, Feb 19, 2013 at 5:24 AM, Zoltan Klinger 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: 1.8.2.rc0.16.g20a599e > >

[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 --- 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/clean.c +++ b/builtin

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

2013-01-16 Thread Adam Spiers
On Wed, Jan 16, 2013 at 2:37 AM, Junio C Hamano wrote: > Adam Spiers writes: > >> On Mon, Jan 14, 2013 at 10:23 PM, Junio C Hamano wrote: >>> * as/check-ignore (2013-01-10) 12 commits >>> (merged to 'next' on 2013-01-14 at 9df2afc) >>> +

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 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 die_if_path_beyo

Re: [PATCH] t0008: avoid brace expansion

2013-01-09 Thread Adam Spiers
On Thu, Jan 10, 2013 at 12:18 AM, Junio C Hamano wrote: > Adam Spiers writes: > >> On Wed, Jan 9, 2013 at 11:49 PM, René Scharfe >> wrote: >>> Brace expansion is not required by POSIX and not supported by dash nor >>> NetBSD's sh. Explicitly list a

Re: [PATCH] t0008: avoid brace expansion

2013-01-09 Thread Adam Spiers
On Wed, Jan 9, 2013 at 11:49 PM, René Scharfe 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 the body of a message to

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] > dif

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 writes: > > > On Fri, Jan 04, 2013 at 01:03:59PM -0800, Junio C Hamano wrote: > >> Adam Spiers writes: > >> > >> > diff --git a/builtin/clean.c b/builtin/clean.c > &g

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 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. Howeve

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

2013-01-06 Thread Adam Spiers
Also add comments documenting these newly public functions, including clarifications that they operate on the index. Signed-off-by: Adam Spiers --- 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-grained c

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

2013-01-06 Thread Adam Spiers
pec() -> find_pathspecs_matching_against_index() Signed-off-by: Adam Spiers --- 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/add.c

[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 --- Unlike v3, this series doesn't

[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 --- Unlike v3, this series doesn't make validate_pathspec() public. builtin/add.c | 10 ++ pathspec.c| 12 pathspec.h| 1 + 3 files change

[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 --- Several minor improvements since v3: - rename char *dir to slash - fix some

[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 --- The deprecation warning is new since v3. setup.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/setup.c b

[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 --- 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/builtin/add.c

[PATCH v4 01/11] dir.c: use a single struct exclude_list per source of excludes

2013-01-06 Thread Adam Spiers
e filebuf member from struct exclude_stack to struct exclude_list, it allows us to track and subsequently free memory buffers allocated during the parsing of all exclude files, rather than only tracking buffers allocated for files in the EXC_DIRS group. Signed-off-by: Adam Spiers --- Docu

[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 --- 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/clean.c b/builtin

[PATCH v4 03/11] dir.c: provide clear_directory() for reclaiming dir_struct memory

2013-01-06 Thread Adam Spiers
By the end of a directory traversal, a dir_struct instance will typically contains pointers to various data structures on the heap. clear_directory() provides a convenient way to reclaim that memory. Signed-off-by: Adam Spiers --- Documentation/technical/api-directory-listing.txt | 2 ++ dir.c

[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 --- dir.c | 38 ++ dir.h | 6 ++ 2 files changed, 32 insertions(+), 12

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

2013-01-06 Thread Adam Spiers
---" divider 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

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 writes: > > On Thu, Jan 3, 2013 at 7:17 PM, Junio C Hamano wrote: > >> * as/check-ignore (2012-12-28) 19 commits > >> - Add git-check-ignore sub-command > >> - setup.c: docume

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

2013-01-06 Thread Adam Spiers
ables based on their contents not on their type. Signed-off-by: Adam Spiers --- 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-al

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 writes: > > Adam Spiers writes: > > > >> diff --git a/builtin/clean.c b/builtin/clean.c > >> index 0c7b3d0..bd18b88 100644 > >> --- a/builtin/clean.c > >> +++ b/bu

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 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_clea

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 wrote: > > Adam Spiers writes: > >> diff --git a/dir.c b/dir.c > >> index ee8e711..89e27a6 100644 > >> --- a/dir.c > >> +++ b/dir.c > &g

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 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 > - add.c: re

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 wrote: > Adam Spiers writes: > >> diff --git a/Documentation/technical/api-directory-listing.txt >> b/Documentation/technical/api-directory-listing.txt >> index 0356d25..944fc39 100644 >> --- a/Documentation/techn

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 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 the way, Junio,

Re: Hold your fire, please

2012-12-29 Thread Adam Spiers
On Fri, Dec 28, 2012 at 11:52 PM, Junio C Hamano wrote: > Junio C Hamano 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 (rather than >> distracting

Re: [PATCH v3 19/19] Add git-check-ignore sub-command

2012-12-28 Thread Adam Spiers
On Sat, Dec 29, 2012 at 01:23:52AM +, Adam Spiers wrote: > FYI, attached is the diff between check-ignore-v3 and my current > check-ignore, which is available at github: > > https://github.com/aspiers/git/commits/check-ignore [snipped] > diff --git a/pathspec.c b/pat

  1   2   3   >