From: Jakub Narebski <jnareb@gmail.com>
To: Bill Lear <rael@zopyra.com>
Cc: git@vger.kernel.org
Subject: Re: Git log of all (modifying) commands run on a repo?
Date: Wed, 7 Feb 2007 23:59:07 +0100 [thread overview]
Message-ID: <200702072359.08043.jnareb@gmail.com> (raw)
In-Reply-To: <17866.21770.762672.84327@lisa.zopyra.com>
Bill Lear wrote:
> On Wednesday, February 7, 2007 at 23:29:56 (+0100) Jakub Narebski writes:
>>...
>> Is history of shell commands too short? Reflogs doesn't help
>> (concatenate all reflogs, perhaps preceding them with file name,
>> and sort by date) either?
>
> Well, I thought of shell history also, but the problem is, that we often
> have multiple repos on a machine (we may be executing a long-running
> experiment in one, for example, and not want to disturb it).
>
> Shell history in that case doesn't help. Also, not having the branch
> information is a minus (each of us puts the current git branch in our
> prompt).
Fact. Although in worst case, if shell history is deep enough, you could
do forensic on it... unless you use multiple shells, freely interspersing
commands in them...
> I didn't know about reflogs. What did you have in mind? Could you
> show an example, please?
Unfortunately till some time ago reflogs were not enabled by default.
If they are enabled, for each branch you should have
$GIT_DIR/logs/refs/heads/<branch> file, which contains information about
operations on given branch. It has pre- and post-operation commit ids,
and timestamp of a change, together with short description. You could
concatenate reflogs, and sort them by timestamp.
Reflogs are purely local matter, they represent local view of history.
See git-update-ref(1), "Logging Updates" section, git-repo-config(1)
(or git-config(1)), description of core.logAllRefUpdates variable,
and Git User's Manual.
Examples (sha1 are shortened, and lines are broken for easier reading):
* .git/logs/refs/heads/origin
798123... e68989... Jakub Narebski <jnareb@gmail.com> 1170836783 +0100 \
pull origin git://git.kernel.org/pub/scm/git/git.git: fast-forward
e68989... 6506e1... Jakub Narebski <jnareb@gmail.com> 1170873620 +0100 \
fetch origin git://git.kernel.org/pub/scm/git/git.git: fast-forward
* git/logs/refs/heads/master
93342d... 39daf6... Jakub Narebski <jnareb@gmail.com> 1169555797 +0100 \
commit: t/t1300-repo-config.sh: value continued on next line
39daf6... b62502... Jakub Narebski <jnareb@gmail.com> 1169809125 +0100 \
commit (merge): Merge branch 'master' of git://git.kernel.org/pub/scm/git/git
b62502... 7ab704... Jakub Narebski <jnareb@gmail.com> 1170150241 +0100 \
pull origin: Merge made by recursive.
7ab704... bb77c5... Jakub Narebski <jnareb@gmail.com> 1170238531 +0100 \
pull origin: In-index merge
* git/logs/refs/heads/gitweb/web
ceae8a... a29878... Jakub Narebski <jnareb@gmail.com> 1169973601 +0100 \
commit: Git config file reader in Perl (WIP 5)
a29878... 1b600e... Jakub Narebski <jnareb@gmail.com> 1170034498 +0100 \
reset --hard 1b600e659abc7e409c9d830e332d3cef010
62c1c1... 05b936... Jakub Narebski <jnareb@gmail.com> 1170034499 +0100 \
rebase: Git config file reader in Perl (WIP 1)
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2007-02-07 22:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-07 22:15 Git log of all (modifying) commands run on a repo? Bill Lear
2007-02-07 22:29 ` Jakub Narebski
2007-02-07 22:39 ` Bill Lear
2007-02-07 22:59 ` Jakub Narebski [this message]
2007-02-07 22:49 ` Linus Torvalds
2007-02-07 22:56 ` Junio C Hamano
2007-02-07 23:03 ` Shawn O. Pearce
2007-02-07 23:26 ` Linus Torvalds
2007-02-07 23:36 ` Junio C Hamano
2007-02-07 23:46 ` Linus Torvalds
2007-02-07 23:53 ` Jakub Narebski
2007-02-07 23:59 ` Johannes Schindelin
2007-02-08 0:05 ` Shawn O. Pearce
2007-02-08 0:26 ` Junio C Hamano
2007-02-08 0:41 ` Johannes Schindelin
2007-02-08 0:50 ` Junio C Hamano
2007-02-08 0:56 ` Johannes Schindelin
2007-02-08 17:51 ` Linus Torvalds
2007-02-08 18:36 ` Johannes Schindelin
2007-02-07 22:57 ` Shawn O. Pearce
2007-02-07 23:00 ` Bill Lear
2007-02-07 23:29 ` Linus Torvalds
2007-02-07 23:31 ` Bill Lear
2007-02-07 23:02 ` Linus Torvalds
2007-02-08 8:26 ` Johannes Sixt
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200702072359.08043.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=rael@zopyra.com \
/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.
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 NNTP newsgroup(s).