From: Steinar Bang <sb@dod.no>
To: Dan Nicolaescu <dann@gnu.org>
Cc: 8756@debbugs.gnu.org
Subject: bug#8756: 23.3; vc-git.el doesn't use --follow argument in vc-git-print-log
Date: Sun, 12 Jan 2014 00:32:56 +0100 [thread overview]
Message-ID: <upzcfvouayc7.fsf@dod.no> (raw)
In-Reply-To: <87ob3i61vx.fsf@dod.no> (Steinar Bang's message of "Sat, 11 Jan 2014 15:15:14 +0100")
>>>>> 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)
next prev parent reply other threads:[~2014-01-11 23:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=upzcfvouayc7.fsf@dod.no \
--to=sb@dod.no \
--cc=8756@debbugs.gnu.org \
--cc=dann@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).