Re: [PATCH v3 16/19] pathspec.c: move reusable code from builtin/add.c
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 28, 2012, 20:48 UTC
- Message-ID
- <7vy5ghhpi0.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1356575558-2674-17-git-send-email-git@adamspiers.org>
Adam Spiers <git@adamspiers.org> writes:
Show 12 quoted lines
> diff --git a/pathspec.c b/pathspec.c
> new file mode 100644
> index 0000000..8aea0d2
> --- /dev/null
> +++ b/pathspec.c
> @@ -0,0 +1,99 @@
> +#include "cache.h"
> +#include "dir.h"
> +#include "pathspec.h"
> +
> +void fill_pathspec_matches(const char **pathspec, char *seen, int specs)
> +{It did not matter while it was an implementation detail of "git add", but as a public function, something needs to clarify that this "fill"s matches *against the index*, not against a tree or the files in the current directory. The same comment applies to all the internal functions this patch exposes to the outside world.