all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Commit mistake?
@ 2018-11-25 13:22 Stephen Berman
  2018-11-25 16:34 ` Eli Zaretskii
  2018-11-25 16:49 ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: Stephen Berman @ 2018-11-25 13:22 UTC (permalink / raw)
  To: emacs-devel

I just committed a fix for bug#33423 to master (29ef7d1), and somehow
the commit included an entire unrelated file, nt/gnulib.mk.  I don't
know how this happened, because that is a file I'm not aware of ever
having touched, let alone changed (it's a generated file).  I don't know
if this is a problem but if it is, can someone who knows what to do
please take care of it, or tell me how to?  And also tell me how to
avoid a possible reoccurrence of in future commits?  Thanks and sorry
for the nuisance.

Steve Berman



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Commit mistake?
  2018-11-25 13:22 Commit mistake? Stephen Berman
@ 2018-11-25 16:34 ` Eli Zaretskii
  2018-11-25 16:47   ` Stephen Berman
  2018-11-25 16:49 ` Stefan Monnier
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2018-11-25 16:34 UTC (permalink / raw)
  To: Stephen Berman; +Cc: emacs-devel

> From: Stephen Berman <stephen.berman@gmx.net>
> Date: Sun, 25 Nov 2018 14:22:13 +0100
> 
> I just committed a fix for bug#33423 to master (29ef7d1), and somehow
> the commit included an entire unrelated file, nt/gnulib.mk.  I don't
> know how this happened, because that is a file I'm not aware of ever
> having touched, let alone changed (it's a generated file).  I don't know
> if this is a problem but if it is, can someone who knows what to do
> please take care of it, or tell me how to?

Just delete that file, it should not be in the repository.  "git rm"
etc. (Let me know if you need more detailed instructions.)

> And also tell me how to avoid a possible reoccurrence of in future
> commits?  Thanks and sorry for the nuisance.

The only reliable way I know of is to say "git show" after committing
and before pushing, and review the diffs carefully making sure the
commit only includes what I meant it to.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Commit mistake?
  2018-11-25 16:34 ` Eli Zaretskii
@ 2018-11-25 16:47   ` Stephen Berman
  2018-11-25 17:06     ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Berman @ 2018-11-25 16:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Sun, 25 Nov 2018 18:34:50 +0200 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Stephen Berman <stephen.berman@gmx.net>
>> Date: Sun, 25 Nov 2018 14:22:13 +0100
>> 
>> I just committed a fix for bug#33423 to master (29ef7d1), and somehow
>> the commit included an entire unrelated file, nt/gnulib.mk.  I don't
>> know how this happened, because that is a file I'm not aware of ever
>> having touched, let alone changed (it's a generated file).  I don't know
>> if this is a problem but if it is, can someone who knows what to do
>> please take care of it, or tell me how to?
>
> Just delete that file, it should not be in the repository.  "git rm"
> etc. (Let me know if you need more detailed instructions.)

Do you mean a new commit using "git rm" on my local branch and then
pushing it to master at Savannah, or will that file there be removed
otherwise?

>> And also tell me how to avoid a possible reoccurrence of in future
>> commits?  Thanks and sorry for the nuisance.
>
> The only reliable way I know of is to say "git show" after committing
> and before pushing, and review the diffs carefully making sure the
> commit only includes what I meant it to.

Yes, I must have been careless and overlooked that file (though I don't
know how it got added to my local branch in the first place).  Sorry
again, and thanks for the advice.

Steve Berman



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Commit mistake?
  2018-11-25 13:22 Commit mistake? Stephen Berman
  2018-11-25 16:34 ` Eli Zaretskii
@ 2018-11-25 16:49 ` Stefan Monnier
  2018-11-25 17:09   ` Stephen Berman
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2018-11-25 16:49 UTC (permalink / raw)
  To: emacs-devel

> And also tell me how to avoid a possible reoccurrence of in future
> commits?

Hard to help if you don't give us at least a hint of what commands/UI
you used to do the commit.  Did you use "git commit" on the command
line, or Magit, or VC, or something yet different?


        Stefan




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Commit mistake?
  2018-11-25 16:47   ` Stephen Berman
@ 2018-11-25 17:06     ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2018-11-25 17:06 UTC (permalink / raw)
  To: Stephen Berman; +Cc: emacs-devel

> From: Stephen Berman <stephen.berman@gmx.net>
> Cc: emacs-devel@gnu.org
> Date: Sun, 25 Nov 2018 17:47:46 +0100
> 
> > Just delete that file, it should not be in the repository.  "git rm"
> > etc. (Let me know if you need more detailed instructions.)
> 
> Do you mean a new commit using "git rm" on my local branch and then
> pushing it to master at Savannah

Yes.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Commit mistake?
  2018-11-25 16:49 ` Stefan Monnier
@ 2018-11-25 17:09   ` Stephen Berman
  2018-11-25 18:16     ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Berman @ 2018-11-25 17:09 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On Sun, 25 Nov 2018 11:49:22 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:

>> And also tell me how to avoid a possible reoccurrence of in future
>> commits?
>
> Hard to help if you don't give us at least a hint of what commands/UI
> you used to do the commit.  Did you use "git commit" on the command
> line, or Magit, or VC, or something yet different?

I used VC.  The file was listed in *vc-dir*, but it has been for ages
and was never a problem before.  But this time after I committed the
change the status of that file also changed to "up-to-date", which
suprised me but, unfortunately, didn't stop me from pressing `P' to push
the commit (since, again, that file had "always" been there but never
got into a previous commit).  I know I should have stopped to think, and
hopefully I will in future, but I wonder how that file became part of
the commit in the first place (again, I never knowingly touched it).

Steve Berman



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Commit mistake?
  2018-11-25 17:09   ` Stephen Berman
@ 2018-11-25 18:16     ` Stefan Monnier
  2018-11-25 18:42       ` Stephen Berman
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2018-11-25 18:16 UTC (permalink / raw)
  To: Stephen Berman; +Cc: emacs-devel

> I used VC.  The file was listed in *vc-dir*, but it has been for ages
> and was never a problem before.

Hmm... IIUC it was there because it's a file we used to generate but we
don't generate any more, so it's not ignored by .gitignore any more
(i.e. you should just `rm` it).

I recommend you don't ignore files marked as "unknown" in *vc-dir*:
they're a sign that there's a problem somewhere and it should be fixed
either by removing the file, or renaming it, or by changing .gitignore.

> But this time after I committed the change the status of that file
> also changed to "up-to-date", which suprised me but, unfortunately,

Do you remember exactly how you caused the commit?  I guess you used `v`
in *vc-dir*, but did you first select the files you wanted to commit, or
did you rely on the position of point to specify the file(s) (maybe
with point placed on a directory)?


        Stefan



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Commit mistake?
  2018-11-25 18:16     ` Stefan Monnier
@ 2018-11-25 18:42       ` Stephen Berman
  2018-11-25 19:53         ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen Berman @ 2018-11-25 18:42 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On Sun, 25 Nov 2018 13:16:35 -0500 Stefan Monnier <monnier@IRO.UMontreal.CA> wrote:

>> I used VC.  The file was listed in *vc-dir*, but it has been for ages
>> and was never a problem before.
>
> Hmm... IIUC it was there because it's a file we used to generate but we
> don't generate any more, so it's not ignored by .gitignore any more
> (i.e. you should just `rm` it).

Yes, I've since done that.

> I recommend you don't ignore files marked as "unknown" in *vc-dir*:
> they're a sign that there's a problem somewhere and it should be fixed
> either by removing the file, or renaming it, or by changing .gitignore.

Thanks, I'll bear that in mind.

>> But this time after I committed the change the status of that file
>> also changed to "up-to-date", which suprised me but, unfortunately,
>
> Do you remember exactly how you caused the commit?  I guess you used `v`
> in *vc-dir*, but did you first select the files you wanted to commit, or
> did you rely on the position of point to specify the file(s) (maybe
> with point placed on a directory)?

I'm pretty sure I marked only the file I wanted to commit and then typed
`v' -- that's what I habitually do -- but I can't categorically rule out
that I may have just typed `v' without marking.  I also don't recall
seeing the unwanted file in the list of files shown when editing the
commit message, but here too, I may have overlooked it.

Steve



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Commit mistake?
  2018-11-25 18:42       ` Stephen Berman
@ 2018-11-25 19:53         ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2018-11-25 19:53 UTC (permalink / raw)
  To: Stephen Berman; +Cc: emacs-devel

> I'm pretty sure I marked only the file I wanted to commit and then typed
> `v' -- that's what I habitually do -- but I can't categorically rule out
> that I may have just typed `v' without marking.

It sounds like you "do it right", and it was just an accident.
I wouldn't worry much more about it,


        Stefan



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-11-25 19:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-25 13:22 Commit mistake? Stephen Berman
2018-11-25 16:34 ` Eli Zaretskii
2018-11-25 16:47   ` Stephen Berman
2018-11-25 17:06     ` Eli Zaretskii
2018-11-25 16:49 ` Stefan Monnier
2018-11-25 17:09   ` Stephen Berman
2018-11-25 18:16     ` Stefan Monnier
2018-11-25 18:42       ` Stephen Berman
2018-11-25 19:53         ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.