Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Autorevision.h.new ignore #4018

Closed
wzdev-ci opened this issue May 20, 2013 · 24 comments
Closed

Autorevision.h.new ignore #4018

wzdev-ci opened this issue May 20, 2013 · 24 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_patch (an actual patch, not a request for one) | by wz@...


This file causes git pull to fail. It appears that it may be ignored without any issues.

diff --git a/.gitignore b/.gitignore
index d7ecb57..3e6c012 100644
--- a/.gitignore
+++ b/.gitignore
@@ -85,6 +85,7 @@ win32/__BUILD_CONFIG.USER
 #*lexer.[ch]
 #*parser.[ch]
 /src/autorevision.h
+/src/autorevision.h.new
 /autorevision.tmp
 /src/autorevision.cache
 *moc.h

Issue migrated from trac:4018 at 2022-04-16 10:58:12 -0700

@wzdev-ci
Copy link
Contributor Author

dak180 changed component from other to Build System Issues

@wzdev-ci
Copy link
Contributor Author

dak180 changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

dak180 changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

per <per@...> changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

per <per@...> changed owner from `` to per <per@wz2100.net>

@wzdev-ci
Copy link
Contributor Author

per <per@...> changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

per <per@...> committed [667026]


In Warzone2100/warzone2100@667026a:

#CommitTicketReference repository="" revision="667026afa91a023c164462a860d2799bc75a2517"
Add autorevision.h.new to git ignore list. Closes #4018.

@wzdev-ci
Copy link
Contributor Author

vexed changed status from closed to reopened

@wzdev-ci
Copy link
Contributor Author

vexed changed resolution from fixed to ``

@wzdev-ci
Copy link
Contributor Author

vexed commented


How can this file cause git pull to fail, if there is no file named autorevision.h.new in the repo ?

$ git ls-files autorevision.h.new --error-unmatch
error: pathspec 'autorevision.h.new' did not match any file(s) known to git.

So 667026afa91a023c164462a860d2799bc75a2517 wasn't needed at all...

@wzdev-ci
Copy link
Contributor Author

wz@... commented


It depends on your merge configuration. --no-ff fails if there are new files in the tree.

At work it's a rule because we've gotten into arguments about the history before. It's much nicer for every developer to have the same repository history which rebase gives you.

@wzdev-ci
Copy link
Contributor Author

vexed commented


Doesn't the question become, why are you trying to merge in a unclean directory ?

I just don't like adding things to ignore, unless it really is needed, as those things tend to get lost.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 26, 2013

anonymous commented


Replying to Warzone2100/old-trac-import#4018 (comment:6):

Doesn't the question become, why are you trying to merge in a unclean directory ?

The unclean bit (autorevision.h.new) is created by the Warzone make file. If the make file is going to leave things laying around it seems perfectly appropriate to add those pieces to the git ignore file.

@wzdev-ci
Copy link
Contributor Author

Cyp commented


If it's created automatically, then adding to .gitignore is probably appropriate. I don't seem to have any autorevision.h.new anywhere, though, so not sure why you ended up with one.

For files that aren't ever autogenerated, there's: http://stackoverflow.com/questions/1753070/git-ignore-files-only-locally

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented May 26, 2013

wz@... commented


Replying to Warzone2100/old-trac-import#4018 (comment:8):

If it's created automatically, then adding to .gitignore is probably appropriate. I don't seem to have any autorevision.h.new anywhere, though, so not sure why you ended up with one.

autorevision.h autorevision.cache:
	cd $(top_srcdir) && ./build_tools/autorevision -t h -o $(abs_builddir)/autorevision.cache > $(abs_builddir)/autorevision.h.new
	cmp -s autorevision.h.new autorevision.h || mv -f autorevision.h.new autorevision.h

If the compare is true (autorevision.h is the newest version) then autorevision.h.new is left hanging around.

@wzdev-ci
Copy link
Contributor Author

