Re: [RFC/PATCH] Make git-{pull,rebase} no-tracking message friendlier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Carlos Martín Nieto <cmn@xxxxxxxx> writes:

> $example is a caller-given string which already contains the whole
> command (i.e. it's already 'git rebase <upstream branch>' or 'git pull
> <repository> <branch>').

OK, I didn't remember the exact message.

> In this patch I've moved that command to its own paragraph so the
> usage part of the output gets more visibility.

I prefer this, yes.

Perhaps we could go further and try to guess a remote and a branch name
to give in the example. "git push" already does that to some extend:

  $ git -c push.default=tracking push
  fatal: The current branch my-branch has no upstream branch.
  To push the current branch and set the remote as upstream, use
  
      git push --set-upstream origin my-branch

i.e. if there's a remote configured, then using it in the example makes
sense. I'm not sure if using the current branch name in the example
would also be a good thing (it usually is for "push" because most users
would push to a branch with the same name on the remote end).

It may also make sense not to suggest "git remote add" if there's
already a remote configured. Otherwise, the case, which is probably the
most common, of:

  git clone http://example.com/repo
  cd repo
  git checkout -b new-branch
  git pull

is made far more complex than it should for the newcommer.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]