unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
@ 2011-05-29 20:17 Steinar Bang
  2011-05-31  5:25 ` Dan Nicolaescu
  2014-07-30 20:35 ` bug#8756: " Dmitry Dzhus
  0 siblings, 2 replies; 20+ messages in thread
From: Steinar Bang @ 2011-05-29 20:17 UTC (permalink / raw)
  To: 8756

When pressing `C-x v l' in a git versioned file with a long history,
that had just been moved, I got just the single commit resulting from
the move.

If the vc-git-print-log command adds the "--follow" argument, the log
printed by `C-x v l' is the full history of that file.

Here's the documentation of --follow from the git-log man page:
       --follow
           Continue listing the history of a file beyond renames (works only for a single file).



In GNU Emacs 23.3.1 (i486-pc-linux-gnu, GTK+ Version 2.24.3)
 of 2011-04-10 on raven, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10905000
configured using `configure  '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.3/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.3/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Dired by name

Minor modes in effect:
  shell-dirtrack-mode: t
  display-time-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-s p r i n t - l o g C-s <return> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <down-mouse-5> <mouse-5> <double-down-mouse-5> 
<double-mouse-5> <triple-down-mouse-5> <triple-mouse-5> 
<triple-down-mouse-5> <triple-mouse-5> <triple-down-mouse-5> 
<triple-mouse-5> <triple-down-mouse-5> <triple-mouse-5> 
<down-mouse-4> <mouse-4> <double-down-mouse-4> <double-mouse-4> 
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4> 
<triple-mouse-4> <triple-down-mouse-4> <triple-mouse-4> 
<triple-down-mouse-4> <triple-mouse-4> <down-mouse-4> 
<mouse-4> <down-mouse-5> <mouse-5> <double-down-mouse-5> 
<double-mouse-5> <triple-down-mouse-5> <triple-mouse-5> 
<triple-down-mouse-5> <triple-mouse-5> <help-echo> 
<help-echo> C-x C-f ~ / a o <tab> <backspace> p <tab> 
<return> <down> <down> <down> <return> <down> <up> 
<return> <return> <up> <up> <up> <up> <right> <right> 
C-SPC C-e <C-left> <right> <right> <right> <right> 
<right> <left> M-w q q q q C-x C-w C-y <return> C-x 
d <return> g <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <up> ! g u n z i 
p <return> g <return> C-s v c - p r i n t - l o g <return> 
C-s p r i n t - l o g C-s C-s <return> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<up> <up> <right> " - - f o l l o w " SPC C-x C-s C-x 
d <return> B y <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <switch-frame> 
C-x 0 C-x b <up> <up> <up> <up> <up> <up> <up> <down> 
<up> <up> C-k * G r <tab> <return> g <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <down> <return> <return> n q <up> <up> 
<up> SPC <down> <down> <down> SPC SPC <up> <up> <up> 
<down> SPC SPC <up> <up> SPC SPC <down> <down> <down> 
<down> SPC SPC s <switch-frame> <help-echo> <help-echo> 
<help-echo> <help-echo> M-x r e p o <tab> r <tab> 
<return>

Recent messages:
gnus-sync: stored variables (gnus-newsrc-last-checked-date) and 128 groups in /ssh:sb@hjemme.bang.priv.no:News/gnussync
Tramp: Encoding region using function `(lambda (beg end) (let ((coding-system-for-write (quote binary)) (coding-system-for-read (quote binary))) (apply (quote call-process-region) beg end (car (split-string gzip)) t t nil (cdr (split-string gzip)))) (base64-encode-region (point-min) (point-max)))'...done
Tramp: Decoding region into remote file /ssh:sb@hjemme.bang.priv.no:/home/sb/News/gnussync...done
Saving file /home/sb/.newsrc...
Wrote /home/sb/.newsrc
Saving /home/sb/.newsrc.eld...
Saving file /home/sb/.newsrc.eld...
Wrote /home/sb/.newsrc.eld
Saving /home/sb/.newsrc.eld...done
Making completion list...

