David Turner writes:
> On Mon, 2015-08-10 at 16:53 -0400, Michael Rappazzo wrote:
>> +while ((d = readdir(dir)) != NULL) {
>
> I think it would be useful to break this loop out into a
> for_each_worktree function.
Very good point.
--
To unsubscribe from this list: send the li
Mike Rappazzo writes:
>>> + int is_bare = is_bare_repository();
>>
>> Please do not introduce decl-after-stmt.
>
> Since I reused this value below, I thought it would be acceptable.
Use of a new variable is fine. "Do not declare one in a block after
you already wrote statement" is what "dec
On Mon, Aug 10, 2015 at 10:55 PM, David Turner wrote:
> On Mon, 2015-08-10 at 16:53 -0400, Michael Rappazzo wrote:
>> + while ((d = readdir(dir)) != NULL) {
>
> I think it would be useful to break this loop out into a
> for_each_worktree function.
>
> While looking into per-wor
On Mon, Aug 10, 2015 at 6:10 PM, Junio C Hamano wrote:
> Michael Rappazzo writes:
>
>> +static int list(int ac, const char **av, const char *prefix)
>> +{
>> + int main_only = 0;
>> + struct option options[] = {
>> + OPT_BOOL(0, "main-only", &main_only, N_("only list the main
On Mon, 2015-08-10 at 16:53 -0400, Michael Rappazzo wrote:
> + while ((d = readdir(dir)) != NULL) {
I think it would be useful to break this loop out into a
for_each_worktree function.
While looking into per-worktree ref stuff, I have just noticed that git
prune will delete ob
Michael Rappazzo writes:
> +static int list(int ac, const char **av, const char *prefix)
> +{
> + int main_only = 0;
> + struct option options[] = {
> + OPT_BOOL(0, "main-only", &main_only, N_("only list the main
> worktree")),
> + OPT_END()
> + };
Hmm, main-
'git worktree list' will list the main worktree followed by any linked
worktrees which were created using 'git worktree add'.
Signed-off-by: Michael Rappazzo
---
Documentation/git-worktree.txt | 6 +++-
builtin/worktree.c | 67 ++
t/t2027-work
Differences from
[v2](http://www.mail-archive.com/git@vger.kernel.org/msg75467.html)
- removed unintended whitespace changes
- cleanup based on comments from v2
Michael Rappazzo (1):
worktree: add 'list' command
Documentation/git-worktree.txt | 6 +++-
builtin/worktree.c |
8 matches
Mail list logo