On Thu, Jun 1, 2017 at 8:59 PM, Ævar Arnfjörð Bjarmason
<[email protected]> wrote:
>
> On Thu, Jun 1, 2017 at 8:35 PM, Sahil Dua <[email protected]> wrote:
> > Adds copy branch option available using -c or -C (forcefully).
>
> Commenting on the series in general. I have a fixup branch for you
> with commits to squash:
> https://github.com/avar/git/tree/avar/sahildua-rename-branch-2 issues:
>
> - There's a mixed variable declaration with code, should be predeclared.
> - Stuff like printf(_("% branch), "copied") gives bad translations,
> needs to be expanded
> - Fixed up comment style
>
Thanks for fixing the issues.
> In addition when I try to run the tests I get:
>
> fatal: cannot lock ref 'refs/heads/a': 'refs/heads/a/b/c' exists;
> cannot create 'refs/heads/a'
> not ok 45 - git branch -c a a/a should fail
>
> And there's 18 other failures in that test script, although some could
> be from that first failure, doesn't this fail for you? I can't see why
> it wouldn't everywhere, i.e. you're trying to create a "a" ref when
> "a/b/c" exists.
Indeed I see 3 of the tests failing. The issue is the existing
branches. I have the fix for them by changing the branch name. I will
push it and send another patch along with the above changes.
However, I am having problems in getting one test pass - "git branch
-C c1 c2 should add entries to .git/logs/HEAD". I'm trying to figure
it out.
"Branch copied" log is being added to .git/logs/HEAD. However, it
doesn't work in a similar way as -M option. Hence, it's not being
returned when we grep by ^0\{40\}.*$msg$.