Load-path shadows:
/home/sb/git/gnus/lisp/sasl hides /usr/share/emacs23/site-lisp/flim/sasl
/home/sb/git/gnus/lisp/sasl-ntlm hides /usr/share/emacs23/site-lisp/flim/sasl-ntlm
/home/sb/git/gnus/lisp/hmac-def hides /usr/share/emacs23/site-lisp/flim/hmac-def
/home/sb/git/gnus/lisp/sasl-digest hides /usr/share/emacs23/site-lisp/flim/sasl-digest
/home/sb/git/gnus/lisp/hmac-md5 hides /usr/share/emacs23/site-lisp/flim/hmac-md5
/home/sb/git/gnus/lisp/ntlm hides /usr/share/emacs23/site-lisp/flim/ntlm
/home/sb/git/gnus/lisp/md4 hides /usr/share/emacs23/site-lisp/flim/md4
/home/sb/git/gnus/lisp/sha1 hides /usr/share/emacs23/site-lisp/flim/sha1
/home/sb/git/gnus/lisp/hex-util hides /usr/share/emacs23/site-lisp/flim/hex-util
/home/sb/git/gnus/lisp/sasl-cram hides /usr/share/emacs23/site-lisp/flim/sasl-cram
/usr/share/emacs23/site-lisp/psgml/psgml-info hides /usr/share/emacs/site-lisp/psgml/psgml-info
/usr/share/emacs23/site-lisp/psgml/psgml-dtd hides /usr/share/emacs/site-lisp/psgml/psgml-dtd
/usr/share/emacs23/site-lisp/psgml/psgml-init hides /usr/share/emacs/site-lisp/psgml/psgml-init
/usr/share/emacs23/site-lisp/psgml/psgml-html hides /usr/share/emacs/site-lisp/psgml/psgml-html
/usr/share/emacs23/site-lisp/psgml/psgml-api hides /usr/share/emacs/site-lisp/psgml/psgml-api
/usr/share/emacs23/site-lisp/psgml/psgml-charent hides /usr/share/emacs/site-lisp/psgml/psgml-charent
/usr/share/emacs23/site-lisp/psgml/psgml-edit hides /usr/share/emacs/site-lisp/psgml/psgml-edit
/usr/share/emacs23/site-lisp/psgml/psgml-ids hides /usr/share/emacs/site-lisp/psgml/psgml-ids
/usr/share/emacs23/site-lisp/psgml/psgml-parse hides /usr/share/emacs/site-lisp/psgml/psgml-parse
/usr/share/emacs23/site-lisp/psgml/psgml-sysdep hides /usr/share/emacs/site-lisp/psgml/psgml-sysdep
/usr/share/emacs23/site-lisp/psgml/psgml-other hides /usr/share/emacs/site-lisp/psgml/psgml-other
/usr/share/emacs23/site-lisp/psgml/psgml hides /usr/share/emacs/site-lisp/psgml/psgml
/usr/share/emacs/23.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/home/sb/git/gnus/lisp/pgg-parse hides /usr/share/emacs/23.3/lisp/pgg-parse
/home/sb/git/gnus/lisp/pgg-pgp hides /usr/share/emacs/23.3/lisp/pgg-pgp
/home/sb/apps/share/emacs/site-lisp/vc-git hides /usr/share/emacs/23.3/lisp/vc-git
/home/sb/git/gnus/lisp/pgg hides /usr/share/emacs/23.3/lisp/pgg
/home/sb/git/gnus/lisp/md4 hides /usr/share/emacs/23.3/lisp/md4
/home/sb/git/gnus/lisp/hex-util hides /usr/share/emacs/23.3/lisp/hex-util
/home/sb/git/gnus/lisp/pgg-gpg hides /usr/share/emacs/23.3/lisp/pgg-gpg
/home/sb/git/gnus/lisp/pgg-pgp5 hides /usr/share/emacs/23.3/lisp/pgg-pgp5
/home/sb/git/gnus/lisp/format-spec hides /usr/share/emacs/23.3/lisp/format-spec
/home/sb/git/gnus/lisp/sha1 hides /usr/share/emacs/23.3/lisp/sha1
/home/sb/git/gnus/lisp/password-cache hides /usr/share/emacs/23.3/lisp/password-cache
/home/sb/git/gnus/lisp/pgg-def hides /usr/share/emacs/23.3/lisp/pgg-def
/home/sb/git/gnus/lisp/dns-mode hides /usr/share/emacs/23.3/lisp/textmodes/dns-mode
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.3/lisp/textmodes/ispell
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.3/lisp/textmodes/flyspell
/home/sb/git/org-mode/lisp/org-faces hides /usr/share/emacs/23.3/lisp/org/org-faces
/home/sb/git/org-mode/lisp/org-icalendar hides /usr/share/emacs/23.3/lisp/org/org-icalendar
/home/sb/git/org-mode/lisp/org-gnus hides /usr/share/emacs/23.3/lisp/org/org-gnus
/home/sb/git/org-mode/lisp/org-exp hides /usr/share/emacs/23.3/lisp/org/org-exp
/home/sb/git/org-mode/lisp/org-feed hides /usr/share/emacs/23.3/lisp/org/org-feed
/home/sb/git/org-mode/lisp/org-publish hides /usr/share/emacs/23.3/lisp/org/org-publish
/home/sb/git/org-mode/lisp/org-src hides /usr/share/emacs/23.3/lisp/org/org-src
/home/sb/git/org-mode/lisp/org-mac-message hides /usr/share/emacs/23.3/lisp/org/org-mac-message
/home/sb/git/org-mode/lisp/org-rmail hides /usr/share/emacs/23.3/lisp/org/org-rmail
/home/sb/git/org-mode/lisp/org-exp-blocks hides /usr/share/emacs/23.3/lisp/org/org-exp-blocks
/home/sb/git/org-mode/lisp/org-info hides /usr/share/emacs/23.3/lisp/org/org-info
/home/sb/git/org-mode/lisp/org-mouse hides /usr/share/emacs/23.3/lisp/org/org-mouse
/home/sb/git/org-mode/lisp/org-timer hides /usr/share/emacs/23.3/lisp/org/org-timer
/home/sb/git/org-mode/lisp/org-archive hides /usr/share/emacs/23.3/lisp/org/org-archive
/home/sb/git/org-mode/lisp/org-bibtex hides /usr/share/emacs/23.3/lisp/org/org-bibtex
/home/sb/git/org-mode/lisp/org-attach hides /usr/share/emacs/23.3/lisp/org/org-attach
/home/sb/git/org-mode/lisp/org-jsinfo hides /usr/share/emacs/23.3/lisp/org/org-jsinfo
/home/sb/git/org-mode/lisp/org-xoxo hides /usr/share/emacs/23.3/lisp/org/org-xoxo
/home/sb/git/org-mode/lisp/org-compat hides /usr/share/emacs/23.3/lisp/org/org-compat
/home/sb/git/org-mode/lisp/org-mobile hides /usr/share/emacs/23.3/lisp/org/org-mobile
/home/sb/git/org-mode/lisp/org-id hides /usr/share/emacs/23.3/lisp/org/org-id
/home/sb/git/org-mode/lisp/org-macs hides /usr/share/emacs/23.3/lisp/org/org-macs
/home/sb/git/org-mode/lisp/org-plot hides /usr/share/emacs/23.3/lisp/org/org-plot
/home/sb/git/org-mode/lisp/org-protocol hides /usr/share/emacs/23.3/lisp/org/org-protocol
/home/sb/git/org-mode/lisp/org-colview hides /usr/share/emacs/23.3/lisp/org/org-colview
/home/sb/git/org-mode/lisp/org-indent hides /usr/share/emacs/23.3/lisp/org/org-indent
/home/sb/git/org-mode/lisp/org-latex hides /usr/share/emacs/23.3/lisp/org/org-latex
/home/sb/git/org-mode/lisp/org-habit hides /usr/share/emacs/23.3/lisp/org/org-habit
/home/sb/git/org-mode/lisp/org-mhe hides /usr/share/emacs/23.3/lisp/org/org-mhe
/home/sb/git/org-mode/lisp/org-w3m hides /usr/share/emacs/23.3/lisp/org/org-w3m
/home/sb/git/org-mode/lisp/org-remember hides /usr/share/emacs/23.3/lisp/org/org-remember
/home/sb/git/org-mode/lisp/org-freemind hides /usr/share/emacs/23.3/lisp/org/org-freemind
/home/sb/git/org-mode/lisp/org-crypt hides /usr/share/emacs/23.3/lisp/org/org-crypt
/home/sb/git/org-mode/lisp/org-table hides /usr/share/emacs/23.3/lisp/org/org-table
/home/sb/git/org-mode/lisp/org hides /usr/share/emacs/23.3/lisp/org/org
/home/sb/git/org-mode/lisp/org-ascii hides /usr/share/emacs/23.3/lisp/org/org-ascii
/home/sb/git/org-mode/lisp/org-wl hides /usr/share/emacs/23.3/lisp/org/org-wl
/home/sb/git/org-mode/lisp/org-install hides /usr/share/emacs/23.3/lisp/org/org-install
/home/sb/git/org-mode/lisp/org-mew hides /usr/share/emacs/23.3/lisp/org/org-mew
/home/sb/git/org-mode/lisp/org-list hides /usr/share/emacs/23.3/lisp/org/org-list
/home/sb/git/org-mode/lisp/org-irc hides /usr/share/emacs/23.3/lisp/org/org-irc
/home/sb/git/org-mode/lisp/org-docbook hides /usr/share/emacs/23.3/lisp/org/org-docbook
/home/sb/git/org-mode/lisp/org-footnote hides /usr/share/emacs/23.3/lisp/org/org-footnote
/home/sb/git/org-mode/lisp/org-bbdb hides /usr/share/emacs/23.3/lisp/org/org-bbdb
/home/sb/git/org-mode/lisp/org-vm hides /usr/share/emacs/23.3/lisp/org/org-vm
/home/sb/git/org-mode/lisp/org-agenda hides /usr/share/emacs/23.3/lisp/org/org-agenda
/home/sb/git/org-mode/lisp/org-clock hides /usr/share/emacs/23.3/lisp/org/org-clock
/home/sb/git/org-mode/lisp/org-html hides /usr/share/emacs/23.3/lisp/org/org-html
/home/sb/git/org-mode/lisp/org-datetree hides /usr/share/emacs/23.3/lisp/org/org-datetree
/home/sb/git/org-mode/lisp/org-inlinetask hides /usr/share/emacs/23.3/lisp/org/org-inlinetask
/home/sb/git/gnus/lisp/dns hides /usr/share/emacs/23.3/lisp/net/dns
/home/sb/git/gnus/lisp/sasl-ntlm hides /usr/share/emacs/23.3/lisp/net/sasl-ntlm
/home/sb/git/gnus/lisp/sasl hides /usr/share/emacs/23.3/lisp/net/sasl
/home/sb/git/gnus/lisp/sasl-digest hides /usr/share/emacs/23.3/lisp/net/sasl-digest
/home/sb/git/gnus/lisp/hmac-def hides /usr/share/emacs/23.3/lisp/net/hmac-def
/home/sb/git/gnus/lisp/dig hides /usr/share/emacs/23.3/lisp/net/dig
/home/sb/git/gnus/lisp/hmac-md5 hides /usr/share/emacs/23.3/lisp/net/hmac-md5
/home/sb/git/gnus/lisp/imap hides /usr/share/emacs/23.3/lisp/net/imap
/home/sb/git/gnus/lisp/ntlm hides /usr/share/emacs/23.3/lisp/net/ntlm
/home/sb/git/gnus/lisp/tls hides /usr/share/emacs/23.3/lisp/net/tls
/home/sb/git/gnus/lisp/sasl-cram hides /usr/share/emacs/23.3/lisp/net/sasl-cram
/home/sb/git/gnus/lisp/netrc hides /usr/share/emacs/23.3/lisp/net/netrc
/home/sb/git/gnus/lisp/hashcash hides /usr/share/emacs/23.3/lisp/mail/hashcash
/home/sb/git/gnus/lisp/uudecode hides /usr/share/emacs/23.3/lisp/mail/uudecode
/home/sb/git/gnus/lisp/binhex hides /usr/share/emacs/23.3/lisp/mail/binhex
/home/sb/git/gnus/lisp/nndraft hides /usr/share/emacs/23.3/lisp/gnus/nndraft
/home/sb/git/gnus/lisp/gnus-srvr hides /usr/share/emacs/23.3/lisp/gnus/gnus-srvr
/home/sb/git/gnus/lisp/nntp hides /usr/share/emacs/23.3/lisp/gnus/nntp
/home/sb/git/gnus/lisp/flow-fill hides /usr/share/emacs/23.3/lisp/gnus/flow-fill
/home/sb/git/gnus/lisp/nndiary hides /usr/share/emacs/23.3/lisp/gnus/nndiary
/home/sb/git/gnus/lisp/gnus-delay hides /usr/share/emacs/23.3/lisp/gnus/gnus-delay
/home/sb/git/gnus/lisp/mail-prsvr hides /usr/share/emacs/23.3/lisp/gnus/mail-prsvr
/home/sb/git/gnus/lisp/gnus-mh hides /usr/share/emacs/23.3/lisp/gnus/gnus-mh
/home/sb/git/gnus/lisp/gnus-agent hides /usr/share/emacs/23.3/lisp/gnus/gnus-agent
/home/sb/git/gnus/lisp/mail-source hides /usr/share/emacs/23.3/lisp/gnus/mail-source
/home/sb/git/gnus/lisp/gnus-uu hides /usr/share/emacs/23.3/lisp/gnus/gnus-uu
/home/sb/git/gnus/lisp/gnus-int hides /usr/share/emacs/23.3/lisp/gnus/gnus-int
/home/sb/git/gnus/lisp/mml-sec hides /usr/share/emacs/23.3/lisp/gnus/mml-sec
/home/sb/git/gnus/lisp/gnus-cache hides /usr/share/emacs/23.3/lisp/gnus/gnus-cache
/home/sb/git/gnus/lisp/gnus-util hides /usr/share/emacs/23.3/lisp/gnus/gnus-util
/home/sb/git/gnus/lisp/gnus-dired hides /usr/share/emacs/23.3/lisp/gnus/gnus-dired
/home/sb/git/gnus/lisp/gnus-ml hides /usr/share/emacs/23.3/lisp/gnus/gnus-ml
/home/sb/git/gnus/lisp/gnus-demon hides /usr/share/emacs/23.3/lisp/gnus/gnus-demon
/home/sb/git/gnus/lisp/mm-partial hides /usr/share/emacs/23.3/lisp/gnus/mm-partial
/home/sb/git/gnus/lisp/yenc hides /usr/share/emacs/23.3/lisp/gnus/yenc
/home/sb/git/gnus/lisp/gnus-spec hides /usr/share/emacs/23.3/lisp/gnus/gnus-spec
/home/sb/git/gnus/lisp/mm-uu hides /usr/share/emacs/23.3/lisp/gnus/mm-uu
/home/sb/git/gnus/lisp/gnus-sieve hides /usr/share/emacs/23.3/lisp/gnus/gnus-sieve
/home/sb/git/gnus/lisp/gmm-utils hides /usr/share/emacs/23.3/lisp/gnus/gmm-utils
/home/sb/git/gnus/lisp/gnus hides /usr/share/emacs/23.3/lisp/gnus/gnus
/home/sb/git/gnus/lisp/sieve hides /usr/share/emacs/23.3/lisp/gnus/sieve
/home/sb/git/gnus/lisp/nnir hides /usr/share/emacs/23.3/lisp/gnus/nnir
/home/sb/git/gnus/lisp/gnus-undo hides /usr/share/emacs/23.3/lisp/gnus/gnus-undo
/home/sb/git/gnus/lisp/rfc2047 hides /usr/share/emacs/23.3/lisp/gnus/rfc2047
/home/sb/git/gnus/lisp/nnmaildir hides /usr/share/emacs/23.3/lisp/gnus/nnmaildir
/home/sb/git/gnus/lisp/gnus-start hides /usr/share/emacs/23.3/lisp/gnus/gnus-start
/home/sb/git/gnus/lisp/nndoc hides /usr/share/emacs/23.3/lisp/gnus/nndoc
/home/sb/git/gnus/lisp/gnus-registry hides /usr/share/emacs/23.3/lisp/gnus/gnus-registry
/home/sb/git/gnus/lisp/utf7 hides /usr/share/emacs/23.3/lisp/gnus/utf7
/home/sb/git/gnus/lisp/sieve-manage hides /usr/share/emacs/23.3/lisp/gnus/sieve-manage
/home/sb/git/gnus/lisp/nnmairix hides /usr/share/emacs/23.3/lisp/gnus/nnmairix
/home/sb/git/gnus/lisp/mailcap hides /usr/share/emacs/23.3/lisp/gnus/mailcap
/home/sb/git/gnus/lisp/gnus-eform hides /usr/share/emacs/23.3/lisp/gnus/gnus-eform
/home/sb/git/gnus/lisp/sieve-mode hides /usr/share/emacs/23.3/lisp/gnus/sieve-mode
/home/sb/git/gnus/lisp/spam hides /usr/share/emacs/23.3/lisp/gnus/spam
/home/sb/git/gnus/lisp/mm-encode hides /usr/share/emacs/23.3/lisp/gnus/mm-encode
/home/sb/git/gnus/lisp/nnbabyl hides /usr/share/emacs/23.3/lisp/gnus/nnbabyl
/home/sb/git/gnus/lisp/smiley hides /usr/share/emacs/23.3/lisp/gnus/smiley
/home/sb/git/gnus/lisp/qp hides /usr/share/emacs/23.3/lisp/gnus/qp
/home/sb/git/gnus/lisp/compface hides /usr/share/emacs/23.3/lisp/gnus/compface
/home/sb/git/gnus/lisp/mm-bodies hides /usr/share/emacs/23.3/lisp/gnus/mm-bodies
/home/sb/git/gnus/lisp/gnus-logic hides /usr/share/emacs/23.3/lisp/gnus/gnus-logic
/home/sb/git/gnus/lisp/canlock hides /usr/share/emacs/23.3/lisp/gnus/canlock
/home/sb/git/gnus/lisp/nnoo hides /usr/share/emacs/23.3/lisp/gnus/nnoo
/home/sb/git/gnus/lisp/auth-source hides /usr/share/emacs/23.3/lisp/gnus/auth-source
/home/sb/git/gnus/lisp/mm-view hides /usr/share/emacs/23.3/lisp/gnus/mm-view
/home/sb/git/gnus/lisp/mail-parse hides /usr/share/emacs/23.3/lisp/gnus/mail-parse
/home/sb/git/gnus/lisp/nnimap hides /usr/share/emacs/23.3/lisp/gnus/nnimap
/home/sb/git/gnus/lisp/nnfolder hides /usr/share/emacs/23.3/lisp/gnus/nnfolder
/home/sb/git/gnus/lisp/gnus-salt hides /usr/share/emacs/23.3/lisp/gnus/gnus-salt
/home/sb/git/gnus/lisp/nnmbox hides /usr/share/emacs/23.3/lisp/gnus/nnmbox
/home/sb/git/gnus/lisp/nneething hides /usr/share/emacs/23.3/lisp/gnus/nneething
/home/sb/git/gnus/lisp/gnus-dup hides /usr/share/emacs/23.3/lisp/gnus/gnus-dup
/home/sb/git/gnus/lisp/smime hides /usr/share/emacs/23.3/lisp/gnus/smime
/home/sb/git/gnus/lisp/gnus-diary hides /usr/share/emacs/23.3/lisp/gnus/gnus-diary
/home/sb/git/gnus/lisp/gnus-fun hides /usr/share/emacs/23.3/lisp/gnus/gnus-fun
/home/sb/git/gnus/lisp/rfc1843 hides /usr/share/emacs/23.3/lisp/gnus/rfc1843
/home/sb/git/gnus/lisp/gnus-bcklg hides /usr/share/emacs/23.3/lisp/gnus/gnus-bcklg
/home/sb/git/gnus/lisp/score-mode hides /usr/share/emacs/23.3/lisp/gnus/score-mode
/home/sb/git/gnus/lisp/nngateway hides /usr/share/emacs/23.3/lisp/gnus/nngateway
/home/sb/git/gnus/lisp/nnnil hides /usr/share/emacs/23.3/lisp/gnus/nnnil
/home/sb/git/gnus/lisp/starttls hides /usr/share/emacs/23.3/lisp/gnus/starttls
/home/sb/git/gnus/lisp/mm-extern hides /usr/share/emacs/23.3/lisp/gnus/mm-extern
/home/sb/git/gnus/lisp/gnus-cus hides /usr/share/emacs/23.3/lisp/gnus/gnus-cus
/home/sb/git/gnus/lisp/spam-report hides /usr/share/emacs/23.3/lisp/gnus/spam-report
/home/sb/git/gnus/lisp/gnus-art hides /usr/share/emacs/23.3/lisp/gnus/gnus-art
/home/sb/git/gnus/lisp/gnus-range hides /usr/share/emacs/23.3/lisp/gnus/gnus-range
/home/sb/git/gnus/lisp/mml hides /usr/share/emacs/23.3/lisp/gnus/mml
/home/sb/git/gnus/lisp/nnml hides /usr/share/emacs/23.3/lisp/gnus/nnml
/home/sb/git/gnus/lisp/messcompat hides /usr/share/emacs/23.3/lisp/gnus/messcompat
/home/sb/git/gnus/lisp/gnus-mlspl hides /usr/share/emacs/23.3/lisp/gnus/gnus-mlspl
/home/sb/git/gnus/lisp/gnus-draft hides /usr/share/emacs/23.3/lisp/gnus/gnus-draft
/home/sb/git/gnus/lisp/legacy-gnus-agent hides /usr/share/emacs/23.3/lisp/gnus/legacy-gnus-agent
/home/sb/git/gnus/lisp/ietf-drums hides /usr/share/emacs/23.3/lisp/gnus/ietf-drums
/home/sb/git/gnus/lisp/nnspool hides /usr/share/emacs/23.3/lisp/gnus/nnspool
/home/sb/git/gnus/lisp/gnus-picon hides /usr/share/emacs/23.3/lisp/gnus/gnus-picon
/home/sb/git/gnus/lisp/gnus-topic hides /usr/share/emacs/23.3/lisp/gnus/gnus-topic
/home/sb/git/gnus/lisp/mml1991 hides /usr/share/emacs/23.3/lisp/gnus/mml1991
/home/sb/git/gnus/lisp/gnus-win hides /usr/share/emacs/23.3/lisp/gnus/gnus-win
/home/sb/git/gnus/lisp/gnus-sum hides /usr/share/emacs/23.3/lisp/gnus/gnus-sum
/home/sb/git/gnus/lisp/gnus-ems hides /usr/share/emacs/23.3/lisp/gnus/gnus-ems
/home/sb/git/gnus/lisp/nnmh hides /usr/share/emacs/23.3/lisp/gnus/nnmh
/home/sb/git/gnus/lisp/mm-url hides /usr/share/emacs/23.3/lisp/gnus/mm-url
/home/sb/git/gnus/lisp/pop3 hides /usr/share/emacs/23.3/lisp/gnus/pop3
/home/sb/git/gnus/lisp/mml-smime hides /usr/share/emacs/23.3/lisp/gnus/mml-smime
/home/sb/git/gnus/lisp/nnrss hides /usr/share/emacs/23.3/lisp/gnus/nnrss
/home/sb/git/gnus/lisp/gnus-async hides /usr/share/emacs/23.3/lisp/gnus/gnus-async
/home/sb/git/gnus/lisp/nnheader hides /usr/share/emacs/23.3/lisp/gnus/nnheader
/home/sb/git/gnus/lisp/nnagent hides /usr/share/emacs/23.3/lisp/gnus/nnagent
/home/sb/git/gnus/lisp/gnus-kill hides /usr/share/emacs/23.3/lisp/gnus/gnus-kill
/home/sb/git/gnus/lisp/spam-stat hides /usr/share/emacs/23.3/lisp/gnus/spam-stat
/home/sb/git/gnus/lisp/gnus-bookmark hides /usr/share/emacs/23.3/lisp/gnus/gnus-bookmark
/home/sb/git/gnus/lisp/html2text hides /usr/share/emacs/23.3/lisp/gnus/html2text
/home/sb/git/gnus/lisp/rfc2104 hides /usr/share/emacs/23.3/lisp/gnus/rfc2104
/home/sb/git/gnus/lisp/gnus-msg hides /usr/share/emacs/23.3/lisp/gnus/gnus-msg
/home/sb/git/gnus/lisp/nnvirtual hides /usr/share/emacs/23.3/lisp/gnus/nnvirtual
/home/sb/git/gnus/lisp/mml2015 hides /usr/share/emacs/23.3/lisp/gnus/mml2015
/home/sb/git/gnus/lisp/rfc2045 hides /usr/share/emacs/23.3/lisp/gnus/rfc2045
/home/sb/git/gnus/lisp/deuglify hides /usr/share/emacs/23.3/lisp/gnus/deuglify
/home/sb/git/gnus/lisp/gnus-setup hides /usr/share/emacs/23.3/lisp/gnus/gnus-setup
/home/sb/git/gnus/lisp/mm-util hides /usr/share/emacs/23.3/lisp/gnus/mm-util
/home/sb/git/gnus/lisp/nnmail hides /usr/share/emacs/23.3/lisp/gnus/nnmail
/home/sb/git/gnus/lisp/ecomplete hides /usr/share/emacs/23.3/lisp/gnus/ecomplete
/home/sb/git/gnus/lisp/rfc2231 hides /usr/share/emacs/23.3/lisp/gnus/rfc2231
/home/sb/git/gnus/lisp/gnus-score hides /usr/share/emacs/23.3/lisp/gnus/gnus-score
/home/sb/git/gnus/lisp/spam-wash hides /usr/share/emacs/23.3/lisp/gnus/spam-wash
/home/sb/git/gnus/lisp/mm-decode hides /usr/share/emacs/23.3/lisp/gnus/mm-decode
/home/sb/git/gnus/lisp/nndir hides /usr/share/emacs/23.3/lisp/gnus/nndir
/home/sb/git/gnus/lisp/gnus-cite hides /usr/share/emacs/23.3/lisp/gnus/gnus-cite
/home/sb/git/gnus/lisp/nnweb hides /usr/share/emacs/23.3/lisp/gnus/nnweb
/home/sb/git/gnus/lisp/gnus-group hides /usr/share/emacs/23.3/lisp/gnus/gnus-group
/home/sb/git/gnus/lisp/message hides /usr/share/emacs/23.3/lisp/gnus/message
/home/sb/git/gnus/lisp/gnus-vm hides /usr/share/emacs/23.3/lisp/gnus/gnus-vm
/home/sb/git/gnus/lisp/time-date hides /usr/share/emacs/23.3/lisp/calendar/time-date
/home/sb/git/gnus/lisp/parse-time hides /usr/share/emacs/23.3/lisp/calendar/parse-time
/home/sb/apps/share/emacs/site-lisp/icalendar hides /usr/share/emacs/23.3/lisp/calendar/icalendar

