Skip to content

clone: simplify progress message

Pete Harlan git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 6 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2clone: have progress report mention top level dir, not git dirbuiltin/clone.c+1 -10 replies
2/2clone: add bare clone to the progress messagebuiltin/clone.c+2 -10 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchPete Harlan
SeriesInspired-by
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] clone: simplify progress message
Quoted 6 lines · Jeff King
Quoted 3 lines · Pete Harlan

"git clone foo bar" currently reports "Cloning into /path/to/bar/.git". Change this message to "Cloning into bar" to more closely match the user's expectation.

Quoted 7 lines

I am a little torn on this. For most users, it is just another implementation detail that makes git's output more confusing. And it is likely to be the very first git message seen by many people. But at the same time, it is telling you where the repository actually is, which is something that can help users learn about how git works.

I guess it comes down to how much detail we want to show.

For me it isn't only a matter of detail; I find "Cloning into bar/.git" misleading, since bar is getting more than a .git directory.

Quoted 12 lines
Quoted 8 lines

For a --bare clone the current message prints the top level dir (because that is the git dir), so one could argue in favor of the current message because it confirms for the user whether their checkout was bare or not. But that's only if the user is aware of how it would appear in both cases; I doubt that the existing code intended to make that distinction clear, and in practice I expect most users
(a) trust git to do what they asked and (b) wouldn't notice that "Cloning into /path/to/bar" meant that it was a bare checkout.

I do think there is some value to this distinction. But we can make it a lot less ugly for new users with:

Quoted 7 lines
  $ git clone /tmp/foo
  Cloning into /tmp/foo...
  $ git clone --bare /tmp/foo
  Cloning into bare repository /tmp/foo...

or something like that.

Thank you for looking at this. I agree with you, and have added a second patch that implements that.

These two changes modify a progress message introduced a few weeks ago in 28ba96ab2. Unless there's a particular reason to report the .git dir instead of the top level dir, seeing the top level dir feels more natural to me.

For a --bare clone the current message prints the top level dir (because that is the git dir), so one could argue in favor of the current message because it confirms for the user whether their checkout was bare or not. The second patch modifies the message per Jeff King's suggestion, to say "Cloning to bare repository bar..." to convey that information more directly.

Pete Harlan (2):
clone: have progress report mention top level dir, not git dir
clone: add bare clone to the progress message

 builtin/clone.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)