Package: git
Version: 1:2.7.0~rc3+next.20151228-1
Severity: wishlist
Tags: upstream

Dear Maintainer,

Suppose 'git cherry-pick first second third' encounters a conflict at
'second' and drops me to a shell to resolve that conflict.  At this point,
I'd like to ask git what the values of 'first' and 'third' are.  I do see
'third' recorded in .git/sequencer/todo, but 'first' doesn't seem to be
recorded anywhere.  Could the value of 'first' be made available?

In general, when cherry-pick encounters a conflict, I'd like to enumerate
_all_ cherries that were specified in argv: the past ones (already applied),
the current one (CHERRY_PICK_HEAD), and the future ones (those in the
.git/sequencer/todo file).  In comparison, with 'rebase -i' enumerating the
'past' commits is possible through the .git/rebase-merge/done file.

As with the other ticket I'm submitting, if this were available, I'd use
this in zsh's vcs_info.

Concrete example:

% r=$(mktemp -d)
% git init $r
% cd $r
%
% echo foo > foo
% git add foo
% git commit -m 'base'
%
% git checkout -b f1 master
% echo first >> bar
% git add bar
% git commit -am 'first'
%
% git checkout -b f2 master
% echo second >> foo
% git commit -am 'second'
%
% git checkout -b f3 master
% echo third >> baz
% git add baz
% git commit -am 'third'
%
% git checkout master
% echo master >> foo
% git commit -am 'mine'
%
% git cherry-pick f1 f2 f3

The cherry-pick at the end will conflict and drop you to a shell, and at
that point I'd like to ask git "What were the preceding commits in this
cherry-pick run?" and get (the hash of) f1 as an answer.  If it had been
f3 that conflicted, the answer would have been (the hashes of) f1
and f2.

Cheers,

Daniel


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.3.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages git depends on:
ii  git-man                           1:2.7.0~rc3+next.20151228-1
ii  libc6                             2.21-6
ii  libcurl3-gnutls                   7.46.0-1
ii  liberror-perl                     0.17-1.2
ii  libexpat1                         2.1.0-7
ii  libpcre3                          2:8.38-1
ii  perl-modules-5.22 [perl-modules]  5.22.1-3
ii  zlib1g                            1:1.2.8.dfsg-2+b1

Versions of packages git recommends:
ii  less                         458-3+b1
ii  openssh-client [ssh-client]  1:7.1p1-5
ii  patch                        2.7.5-1
ii  rsync                        3.1.1-3

Versions of packages git suggests:
ii  gettext-base                          0.19.7-1
pn  git-arch                              <none>
pn  git-cvs                               <none>
pn  git-daemon-run | git-daemon-sysvinit  <none>
pn  git-doc                               <none>
pn  git-el                                <none>
pn  git-email                             <none>
pn  git-gui                               <none>
pn  git-mediawiki                         <none>
pn  git-svn                               <none>
pn  gitk                                  <none>
pn  gitweb                                <none>

-- debconf-show failed

Reply via email to