Features:
(shadow emacsbug grep vc-dir ewoc compile make-mode perl-mode nnfolder
log-view gnus-fun thingatpt flow-fill gnus-html xml info nxml-uchnm
rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri
rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok vc
face-remap magit magit-key-mode bbdb-gui vc-git org-wl org-w3m org-vm
org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp
org-exp-blocks org-agenda org-info org-gnus org-docview org-bibtex
org-bbdb org org-footnote org-src org-list org-faces org-compat
org-entities org-macs noutline outline dired-aux time-stamp rfc2104
mailalias smtpmail u-appt appt diary-lib diary-loaddefs cal-menu
calendar cal-loaddefs canlock sha1 hex-util two-column help-mode view
multi-isearch newcomment browse-url ruler-mode hl-line hexl eldoc
vc-dispatcher vc-svn mule-util sort gnus-cite ansi-color gnus-async
gnus-bcklg qp gnus-ml spam-gmane dns url-cache url-http url-gw url-auth
url-handlers mm-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-util url-parse url-vars gnus-topic nnml
nndraft nnmh utf-7 nnimap utf7 parse-time tramp-imap tramp-gw tramp-fish
tramp-smb tramp-cache tramp-ftp tramp-cmds tramp shell comint
tramp-compat trampver bbdb-gnus bbdb-snarf mail-extr rot13 disp-table
auth-source eieio assoc netrc proto-stream starttls tls gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-cache gnus-demon nntp
gnus-diary nndiary spam-report spam spam-stat bbdb-com bbdb timezone
gnus-uu yenc gnus-msg gnus-art mm-uu mml2015 epg-config mm-view
mml-smime smime password-cache dig mailcap supercite regi gnus-sync
gnus-load package reporter desktop nnir gnus-sum macroexp gnus-group
gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range
gnus-win gnus gnus-ems nnoo nnheader gnus-util time-date gnus-setup
message sendmail format-spec rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mailabbrev mail-utils gmm-utils mailheader
nxml-psgml-compatibility filladapt time iso-transl psvn byte-opt
warnings bytecomp byte-compile advice help-fns advice-preload derived
edmacro kmacro wid-edit cl cl-19 log-edit ring pcvs-util add-log
diff-mode easy-mmode pp elp ediff-merg ediff-diff ediff-wind ediff-mult
ediff-help ediff-init ediff-util dired regexp-opt easymenu jka-compr
org-install w3m-load psgml-init bbdb-autoloads tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces
cus-face files text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process dbusbind system-font-setting font-render-setting
gtk x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2011-05-29 20:17 bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log Steinar Bang
@ 2011-05-31  5:25 ` Dan Nicolaescu
  2011-11-28 20:21   ` Steinar Bang
  2014-07-30 20:35 ` bug#8756: " Dmitry Dzhus
  1 sibling, 1 reply; 20+ messages in thread
From: Dan Nicolaescu @ 2011-05-31  5:25 UTC (permalink / raw)
  To: Steinar Bang; +Cc: 8756

Steinar Bang <sb@dod.no> writes:

> When pressing `C-x v l' in a git versioned file with a long history,
> that had just been moved, I got just the single commit resulting from
> the move.
>
> If the vc-git-print-log command adds the "--follow" argument, the log
> printed by `C-x v l' is the full history of that file.
>
> Here's the documentation of --follow from the git-log man page:
>        --follow
>            Continue listing the history of a file beyond renames (works only for a single file).

I tried doing that at some point, but the result is not completely
functional, these commands do not work:
 "d" (log-view-diff)
 "f" (log-view-find-revision)  
 "a" (log-view-annotate-revision)

which means that the corresponding vc-git.el functions need updating.
If someone figures out what git commands/sequence of commands are needed
to implement these, then it should not be too hard to implement the
needed changes.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2011-05-31  5:25 ` Dan Nicolaescu
@ 2011-11-28 20:21   ` Steinar Bang
  2011-11-28 21:08     ` Dan Nicolaescu
  0 siblings, 1 reply; 20+ messages in thread
From: Steinar Bang @ 2011-11-28 20:21 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 8756

>>>>> Dan Nicolaescu <dann@gnu.org>:

> I tried doing that at some point, but the result is not completely
> functional, these commands do not work:
>  "d" (log-view-diff)
>  "f" (log-view-find-revision)  
>  "a" (log-view-annotate-revision)

Yes, I discovered the same thing.

> which means that the corresponding vc-git.el functions need updating.
> If someone figures out what git commands/sequence of commands are
> needed to implement these, then it should not be too hard to implement
> the needed changes.

I decided to take a look at it again today.  The first problem I ran
into, was that the emacs 23.1 version of `vc-git-print-log' used
"git rev-list" instead of "git log".  And only "git log" supports
"--follow" to track renames (at least that's what I concluded after
googling for this today.  *Please* correct me, if I'm wrong!).

The difference between "git rev-list --pretty HEAD" and "git log" is
that the rev-list has an extra blank line at the end.

So I did an experiment letting `vc-git-print-log' use "git log" if there
is only one file:
#begin_example
--- a/apps/share/emacs23/site-lisp/vc-git.el
+++ b/apps/share/emacs23/site-lisp/vc-git.el
@@ -459,8 +459,12 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
     (let ((inhibit-read-only t))
       (with-current-buffer
           buffer
-	(vc-git-command buffer 'async files
-			"rev-list" "--pretty" "HEAD" "--")))))
+        (if (= 1 (length flist))
+            ;; If there's only one item, track renames using "git log --follow"
+            (vc-git-command buffer 'async files
+                            "log" "--follow" "--")
+          (vc-git-command buffer 'async files
+                          "rev-list" "--pretty" "HEAD" "--"))))))
 
 (defvar log-view-message-re)
 (defvar log-view-file-re)
