git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Janik <timj@gtk.org>
To: git@vger.kernel.org
Subject: git-commit broken with GIT_INDEX_FILE
Date: Wed, 31 Oct 2007 16:02:32 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.62.0710311549380.21251@master.birnet.private> (raw)

hey All.

i'm maintaining my own git porcelainen, and as part of that had to
(re-)implement my own commit command:
   http://blogs.gnome.org/timj/2007/10/13/13102007-yummy-yummy-porcelain-version-08/

i've read through git-commit and cg-commit, and would really like to avoid
reimplementing the hook and utf8 encoding handling. thus, my tool calls
git-commit once it has created an index file with all the files that
need comitting.
ideally, it'd construct a temporary index, e.g. $GIT_DIR/next-index$$ and
then invoke:
   GIT_INDEX_FILE=$GIT_DIR/next-index$$ git-commit -F commitmsg.txt
this is not working as expected however.

when GIT_INDEX_FILE=tmpindex is specified for git-commit-1.5.3.4, it will
construct a commit message for tmpindex, but it'll still use the standard
index file $GIT_DIR/index for git-write-tree.

(so my current implementation saves and restores the standard index file
around committs.)

for consistent commit messages, the index file used for commit message
construction should be the same index used for git-write-tree.
ideally however, GIT_INDEX_FILE=tmpindex git-commit would work correctly
in using tmpindex for git-write-tree as well.

---
ciaoTJ

                 reply	other threads:[~2007-10-31 15:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.62.0710311549380.21251@master.birnet.private \
    --to=timj@gtk.org \
    --cc=git@vger.kernel.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.
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).