<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>17153</bug_id>
          
          <creation_ts>2008-09-17 00:11:09 +0400</creation_ts>
          <short_desc>doesn&apos;t commit newly created files</short_desc>
          <delta_ts>2009-01-25 09:18:27 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>emacs-git</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Evgenii Terechkov">evg</assigned_to>
          
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77934</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2008-09-17 00:11:09 +0400</bug_when>
    <thetext>emacs-git-1.5.6.5-alt2

If one creates a file, and uses C-x v v, the file is not committed (although it is added to the index). Another bad consequence of this is that the commit message is lost (and one might have been carefully typing it during C-x v v).

In the example session below, I first (1) just use git to commit a new file &quot;a&quot;, and it works, then (2) I try to do the same for a new file &quot;b&quot; by means of Emacs, and it fails, then (3) I show that Emacs works for already registered files (I commit a change to &quot;a&quot; by means of Emacs).

[ivan@dell vc]$ mkdir test-emacs-git
[ivan@dell vc]$ cd test-emacs-git/
[ivan@dell test-emacs-git]$ git init
Initialized empty Git repository in /space/ivan/OUT/bugreports/ALT/vc/test-emacs-git/.git/
[ivan@dell test-emacs-git]$ git-show-branch 
No revs to be shown.
[ivan@dell test-emacs-git]$ echo a &gt; a # (1): I create a new file and commit it.
[ivan@dell test-emacs-git]$ git add a
[ivan@dell test-emacs-git]$ git commit
Created initial commit 5d32cd8: Created a.
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a
[ivan@dell test-emacs-git]$ git-show-branch 
[master] Created a.
[ivan@dell test-emacs-git]$ emacs b # (2): I create a new file and commit by pressing &quot;C-x v v&quot; in Emacs. No success:
[ivan@dell test-emacs-git]$ git-show-branch 
[master] Created a.
[ivan@dell test-emacs-git]$ git --no-pager status
# On branch master
# Changes to be committed:
#   (use &quot;git reset HEAD &lt;file&gt;...&quot; to unstage)
#
#	new file:   b
#
[ivan@dell test-emacs-git]$ cat .git/COMMIT_EDITMSG # The new commit message is also lost.
Created a.
# Please enter the commit message for your changes.
# (Comment lines starting with &apos;#&apos; will not be included)
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use &quot;git rm --cached &lt;file&gt;...&quot; to unstage)
#
#	new file: a
#
[ivan@dell test-emacs-git]$ cat .git/COMMIT_EDITMSG~

# Please enter the commit message for your changes.
# (Comment lines starting with &apos;#&apos; will not be included)
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use &quot;git rm --cached &lt;file&gt;...&quot; to unstage)
#
#	new file: a
#
[ivan@dell test-emacs-git]$ emacs a # (3): I modify the file and commit it by pressing &quot;C-x v v&quot; in Emacs. Successfully:
[ivan@dell test-emacs-git]$ git-show-branch 
[master] Modified a.
[ivan@dell test-emacs-git]$ git --no-pager status # Emacs circumvents index, so &quot;b&quot; is still uncomitted and in the index.
# On branch master
# Changes to be committed:
#   (use &quot;git reset HEAD &lt;file&gt;...&quot; to unstage)
#
#	new file:   b
#
[ivan@dell test-emacs-git]$ 

Expected behavior: 

Emacs should actually commit new files just like it does for modified files.

Another possibility could be to accept the convention that Emacs doesn&apos;t commit new files, but rather adds them to the index. But then the useless request for the commit message should be eliminated in Emacs (the commit message is lost in this case now).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77935</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2008-09-17 00:31:17 +0400</bug_when>
    <thetext>I see. The reason for my problem (that Emacs asked the commit message, and I had the impression that it was going to commit the file because of this request) was that I changed the value of `vc-initial-comment&apos; variable in Emacs:

vc-initial-comment&apos;s value is t

Documentation:
*If non-nil, prompt for initial comment when a file is registered.


This behavior made some sense for RCS; RCS accepted a comment upon registering a new file, which was interpreted as a &quot;descriptive text&quot; -- from &quot;man ci&quot;:

If  the RCS file does not exist, ci creates it and deposits the contents of the working file as the initial revision (default num-
       ber: 1.1).  The access list is initialized to empty.  Instead of the log message, ci requests descriptive text (see -t below).

but it turns out, it makes no sense for git.

So, this is not a bug report, but a feature request: warn in this situation (when vc-initial-comment is on; or, equivalently, when a comment is passed to `vc-git-register&apos;) that the comment will be thrown away.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77936</commentid>
    <comment_count>2</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2008-09-17 00:36:37 +0400</bug_when>
    <thetext>In order to notify the developers actually interested in emacs-git, I&apos;m reassigning the report.