vexed commented


So, it is a sloppy script at fault.
Scripts should clean up after their own mess.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 31, 2013

rbt commented


Replying to Warzone2100/old-trac-import#4018 (comment:10):

So, it is a sloppy script at fault.
Scripts should clean up after their own mess.

This will cleanup the autorevision.h.new file when it is not moved to replace autorevision.h.

*** src/Makefile.am.orig	2013-08-31 21:24:36.616388632 -0400
--- src/Makefile.am	2013-08-31 21:25:14.704615178 -0400
***************
*** 14,20 ****
  
  autorevision.h autorevision.cache:
  	cd $(top_srcdir) && ./build_tools/autorevision -t h -o $(abs_builddir)/autorevision.cache > $(abs_builddir)/autorevision.h.new
! 	cmp -s autorevision.h.new autorevision.h || mv -f autorevision.h.new autorevision.h
  
  CLEANFILES = \
  	$(BUILT_SOURCES) \
--- 14,20 ----
  
  autorevision.h autorevision.cache:
  	cd $(top_srcdir) && ./build_tools/autorevision -t h -o $(abs_builddir)/autorevision.cache > $(abs_builddir)/autorevision.h.new
! 	cmp -s autorevision.h.new autorevision.h && rm autorevision.h.new || mv -f autorevision.h.new autorevision.h
  
  CLEANFILES = \
  	$(BUILT_SOURCES) \

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Sep 21, 2013

vexed commented


Replying to Warzone2100/old-trac-import#4018 (comment:11):

Replying to Warzone2100/old-trac-import#4018 (comment:10):

So, it is a sloppy script at fault.
Scripts should clean up after their own mess.

This will cleanup the autorevision.h.new file when it is not moved to replace autorevision.h.

*** src/Makefile.am.orig	2013-08-31 21:24:36.616388632 -0400
--- src/Makefile.am	2013-08-31 21:25:14.704615178 -0400
***************
*** 14,20 ****
  
  autorevision.h autorevision.cache:
  	cd $(top_srcdir) && ./build_tools/autorevision -t h -o $(abs_builddir)/autorevision.cache > $(abs_builddir)/autorevision.h.new
! 	cmp -s autorevision.h.new autorevision.h || mv -f autorevision.h.new autorevision.h
  
  CLEANFILES = \
  	$(BUILT_SOURCES) \
--- 14,20 ----
  
  autorevision.h autorevision.cache:
  	cd $(top_srcdir) && ./build_tools/autorevision -t h -o $(abs_builddir)/autorevision.cache > $(abs_builddir)/autorevision.h.new
! 	cmp -s autorevision.h.new autorevision.h && rm autorevision.h.new || mv -f autorevision.h.new autorevision.h
  
  CLEANFILES = \
  	$(BUILT_SOURCES) \

What did you use to generate that patch file, it won't apply when I try it.

@wzdev-ci
Copy link
Contributor Author

rbt commented


diff -c

@wzdev-ci
Copy link
Contributor Author

vexed changed status from reopened to closed

@wzdev-ci
Copy link
Contributor Author

vexed changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

vexed commented


cleanup the autorevision.h.new file when it is not moved to replace autorevision.h

Patch by rbt
closes #4018

Changeset: a81330d516ef6562fbe8f7a0efe2ff16d58c6db0

@wzdev-ci
Copy link
Contributor Author

vexed commented


cleanup the autorevision.h.new file when it is not moved to replace autorevision.h

Patch by rbt
closes #4018

Changeset: a81330d516ef6562fbe8f7a0efe2ff16d58c6db0

1 similar comment
@wzdev-ci
Copy link
Contributor Author

vexed commented


cleanup the autorevision.h.new file when it is not moved to replace autorevision.h

Patch by rbt
closes #4018

Changeset: a81330d516ef6562fbe8f7a0efe2ff16d58c6db0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant