Comment 1 for bug 1799482

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 1799482] [NEW] `brz add` in git format doesn't report files added

On Tue, Oct 23, 2018 at 02:35:38PM -0000, Brian de Alwis wrote:
> Public bug reported:
>
> Version: brz at HEAD (`brz version` = `3.0a1`)
>
> Steps to repeat:
> ```
> $ brz init --format git foo
> $ cd foo
> $ mkdir a b
> $ echo a > a/file.txt
> $ echo b > b/file.txt
> $ brz add a b
> adding a
> adding b
> adding b
> adding b
> ```
>
> I expected to see:
> ```
> $ brz add a b
> adding a
> adding b
> adding a/file.txt
> adding b/file.txt
> ```
>
> It looks like the culprit is `breezy/git/workingtree.py(504)smart_add()` where it should be using `call_action(subp, kind)`
> ```
> -> call_action(filepath, kind)
> (Pdb) l
> 499 if subpath in index:
> 500 # Already present
> 501 continue
> 502 if subp in conflicts_related:
> 503 continue
> 504 -> call_action(filepath, kind)
> 505 if save:
> 506 self._index_add_entry(subp, kind)
> 507 added.append(subp)
> 508 return added, ignored
> 509
> ```
Thanks for the report and suggested fix. Can you create a merge
proposal? With tests would be great, but without is fine too.

Cheers,

Jelmer