#end_example

This had slightly more success than the first attempt:
 - `C-x v l' reports the full history (as in the previous attempt)
 - Now `d', `f', and `a' works for commits newer than the rename
 - After the rename
  - `d' no longer fails with "No next version", but reports no diff,
    where there should have been a diff
    #begin_example
     No changes between a92a3d062dac1b0ec5eece4ed6f9570e59f1a69b and 8d304db76993a0da0894b3d30794a2c5ec4927fe
    #end_example
  - `f' and `a' fails because the file doesn't exist
    #begin_example
     fatal: no such path apps/share/emacs23/site-lisp/vc-git.el in 8d304db76993a0da0894b3d30794a2c5ec4927fe
    #end_example

On a side note: I'm testing for the length of flist, since I know that
it's a list.  But flist isn't used after its initial binding in the let
clause, as far as I can see...?





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2011-11-28 20:21   ` Steinar Bang
@ 2011-11-28 21:08     ` Dan Nicolaescu
  2011-11-29 17:29       ` Steinar Bang
  0 siblings, 1 reply; 20+ messages in thread
From: Dan Nicolaescu @ 2011-11-28 21:08 UTC (permalink / raw)
  To: Steinar Bang; +Cc: 8756

Steinar Bang <sb@dod.no> writes:

>>>>>> Dan Nicolaescu <dann@gnu.org>:
>
>> I tried doing that at some point, but the result is not completely
>> functional, these commands do not work:
>>  "d" (log-view-diff)
>>  "f" (log-view-find-revision)  
>>  "a" (log-view-annotate-revision)
>
> Yes, I discovered the same thing.
>
>> which means that the corresponding vc-git.el functions need updating.
>> If someone figures out what git commands/sequence of commands are
>> needed to implement these, then it should not be too hard to implement
>> the needed changes.
>
> I decided to take a look at it again today.  The first problem I ran
> into, was that the emacs 23.1 version of `vc-git-print-log' used
> "git rev-list" instead of "git log".  And only "git log" supports
> "--follow" to track renames (at least that's what I concluded after
> googling for this today.  *Please* correct me, if I'm wrong!).

vc-git-print-log currently uses "git log", so your changes should not be
needed.

> This had slightly more success than the first attempt:
>  - `C-x v l' reports the full history (as in the previous attempt)
>  - Now `d', `f', and `a' works for commits newer than the rename
>  - After the rename
>   - `d' no longer fails with "No next version", but reports no diff,
>     where there should have been a diff
>     #begin_example
>      No changes between a92a3d062dac1b0ec5eece4ed6f9570e59f1a69b and 8d304db76993a0da0894b3d30794a2c5ec4927fe
>     #end_example

To solve this problem please figure out the git command (or set of
commands) that produces the expected diff.  Anything displayed in the
log buffer can be considered as available.  After that we need to figure
out how to make VC use that/those command(s).


>   - `f' and `a' fails because the file doesn't exist
>     #begin_example
>      fatal: no such path apps/share/emacs23/site-lisp/vc-git.el in 8d304db76993a0da0894b3d30794a2c5ec4927fe
>     #end_example

Same as above.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2011-11-28 21:08     ` Dan Nicolaescu
@ 2011-11-29 17:29       ` Steinar Bang
  2011-12-01 18:15         ` Dan Nicolaescu
  0 siblings, 1 reply; 20+ messages in thread
From: Steinar Bang @ 2011-11-29 17:29 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 8756

>>>>> Dan Nicolaescu <dann@gnu.org>:
> Steinar Bang <sb@dod.no> writes:

>> ....  The first problem I ran into, was that the emacs 23.1 version
>> of `vc-git-print-log' used "git rev-list" instead of "git log".  And
>> only "git log" supports "--follow" to track renames

> vc-git-print-log currently uses "git log", so your changes should not
> be needed.

Something similar wille be needed, if vc-git-print-log is supposed to
support a files argument of more than a single file, since "--follow" is
only supported for a single file.

#begin_example
  sb@somehost:~$ git log --follow ~/apps/share/emacs23/site-lisp/vc-git.el ~/.emacs
  usage: git logs can only follow renames on one pathname at a time
  sb@somehost:~$ git log --follow 
  usage: git logs can only follow renames on one pathname at a time
#end_example

> To solve this problem please figure out the git command (or set of
> commands) that produces the expected diff.  Anything displayed in the
> log buffer can be considered as available.  After that we need to figure
> out how to make VC use that/those command(s).

To be able to get a working diff beyond the rename, you need the path to
where the file used to be.  If you add the "--name-only" flag to "git
log", you will get an extra line containing the path of the file, in a
form that can be given to a "git diff".

Using the log result at the bottom, here's an example that gives a
useful diff, using the path of the first commit:
#begin_example
  sb@somehost:~$ git diff a92a3d062dac1b0ec5eece4ed6f9570e59f1a69b 8d304db76993a0da0894b3d30794a2c5ec4927fe -- apps/share/emacs/site-lisp/vc-git.el
  diff --git a/apps/share/emacs/site-lisp/vc-git.el b/apps/share/emacs/site-lisp/vc-git.el
  index b9b63ce..e4b0188 100644
  --- a/apps/share/emacs/site-lisp/vc-git.el
  +++ b/apps/share/emacs/site-lisp/vc-git.el
  @@ -604,7 +604,7 @@ for the --graph option."
          (apply 'vc-git-command buffer
                 'async files
                 (append
  -               '("log" "--no-color")
  +               '("log" "--follow" "--no-color")
                  (when shortlog
                    '("--graph" "--decorate" "--date=short"
                       "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit"))
#end_example

Blame for a path beyond the rename also works, just use the commit you
want to blame from, and the path of that commit in the log buffer:
 git blame a92a3d062dac1b0ec5eece4ed6f9570e59f1a69b -- apps/share/emacs/site-lisp/vc-git.e

Here's the example of a diff output with paths I used to get the above
commands.  The rename commit is a50a042e5af770928eaa8b636517d66bc2a13ee7
and the path given on that log entry, is the new path.

#begin_example
  sb@somehost:~$ git log --follow --name-only ~/apps/share/emacs23/site-lisp/vc-git.el
  commit ae93673cf7a325ac6882b73a4280cfba3fca41e9
  Author: Steinar Bang <sb@dod.no>
  Date:   Mon Nov 28 23:12:47 2011 +0100
  
      Make `vc-git-print-log' on a single file use "git log --follow" instead of "git rev-list".
      
      This is to make the `C-x v l' command show log entries across file
      renames.
      
      Only partially successful, since diffs, annotate, and finding the
      version of the file, doesn't work across the renaming boundary.
  
  apps/share/emacs23/site-lisp/vc-git.el
  
  commit 4098e78805561b9af3e29184a8133baaf6d16621
  Author: Steinar Bang <sb@dod.no>
  Date:   Mon Nov 28 10:28:49 2011 +0100
  
      Emacs 23.1 version of vc-git.el.
  
  apps/share/emacs23/site-lisp/vc-git.el
  
  commit a50a042e5af770928eaa8b636517d66bc2a13ee7
  Author: Steinar Bang <sb@dod.no>
  Date:   Thu Jun 23 19:26:28 2011 +0200
  
      Load the locally modified vc-git.el only for emacs23 (fails on emacs22).
  
  apps/share/emacs23/site-lisp/vc-git.el
  
  commit 8d304db76993a0da0894b3d30794a2c5ec4927fe
  Author: Steinar Bang <sb@dod.no>
  Date:   Sun May 29 22:24:58 2011 +0200
  
      Use the --follow flag on the "git log" command, to get full history across file moves in vc-git-print-log.
  
  apps/share/emacs/site-lisp/vc-git.el
  
  commit a92a3d062dac1b0ec5eece4ed6f9570e59f1a69b
  Author: Steinar Bang <sb@dod.no>
  Date:   Sun May 29 22:23:51 2011 +0200
  
      Adding the vc-git.el from emacs 23.3.
  
  apps/share/emacs/site-lisp/vc-git.el
#end_example





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2011-11-29 17:29       ` Steinar Bang
@ 2011-12-01 18:15         ` Dan Nicolaescu
  2011-12-01 21:44           ` Steinar Bang
  0 siblings, 1 reply; 20+ messages in thread
From: Dan Nicolaescu @ 2011-12-01 18:15 UTC (permalink / raw)
  To: Steinar Bang; +Cc: 8756

Steinar Bang <sb@dod.no> writes:

>>>>>> Dan Nicolaescu <dann@gnu.org>:
>> Steinar Bang <sb@dod.no> writes:
>
>>> ....  The first problem I ran into, was that the emacs 23.1 version
>>> of `vc-git-print-log' used "git rev-list" instead of "git log".  And
>>> only "git log" supports "--follow" to track renames
>
>> vc-git-print-log currently uses "git log", so your changes should not
>> be needed.
>
> Something similar wille be needed, if vc-git-print-log is supposed to
> support a files argument of more than a single file, since "--follow" is
> only supported for a single file.
>
> #begin_example
>   sb@somehost:~$ git log --follow ~/apps/share/emacs23/site-lisp/vc-git.el ~/.emacs
>   usage: git logs can only follow renames on one pathname at a time
>   sb@somehost:~$ git log --follow 
>   usage: git logs can only follow renames on one pathname at a time
> #end_example
>
>> To solve this problem please figure out the git command (or set of
>> commands) that produces the expected diff.  Anything displayed in the
>> log buffer can be considered as available.  After that we need to figure
>> out how to make VC use that/those command(s).
>
> To be able to get a working diff beyond the rename, you need the path to
> where the file used to be.  If you add the "--name-only" flag to "git
> log", you will get an extra line containing the path of the file, in a
> form that can be given to a "git diff".
>
> Using the log result at the bottom, here's an example that gives a
> useful diff, using the path of the first commit:
> #begin_example
>   sb@somehost:~$ git diff a92a3d062dac1b0ec5eece4ed6f9570e59f1a69b 8d304db76993a0da0894b3d30794a2c5ec4927fe -- apps/share/emacs/site-lisp/vc-git.el

--name-only makes the output a bit ugly, each log entry has the file
name printed and an extra empty line.  Some users might hate that.

Is it possible to compute the file name just the sha1?  That would allow
us to avoid using --name-only.


> #begin_example

>   diff --git a/apps/share/emacs/site-lisp/vc-git.el b/apps/share/emacs/site-lisp/vc-git.el
>   index b9b63ce..e4b0188 100644
>   --- a/apps/share/emacs/site-lisp/vc-git.el
>   +++ b/apps/share/emacs/site-lisp/vc-git.el
>   @@ -604,7 +604,7 @@ for the --graph option."
>           (apply 'vc-git-command buffer
>                  'async files
>                  (append
>   -               '("log" "--no-color")
>   +               '("log" "--follow" "--no-color")
>                   (when shortlog
>                     '("--graph" "--decorate" "--date=short"
>                        "--pretty=tformat:%d%h  %ad  %s" "--abbrev-commit"))
> #end_example
>
> Blame for a path beyond the rename also works, just use the commit you
> want to blame from, and the path of that commit in the log buffer:
>  git blame a92a3d062dac1b0ec5eece4ed6f9570e59f1a69b -- apps/share/emacs/site-lisp/vc-git.e
>
> Here's the example of a diff output with paths I used to get the above
> commands.  The rename commit is a50a042e5af770928eaa8b636517d66bc2a13ee7
> and the path given on that log entry, is the new path.
> #begin_example
>   sb@somehost:~$ git log --follow --name-only ~/apps/share/emacs23/site-lisp/vc-git.el
>   commit ae93673cf7a325ac6882b73a4280cfba3fca41e9
>   Author: Steinar Bang <sb@dod.no>
>   Date:   Mon Nov 28 23:12:47 2011 +0100
>   
>       Make `vc-git-print-log' on a single file use "git log --follow" instead of "git rev-list".
>       
>       This is to make the `C-x v l' command show log entries across file
>       renames.
>       
>       Only partially successful, since diffs, annotate, and finding the
>       version of the file, doesn't work across the renaming boundary.
>   
>   apps/share/emacs23/site-lisp/vc-git.el
>   
>   commit 4098e78805561b9af3e29184a8133baaf6d16621
>   Author: Steinar Bang <sb@dod.no>
>   Date:   Mon Nov 28 10:28:49 2011 +0100
>   
>       Emacs 23.1 version of vc-git.el.
>   
>   apps/share/emacs23/site-lisp/vc-git.el
>   
>   commit a50a042e5af770928eaa8b636517d66bc2a13ee7
>   Author: Steinar Bang <sb@dod.no>
>   Date:   Thu Jun 23 19:26:28 2011 +0200
>   
>       Load the locally modified vc-git.el only for emacs23 (fails on emacs22).
>   
>   apps/share/emacs23/site-lisp/vc-git.el
>   
>   commit 8d304db76993a0da0894b3d30794a2c5ec4927fe
>   Author: Steinar Bang <sb@dod.no>
>   Date:   Sun May 29 22:24:58 2011 +0200
>   
>       Use the --follow flag on the "git log" command, to get full history across file moves in vc-git-print-log.
>   
>   apps/share/emacs/site-lisp/vc-git.el
>   
>   commit a92a3d062dac1b0ec5eece4ed6f9570e59f1a69b
>   Author: Steinar Bang <sb@dod.no>
>   Date:   Sun May 29 22:23:51 2011 +0200
>   
>       Adding the vc-git.el from emacs 23.3.
>   
>   apps/share/emacs/site-lisp/vc-git.el
> #end_example





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2011-12-01 18:15         ` Dan Nicolaescu
@ 2011-12-01 21:44           ` Steinar Bang
  2011-12-01 21:57             ` Steinar Bang
  0 siblings, 1 reply; 20+ messages in thread
From: Steinar Bang @ 2011-12-01 21:44 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 8756

>>>>> Dan Nicolaescu <dann@gnu.org>:

> Is it possible to compute the file name just the sha1?  That would allow
> us to avoid using --name-only.

Maybe.

From what I learnt when I asked a question on the git list[1], here is
an example on the rename commit:

 1. first do a diff-tree on the commit where the rename takes place
    #+begin_example
      sb@somehost:~$ git diff-tree -M a50a042e5af770928eaa8b636517d66bc2a13ee7
      a50a042e5af770928eaa8b636517d66bc2a13ee7
      :100644 100644 f6a9be87a391c29bf58467e6cda8ffc2375a1471 e1dadc8553ec388b790a4c4dd3f3b6e498f9eedc M      .emacs
      :040000 040000 beff95d4c2f3d62e7d41f061738b86e3187ec887 155295fd0ad500419a0b5e2d4c571334675fbae0 M      apps
    #+end_example
    As you can see, nothing obvious here, so you have to try "diff -M"
    on the different sha1 pairs.  I, as a human, can see that the
    first one isn't an obvious candidate.  But a program would have to
    try all of them
 2. do "diff -M" on the sha1 pairs of diff-tree results to find the
    renames
    #+begin_example
      sb@somehost:~$ git diff -M f6a9be87a391c29bf58467e6cda8ffc2375a1471 e1dadc8553ec388b790a4c4dd3f3b6e498f9eedc
      diff --git a/f6a9be87a391c29bf58467e6cda8ffc2375a1471 b/e1dadc8553ec388b790a4c4dd3f3b6e498f9eedc
      index f6a9be8..e1dadc8 100644
      --- a/f6a9be87a391c29bf58467e6cda8ffc2375a1471
      +++ b/e1dadc8553ec388b790a4c4dd3f3b6e498f9eedc
      @@ -63,6 +63,8 @@ to be something different.")
             (push (concat apps-dir "/share/emacs21/site-lisp") load-path))
         (if running-emacs22
             (push (concat apps-dir "/share/emacs22/site-lisp") load-path))
      +  (if running-emacs23
      +      (push (concat apps-dir "/share/emacs23/site-lisp") load-path))
         (setq apps-bin (concat apps-dir "/bin"))
         (when (file-directory-p apps-elisp)
           (add-to-list 'load-path apps-elisp))
      sb@somehost:~$ git diff -M beff95d4c2f3d62e7d41f061738b86e3187ec887 155295fd0ad500419a0b5e2d4c571334675fbae0
      diff --git a/share/emacs/site-lisp/vc-git.el b/share/emacs23/site-lisp/vc-git.el
      similarity index 100%
      rename from share/emacs/site-lisp/vc-git.el
      rename to share/emacs23/site-lisp/vc-git.el
    #+end_example

So... I guess is possible.  But you have to work your way back through
each commit in the history, and look for "rename to" and "rename from",
and keep track of all renames as you work your way backwards.

Wnen I think of it, it would be simpler to do a "git log --follow
--name-only" and just regexp out the paths and commits and get an alist
from commit to path, or something like that...?  Actually, you probably
don't have to create that alist, just doing "git log --follow
--name-only" just to get the path when you need it, maybe...?

[1] Question asked on the git list
    http://thread.gmane.org/gmane.comp.version-control.git/186009/focus=186032





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2011-12-01 21:44           ` Steinar Bang
@ 2011-12-01 21:57             ` Steinar Bang
  2014-01-09 19:21               ` Glenn Morris
  0 siblings, 1 reply; 20+ messages in thread
From: Steinar Bang @ 2011-12-01 21:57 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 8756

>>>>> Steinar Bang <sb@dod.no>:

> Wnen I think of it, it would be simpler to do a "git log --follow
> --name-only" and just regexp out the paths and commits and get an alist
> from commit to path, or something like that...?  Actually, you probably
> don't have to create that alist, just doing "git log --follow
> --name-only" just to get the path when you need it, maybe...?

This can be more compact, using
 : git log --follow --name-only --pretty=oneline

Here's the compact log for the example file:
#+begin_example
  sb@somehost:~$ git log --follow --name-only --pretty=oneline apps/share/emacs23/site-lisp/vc-git.el
  ae93673cf7a325ac6882b73a4280cfba3fca41e9 Make `vc-git-print-log' on a single file use "git log --follow" instead of "git rev
  apps/share/emacs23/site-lisp/vc-git.el
  4098e78805561b9af3e29184a8133baaf6d16621 Emacs 23.1 version of vc-git.el.
  apps/share/emacs23/site-lisp/vc-git.el
  a50a042e5af770928eaa8b636517d66bc2a13ee7 Load the locally modified vc-git.el only for emacs23 (fails on emacs22).
  apps/share/emacs23/site-lisp/vc-git.el
  8d304db76993a0da0894b3d30794a2c5ec4927fe Use the --follow flag on the "git log" command, to get full history across file mov
  apps/share/emacs/site-lisp/vc-git.el
  a92a3d062dac1b0ec5eece4ed6f9570e59f1a69b Adding the vc-git.el from emacs 23.3.
  apps/share/emacs/site-lisp/vc-git.el
#+end_example

Should be fairly easy to get a path for a commit, from this...?





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2011-12-01 21:57             ` Steinar Bang
@ 2014-01-09 19:21               ` Glenn Morris
  2014-01-11  1:40                 ` Dan Nicolaescu
  0 siblings, 1 reply; 20+ messages in thread
From: Glenn Morris @ 2014-01-09 19:21 UTC (permalink / raw)
  To: Steinar Bang; +Cc: 8756, Dan Nicolaescu


Maybe this is fixed now, I dunno.

2014-01-09  Eric S. Raymond  <esr@thyrsus.com>

* vc/vc-git.el (vc-git-print-log): Add --follow option to
  command, following renames.

If so, please close this report.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2014-01-09 19:21               ` Glenn Morris
@ 2014-01-11  1:40                 ` Dan Nicolaescu
  2014-01-11 14:15                   ` Steinar Bang
  0 siblings, 1 reply; 20+ messages in thread
From: Dan Nicolaescu @ 2014-01-11  1:40 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 8756, Steinar Bang

Glenn Morris <rgm@gnu.org> writes:

> Maybe this is fixed now, I dunno.

The simple fix applied was suggested with the bug report.  It is not
enough to make it fully work, things like annotate, diff, etc do not
work...


> 2014-01-09  Eric S. Raymond  <esr@thyrsus.com>
>
> * vc/vc-git.el (vc-git-print-log): Add --follow option to
>   command, following renames.
>
> If so, please close this report.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2014-01-11  1:40                 ` Dan Nicolaescu
@ 2014-01-11 14:15                   ` Steinar Bang
  2014-01-11 23:32                     ` Steinar Bang
  2014-01-12  1:46                     ` Dan Nicolaescu
  0 siblings, 2 replies; 20+ messages in thread
From: Steinar Bang @ 2014-01-11 14:15 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 8756

>>>>> Dan Nicolaescu <dann@gnu.org>:

> The simple fix applied was suggested with the bug report.  It is not
> enough to make it fully work, things like annotate, diff, etc do not
> work...

Indeed:
 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756#8
 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756#11

To summarize: with --follow in place, what's listed in the log is the
complete history, but annotate, and find files won't work past renames,
and diffs reports "no diffs" when there should have been one (past
renames).

To summarize my experiments further down in the bug report thread: if
you do  
 git diff -M sha1a sha1b -- path-of-file-in-sha1a path-of-file-in-sha1b
you get a result that is the diff of the two files.

Here sha1a is a sha1 in "git log --follow path-of-file" that refers to a
point in history before moving a file, and path-of-file-in-sha1a is the
path to the file at that time in history.  And sha1b and
path-of-file-in-sha1b refers to a point in time where the file has a
different name or location.

To get the sha1/path infomation one can do the command
 git log --follow --name-only --pretty=oneline path-to-current-version-of-the-file
and then parse out the sha1/path pairs.

Note: this "git log" has to be done in addition to the displayed "git
log".  This command is not for display, it is just to get the sha1/path
pairs. 

I have created an example repo that contains some renames, moves, and
plain changes, at: https://github.com/steinarb/renametest.git

Here is an example of a diff in that repository (in this case a file
that has been renamed once, and then renamed file has been moved to a
different location):

sb@edwards:~/git/renametest$ git diff -M e5984c6a9e8e015dc521fb6a1756a88d5ffd676d 09d1bf6aa4dcd20dd36ca7668b75809e794428e0 -- hoved.txt application/main.txt
diff --git a/hoved.txt b/application/main.txt
similarity index 50%
rename from hoved.txt
rename to application/main.txt
index 9a57969..7f5e5a6 100644
--- a/hoved.txt
+++ b/application/main.txt
@@ -1,5 +1,6 @@
 Hello world!
-Version 1.0
-Feature1 implementation
+Version 2.0
 Feature2 implementation
 Feature3 implementation
+Feature4 implementation
+Feature4 implementation


Here is an example of the command to get the sha1/path pairs:
sb@edwards:~/git/renametest$ git log --follow --name-only --pretty=oneline application/main.txt
09d1bf6aa4dcd20dd36ca7668b75809e794428e0 Bumped the version number.
application/main.txt
313aa2f727fefc9e50354380cb9fb3a70401b5f3 Moved a single file to a different directory.
application/main.txt
9b47cdca956a59b4582c67d24f9474a576aff7b9 Changes to two files
main.txt
dd99483cda11b4ab040135767655c07c5cf07efb Removed a line.
main.txt
2b0f570422db1e0fac39697d908b31eb70e895f5 Renamed a file and changed the README in the same commit
main.txt
b35723cfbc91a3108469091c8c77ee91107e1ab8 Added a new feature.
hoved.txt
e5984c6a9e8e015dc521fb6a1756a88d5ffd676d Introduced a new file
hoved.txt





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2014-01-11 14:15                   ` Steinar Bang
@ 2014-01-11 23:32                     ` Steinar Bang
  2014-01-12  1:46                     ` Dan Nicolaescu
  1 sibling, 0 replies; 20+ messages in thread
From: Steinar Bang @ 2014-01-11 23:32 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 8756

>>>>> Steinar Bang <sb@dod.no>:

> To get the sha1/path infomation one can do the command
>  git log --follow --name-only --pretty=oneline path-to-current-version-of-the-file
> and then parse out the sha1/path pairs.

Some example code:
(let
    ((git-result (split-string 
                  (shell-command-to-string "cd ~/git/renametest/;git log --follow --name-only --pretty=oneline application/main.txt")
                  "\r?\n"))
     (sha1-path-map)
     (sha1)
     (path))
  (while git-result
    (setq sha1 (car (split-string (car git-result))))
    (setq git-result (cdr git-result))
    (setq path (car git-result))
    (setq git-result (cdr git-result))
    (add-to-list 'sha1-path-map (cons sha1 path)))
  (cdr sha1-path-map))

Which results in the following alist of sha1-to-path:
(("e5984c6a9e8e015dc521fb6a1756a88d5ffd676d" . "hoved.txt") ("b35723cfbc91a3108469091c8c77ee91107e1ab8" . "hoved.txt") ("2b0f570422db1e0fac39697d908b31eb70e895f5" . "main.txt") ("dd99483cda11b4ab040135767655c07c5cf07efb" . "main.txt") ("9b47cdca956a59b4582c67d24f9474a576aff7b9" . "main.txt") ("313aa2f727fefc9e50354380cb9fb3a70401b5f3" . "application/main.txt") ("09d1bf6aa4dcd20dd36ca7668b75809e794428e0" . "application/main.txt"))

(The cdr on the return value, is because the list was headed by a (nil)
and I couldn't figure out where it came from)






^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2014-01-11 14:15                   ` Steinar Bang
  2014-01-11 23:32                     ` Steinar Bang
@ 2014-01-12  1:46                     ` Dan Nicolaescu
  2014-01-12  3:57                       ` Eli Zaretskii
  2014-01-12 10:15                       ` Steinar Bang
  1 sibling, 2 replies; 20+ messages in thread
From: Dan Nicolaescu @ 2014-01-12  1:46 UTC (permalink / raw)
  To: Steinar Bang; +Cc: 8756

Steinar Bang <sb@dod.no> writes:

>>>>>> Dan Nicolaescu <dann@gnu.org>:
>
>> The simple fix applied was suggested with the bug report.  It is not
>> enough to make it fully work, things like annotate, diff, etc do not
>> work...
>
> Indeed:
>  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756#8
>  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756#11
>
> To summarize: with --follow in place, what's listed in the log is the
> complete history, but annotate, and find files won't work past renames,
> and diffs reports "no diffs" when there should have been one (past
> renames).
>
> To summarize my experiments further down in the bug report thread: if
> you do  
>  git diff -M sha1a sha1b -- path-of-file-in-sha1a path-of-file-in-sha1b
> you get a result that is the diff of the two files.
>
> Here sha1a is a sha1 in "git log --follow path-of-file" that refers to a
> point in history before moving a file, and path-of-file-in-sha1a is the
> path to the file at that time in history.  And sha1b and
> path-of-file-in-sha1b refers to a point in time where the file has a
> different name or location.
>
> To get the sha1/path infomation one can do the command
>  git log --follow --name-only --pretty=oneline path-to-current-version-of-the-file
> and then parse out the sha1/path pairs.
>
> Note: this "git log" has to be done in addition to the displayed "git
> log".  This command is not for display, it is just to get the sha1/path
> pairs. 
>
> I have created an example repo that contains some renames, moves, and
> plain changes, at: https://github.com/steinarb/renametest.git
>
> Here is an example of a diff in that repository (in this case a file
> that has been renamed once, and then renamed file has been moved to a
> different location):
>
> sb@edwards:~/git/renametest$ git diff -M e5984c6a9e8e015dc521fb6a1756a88d5ffd676d 09d1bf6aa4dcd20dd36ca7668b75809e794428e0 -- hoved.txt application/main.txt
> diff --git a/hoved.txt b/application/main.txt
> similarity index 50%
> rename from hoved.txt
> rename to application/main.txt
> index 9a57969..7f5e5a6 100644
> --- a/hoved.txt
> +++ b/application/main.txt
> @@ -1,5 +1,6 @@
>  Hello world!
> -Version 1.0
> -Feature1 implementation
> +Version 2.0
>  Feature2 implementation
>  Feature3 implementation
> +Feature4 implementation
> +Feature4 implementation
>
>
> Here is an example of the command to get the sha1/path pairs:
> sb@edwards:~/git/renametest$ git log --follow --name-only --pretty=oneline application/main.txt

IMO the ideal solution is to get git to put the sha1/path info in the
log output, then vc can read it from there and do whatever is needed.
Is it possible to do that using the "format" argument to git log?

Another thing that could be improved in the log output (C-x v L) is to
put the date before the name.

From a random place in emacs history: 

* 2822e57..: Paul Eggert 2013-01-14 Avoid needless casts with XSAVE_POINTER.
* 5dece9d..: Leo Liu 2013-01-14 Sync window-point and point in calendar-redraw
* 9b1cf40..: Glenn Morris 2013-01-14 Auto-commit of loaddefs files.
* df32ded..: Dmitry Antipov 2013-01-14 * lisp.h (toplevel): Fix typo in comment.

The date has a fixed length, names do not, the display would look much better like this:

* 2822e57..: 2013-01-14 Paul Eggert  Avoid needless casts with XSAVE_POINTER.
* 5dece9d..: 2013-01-14 Leo Liu  Sync window-point and point in calendar-redraw
* 9b1cf40..: 2013-01-14 Glenn Morris  Auto-commit of loaddefs files.
* df32ded..: 2013-01-14 Dmitry Antipov  * lisp.h (toplevel): Fix typo in comment.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2014-01-12  1:46                     ` Dan Nicolaescu
@ 2014-01-12  3:57                       ` Eli Zaretskii
  2014-01-12 10:15                       ` Steinar Bang
  1 sibling, 0 replies; 20+ messages in thread
From: Eli Zaretskii @ 2014-01-12  3:57 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 8756, sb

> From: Dan Nicolaescu <dann@gnu.org>
> Date: Sat, 11 Jan 2014 20:46:45 -0500
> Cc: 8756@debbugs.gnu.org
> 
> IMO the ideal solution is to get git to put the sha1/path info in the
> log output, then vc can read it from there and do whatever is needed.
> Is it possible to do that using the "format" argument to git log?

Yes, use %H or %h.

> Another thing that could be improved in the log output (C-x v L) is to
> put the date before the name.
> 
> >From a random place in emacs history: 
> 
> * 2822e57..: Paul Eggert 2013-01-14 Avoid needless casts with XSAVE_POINTER.
> * 5dece9d..: Leo Liu 2013-01-14 Sync window-point and point in calendar-redraw
> * 9b1cf40..: Glenn Morris 2013-01-14 Auto-commit of loaddefs files.
> * df32ded..: Dmitry Antipov 2013-01-14 * lisp.h (toplevel): Fix typo in comment.
> 
> The date has a fixed length, names do not, the display would look much better like this:
> 
> * 2822e57..: 2013-01-14 Paul Eggert  Avoid needless casts with XSAVE_POINTER.
> * 5dece9d..: 2013-01-14 Leo Liu  Sync window-point and point in calendar-redraw
> * 9b1cf40..: 2013-01-14 Glenn Morris  Auto-commit of loaddefs files.
> * df32ded..: 2013-01-14 Dmitry Antipov  * lisp.h (toplevel): Fix typo in comment.

The 'format' option supports alignment directive, so the format of the
output could be even prettier.

Here's what I use for a pretty log output:

  git log --pretty='format:%h %<(18,mtrunc)%an %cd %s' --date=short





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2014-01-12  1:46                     ` Dan Nicolaescu
  2014-01-12  3:57                       ` Eli Zaretskii
@ 2014-01-12 10:15                       ` Steinar Bang
  2014-01-12 10:45                         ` Steinar Bang
  1 sibling, 1 reply; 20+ messages in thread
From: Steinar Bang @ 2014-01-12 10:15 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 8756

>>>>> Dan Nicolaescu <dann@gnu.org>:

> IMO the ideal solution is to get git to put the sha1/path info in the
> log output, then vc can read it from there and do whatever is needed.
> Is it possible to do that using the "format" argument to git log?

Where do you want the path? I'm assuming in the line following the sha1
and with as little clutter as possible (no extra blank lines, no stuff
on that line, except for the path)?





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
  2014-01-12 10:15                       ` Steinar Bang
@ 2014-01-12 10:45                         ` Steinar Bang
  0 siblings, 0 replies; 20+ messages in thread
From: Steinar Bang @ 2014-01-12 10:45 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: 8756

>>>>> Steinar Bang <sb@dod.no>:
>>>>> Dan Nicolaescu <dann@gnu.org>:

>> IMO the ideal solution is to get git to put the sha1/path info in the
>> log output, then vc can read it from there and do whatever is needed.
>> Is it possible to do that using the "format" argument to git log?

> Where do you want the path? I'm assuming in the line following the
> sha1 and with as little clutter as possible (no extra blank lines, no
> stuff on that line, except for the path)?

I path isn't in available in the format specification:
 http://opensource.apple.com/source/Git/Git-19/src/git-htmldocs/pretty-formats.txt
 http://git-scm.com/book/en/Git-Basics-Viewing-the-Commit-History
(Note: I will be happy to be proven wrong here)

As far as I can tell the file name lives "outside" of the normal git-log
output and is tacked on at the end with an extra blank line as a
separator, when you do --name-only.

So the best way to achive what you want, if you don't like the clutter
added by the extra blank line, and the visually ambigious presentation
of putting it close to the next commit, would be to do the log with
 git log --follow --name-only
and then hide the two lines before each "commit " line, except for the
first, and also hide the two last lines of the output.

I would probably be a good idea to create the sha1/path alist when doing
the folding.

Maybe it would be better, and simpler (and faster...?, to just strip the
path and the blank line, and put the information only into the alist?
The path isn't needed, or even desired, visually...?





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: vc-git.el doesn't use --follow argument in vc-git-print-log
  2011-05-29 20:17 bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log Steinar Bang
  2011-05-31  5:25 ` Dan Nicolaescu
@ 2014-07-30 20:35 ` Dmitry Dzhus
  2019-11-03 14:32   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 20+ messages in thread
From: Dmitry Dzhus @ 2014-07-30 20:35 UTC (permalink / raw)
  To: 8756

[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]

How are you gentlemen,

Following renames is nice no matter what Git upstream thinks,
so I gave this bug a try. I'd like to share some progress.

Diffing (`d`), paging (`f`) and annotating a file (`a`) revision works.
I've tested it with Git version 1.8.5.4 and 2.0.2.

Parallel git log with hash/file information is run when
a log is queried. (vc-git-file-shalist) provides access to
a list of SHA1's/historical file names for the file open
in the *vc-change-log* buffer.

The bad part is that whole-changeset (`D`) diffing is broken
(wrong revisions are selected for diff).
The culprit is `vc-git-previous-revision`.
Using HASH^ to obtain the parent of HASH revision produces
unexpected results when file renames are involved. However,
for whole-changeset diffing HASH^ seems to be exactly what
we need. However, `vc-git-previous-revision` doesn't seem
to enable any inspection of the context in which we use it
(in other words, if we hit `d` or `D` in the log buffer.)
Any ideas?

I also have not tackled revision navigation in the annotation
mode, but this can likely be solved by plugging calls to 
`(vc-git-rev-to-filename)` somewhere in the annotation mode.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vc-git-follow-renames.patch --]
[-- Type: text/x-diff; name="vc-git-follow-renames.patch", Size: 6450 bytes --]

=== modified file 'lisp/vc/vc-git.el'
--- lisp/vc/vc-git.el	2014-06-29 20:48:55 +0000
+++ lisp/vc/vc-git.el	2014-07-30 20:32:01 +0000
@@ -691,13 +691,7 @@
 	 (coding-system-for-read 'binary)
 	 (coding-system-for-write 'binary)
 	 (fullname
-	  (let ((fn (vc-git--run-command-string
-		     file "ls-files" "-z" "--full-name" "--")))
-	    ;; ls-files does not return anything when looking for a
-	    ;; revision of a file that has been renamed or removed.
-	    (if (string= fn "")
-		(file-relative-name file (vc-git-root default-directory))
-	      (substring fn 0 -1)))))
+          (vc-git-rev-to-filename rev)))
     (vc-git-command
      buffer 0
      nil
@@ -786,20 +780,53 @@
     ;; If the buffer exists from a previous invocation it might be
     ;; read-only.
     (let ((inhibit-read-only t))
+      ;; Clean SHA1 list caches whenever we query a new change log
       (with-current-buffer
           buffer
-	(apply 'vc-git-command buffer
-	       'async files
-	       (append
-		'("log" "--no-color")
-		(when shortlog
-		  `("--graph" "--decorate" "--date=short"
+        (if (boundp 'vc-git-file-shalist-raw)
+            (setq vc-git-file-shalist-raw nil)
+          (set (make-local-variable 'vc-git-file-shalist-raw) nil))
+        (if (boundp 'vc-git-file-shalist)
+            (setq vc-git-file-shalist nil))
+        (when (vc-git-single-file files)
+          ;; Store newline-separated list of revision hashes and file
+          ;; names in vc-git-file-shalist-raw buffer-local variable
+          (with-temp-buffer
+            (set-process-filter
+             (apply 'vc-git-command nil
+                    'async files
+                    (append
+                     '("log"
+                       "--follow"
+                       "--name-only"
+                       "--pretty=tformat:%H"
+                       "--no-color")
+                     ;; Tail revision must now its parent
+                     (when limit (list "-n" (format "%s" (1+ limit))))
+                     (when start-revision (lsit start-revision))
+                     '("--")))
+             (lambda (p s)
+               (with-current-buffer buffer
+                 (setq
+                  vc-git-file-shalist-raw
+                  (replace-regexp-in-string
+                   "\n\n" "\n"
+                   (concat (if (boundp 'vc-git-file-shalist-raw)
+                               vc-git-file-shalist-raw "") s))))))))
+        (apply 'vc-git-command buffer
+               'async files
+               (append
+                (if (vc-git-single-file files)
+                    '("log" "--follow" "--no-color")
+                  '("log" "--no-color"))
+                (when shortlog
+                  `("--graph" "--decorate" "--date=short"
                     ,(format "--pretty=tformat:%s"
-			     (car vc-git-root-log-format))
-		    "--abbrev-commit"))
-		(when limit (list "-n" (format "%s" limit)))
-		(when start-revision (list start-revision))
-		'("--")))))))
+                             (car vc-git-root-log-format))
+                    "--abbrev-commit"))
+                (when limit (list "-n" (format "%s" limit)))
+                (when start-revision (list start-revision))
+                '("--")))))))
 
 (defun vc-git-log-outgoing (buffer remote-location)
   (interactive)
@@ -904,11 +931,21 @@
 (defun vc-git-diff (files &optional rev1 rev2 buffer)
   "Get a difference report using Git between two revisions of FILES."
   (let (process-file-side-effects)
-    (apply #'vc-git-command (or buffer "*vc-diff*") 1 files
-	   (if (and rev1 rev2) "diff-tree" "diff-index")
-	   "--exit-code"
-	   (append (vc-switches 'git 'diff)
-		   (list "-p" (or rev1 "HEAD") rev2 "--")))))
+    (with-current-buffer (or buffer "*vc-diff*")
+      ;; Run diff from the repository root because our file names are
+      ;; relative to it
+      (setq default-directory (vc-git-root default-directory))
+      (apply #'vc-git-command (or buffer "*vc-diff*") 1
+             (if (vc-git-single-file files)
+                 (list
+                  (vc-git-rev-to-filename rev1)
+                  (vc-git-rev-to-filename rev2))
+               files)
+             (if (and rev1 rev2) "diff-tree" "diff-index")
+             "--exit-code"
+             "-M"
+             (append (vc-switches 'git 'diff)
+                     (list "-p" (or rev1 "HEAD") rev2 "--"))))))
 
 (defun vc-git-revision-table (_files)
   ;; What about `files'?!?  --Stef
@@ -928,7 +965,8 @@
     table))
 
 (defun vc-git-annotate-command (file buf &optional rev)
-  (let ((name (file-relative-name file)))
+  (setq default-directory (vc-git-root default-directory))
+  (let ((name (vc-git-rev-to-filename rev)))
     (vc-git-command buf 'async nil "blame" "--date=iso" "-C" "-C" rev "--" name)))
 
 (declare-function vc-annotate-convert-time "vc-annotate" (time))
@@ -987,7 +1025,11 @@
                            (point)
                            (1- (point-max)))))))
         (or (vc-git-symbolic-commit prev-rev) prev-rev))
-    (vc-git--rev-parse (concat rev "^"))))
+    ;; Use historical data for the file if possible.
+    ;; FIXME: This breaks whole-changeset diffing.
+    (if (vc-git-file-shalist)
+        (car (cddr (member rev (vc-git-file-shalist))))
+      (vc-git--rev-parse (concat rev "^")))))
 
 (defun vc-git--rev-parse (rev)
   (with-temp-buffer
@@ -995,6 +1037,26 @@
      (vc-git--out-ok "rev-parse" rev)
      (buffer-substring-no-properties (point-min) (+ (point-min) 40)))))
 
+(defun vc-git-single-file (files)
+  "Return t if FILES contains a single non-directory file."
+  (and (eq (length files) 1)
+       (not (file-directory-p (car files)))))
+
+(defun vc-git-file-shalist ()
+  "Return alternating list of SHA1 hashes and file names.
+The list contains commit hashes and historical names for a file
+in the current change log buffer."
+  (cond
+   ((and (boundp 'vc-git-file-shalist) vc-git-file-shalist)
+    vc-git-file-shalist)
+   ((and (boundp 'vc-git-file-shalist-raw) vc-git-file-shalist-raw)
+    (set (make-local-variable 'vc-git-file-shalist)
+         (split-string vc-git-file-shalist-raw "\n")))))
+
+(defun vc-git-rev-to-filename (rev)
+  "Return a historical file name for the file in REV."
+  (cadr (member rev (vc-git-file-shalist))))
+
 (defun vc-git-next-revision (file rev)
   "Git-specific version of `vc-next-revision'."
   (let* ((default-directory (file-name-directory


^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: vc-git.el doesn't use --follow argument in vc-git-print-log
  2014-07-30 20:35 ` bug#8756: " Dmitry Dzhus
@ 2019-11-03 14:32   ` Lars Ingebrigtsen
  2019-11-03 18:48     ` Dmitry Gutov
  0 siblings, 1 reply; 20+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-03 14:32 UTC (permalink / raw)
  To: Dmitry Dzhus; +Cc: 8756

A new option vc-git-print-log-follow was added in 2016, so I think this
is covered now, and I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: vc-git.el doesn't use --follow argument in vc-git-print-log
  2019-11-03 14:32   ` Lars Ingebrigtsen
@ 2019-11-03 18:48     ` Dmitry Gutov
  2019-11-08 20:44       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 20+ messages in thread
From: Dmitry Gutov @ 2019-11-03 18:48 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Dmitry Dzhus; +Cc: 8756

On 03.11.2019 16:32, Lars Ingebrigtsen wrote:
> A new option vc-git-print-log-follow was added in 2016, so I think this
> is covered now, and I'm closing this bug report.

The resulting solution still has the problems described in this bug 
report here, 8 years ago:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756#11

(In short, inspecting revisions where the file had a different name 
leads to bad results).





^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#8756: vc-git.el doesn't use --follow argument in vc-git-print-log
  2019-11-03 18:48     ` Dmitry Gutov
@ 2019-11-08 20:44       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 20+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-08 20:44 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 8756, Dmitry Dzhus

Dmitry Gutov <dgutov@yandex.ru> writes:

> The resulting solution still has the problems described in this bug
> report here, 8 years ago:
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756#11
>
> (In short, inspecting revisions where the file had a different name
> leads to bad results).

Perhaps that should be reported as a new bug?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-11-08 20:44 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-29 20:17 bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log Steinar Bang
2011-05-31  5:25 ` Dan Nicolaescu
2011-11-28 20:21   ` Steinar Bang
2011-11-28 21:08     ` Dan Nicolaescu
2011-11-29 17:29       ` Steinar Bang
2011-12-01 18:15         ` Dan Nicolaescu
2011-12-01 21:44           ` Steinar Bang
2011-12-01 21:57             ` Steinar Bang
2014-01-09 19:21               ` Glenn Morris
2014-01-11  1:40                 ` Dan Nicolaescu
2014-01-11 14:15                   ` Steinar Bang
2014-01-11 23:32                     ` Steinar Bang
2014-01-12  1:46                     ` Dan Nicolaescu
2014-01-12  3:57                       ` Eli Zaretskii
2014-01-12 10:15                       ` Steinar Bang
2014-01-12 10:45                         ` Steinar Bang
2014-07-30 20:35 ` bug#8756: " Dmitry Dzhus
2019-11-03 14:32   ` Lars Ingebrigtsen
2019-11-03 18:48     ` Dmitry Gutov
2019-11-08 20:44       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).