# git commit broken ?

3 messages from 2006-04-10 to 2006-04-10. Participants: Franck Bui-Huu, Junio C Hamano.
Thread: https://gitlist.dev/t/3844

## Franck Bui-Huu, 2006-04-10 08:02

Subject: git commit broken ?
Message-ID: <cda58cb80604100102p92e5258qf33a128f75f1b088@mail.gmail.com>
URL: https://gitlist.dev/e/cda58cb80604100102p92e5258qf33a128f75f1b088%40mail.gmail.com

```
It seems that "git commit -a -c ORIG_HEAD" command do not work as
expected.

Here is an example:

	$ ls
	a b c

	$ git status
	nothing to commit

	$ echo "good modif" > a
	$ echo "temp modif" > c
	$ git-update-index a
	$ git commit -m "work in prog"

	$ git reset --soft HEAD^
	$ git status
	#
	# Updated but not checked in:
	#   (will commit)
	#
	#       modified: a
	#
	#
	# Changed but not updated:
	#   (use git-update-index to mark for commit)
	#
	#       modified: c
	#
	
	$ git commit -a -c ORIG_HEAD
	$ git status
	nothing to commit

So it seems that c has been commmited this time...Is it the expected
behaviour ?

My git version:

	$ git --version
	git version 1.3.0.rc3.g0ed4

Thanks
--
               Franck

```

## Junio C Hamano, 2006-04-10 08:15

Subject: Re: git commit broken ?
Message-ID: <7vhd51alti.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vhd51alti.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <cda58cb80604100102p92e5258qf33a128f75f1b088@mail.gmail.com>

```
"Franck Bui-Huu" <vagabon.xyz@gmail.com> writes:

> It seems that "git commit -a -c ORIG_HEAD" command do not work as
> expected.
>
> 	$ git commit -a -c ORIG_HEAD
> 	$ git status
> 	nothing to commit
>
> So it seems that c has been commmited this time...Is it the expected
> behaviour ?

You said "git commit -a" to tell it to commit all your changes
in your working tree, using "-c ORIG_HEAD" which means "take the
commit log message and authorship information from that commit".

So I do not understand what else, other than both a and c
getting committed (hence subsequent "git status" to report
"nothing to commit'), you are expecting...

```

## Franck Bui-Huu, 2006-04-10 08:24

Subject: Re: git commit broken ?
Message-ID: <cda58cb80604100124k165307c3td84be984e607c6ae@mail.gmail.com>
URL: https://gitlist.dev/e/cda58cb80604100124k165307c3td84be984e607c6ae%40mail.gmail.com
In-Reply-To: <7vhd51alti.fsf@assigned-by-dhcp.cox.net>

```
2006/4/10, Junio C Hamano <junkio@cox.net>:
> "Franck Bui-Huu" <vagabon.xyz@gmail.com> writes:
>
> > It seems that "git commit -a -c ORIG_HEAD" command do not work as
> > expected.
> >
> >       $ git commit -a -c ORIG_HEAD
> >       $ git status
> >       nothing to commit
> >
> > So it seems that c has been commmited this time...Is it the expected
> > behaviour ?
>
> You said "git commit -a" to tell it to commit all your changes
> in your working tree, using "-c ORIG_HEAD" which means "take the
> commit log message and authorship information from that commit".
>
> So I do not understand what else, other than both a and c
> getting committed (hence subsequent "git status" to report
> "nothing to commit'), you are expecting...

oops, I forgot that switch, sorry for the noise.

Thanks
--
               Franck

```