But I think the priority of this thing is very low, so just close it, if you are not interested.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78006</commentid>
    <comment_count>3</comment_count>
      <attachid>2919</attachid>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2008-09-17 20:23:57 +0400</bug_when>
    <thetext>Created attachment 2919
vc-git.el warn patch

Простой патч. Делает то, что и требовалось - если при регистраций нам дают комментарий - пишет что коментарий потеряется, т.к. git не поддерживает.

Но вообще vc-git.el всё равно действует &quot;внутри&quot; обёртки vc.el. Вот и в данном случае - vc.el до и после действий vc-git.el пишет свой сообщения, что сводит пользу патча почти на нет - мало кто догадается по такому случаю заглянуть в &quot;*Messages*&quot;.

Ещё уточним, что хотелось или хватит? Кстати заранее сообщаю, что общаться с апстримом vc-git.el мне здоровья не хватит.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84914</commentid>
    <comment_count>4</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2009-01-25 09:17:19 +0300</bug_when>
    <thetext>Посмотрел ещё раз. В общем, там адъ и погибель, всё плохо и надеяться неначто (кроме самого себя) :-)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2919</attachid>
            <date>2008-09-17 20:23:57 +0400</date>
            <delta_ts>2008-09-17 20:23:57 +0400</delta_ts>
            <desc>vc-git.el warn patch</desc>
            <filename>vc-git-warn.patch</filename>
            <type>text/plain</type>
            <size>558</size>
            <attacher name="Evgenii Terechkov">evg</attacher>
            
              <data encoding="base64">ZGlmZiAtcnVOIC91c3Ivc2hhcmUvZW1hY3Mvc2l0ZS1saXNwL3ZjLWdpdC5lbCAvaG9tZS9ldmcv
LmVtYWNzLmQvdmMtZ2l0LmVsCi0tLSAvdXNyL3NoYXJlL2VtYWNzL3NpdGUtbGlzcC92Yy1naXQu
ZWwJMjAwOC0wNy0xMCAwMToxMDo0MCArMDgwMAorKysgL2hvbWUvZXZnLy5lbWFjcy5kL3ZjLWdp
dC5lbAkyMDA4LTA5LTE4IDAwOjE1OjE3ICswODAwCkBAIC0xNjQsNiArMTY0LDcgQEAKIAogKGRl
ZnVuIHZjLWdpdC1yZWdpc3RlciAoZmlsZSAmb3B0aW9uYWwgcmV2IGNvbW1lbnQpCiAgICJSZWdp
c3RlciBGSUxFIGludG8gdGhlIGdpdCB2ZXJzaW9uLWNvbnRyb2wgc3lzdGVtLiIKKyAgKGlmIGNv
bW1lbnQgKG1lc3NhZ2UgIk5vdGU6IHlvdXIgY29tbWVudCB3aWxsIGJlIGxvc3QsIGNhdXNlIGdp
dCBkb2VzIG5vdCBzdXBwb3J0IGNvbW1lbnRzIGZvciBhZGRpbmcgZmlsZXMuIikpCiAgICh2Yy1n
aXQtLXJ1bi1jb21tYW5kIGZpbGUgInVwZGF0ZS1pbmRleCIgIi0tYWRkIiAiLS0iKSkKIAogKGRl
ZnVuIHZjLWdpdC1wcmludC1sb2cgKGZpbGUgJm9wdGlvbmFsIGJ1ZmZlcikK
</data>

          </attachment>
      

    </bug>

</bugzilla>