git: avoiding merges, rebasing
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[adding the git list]
According to Bruno Haible on 10/2/2007 5:50 AM:
Quoted 8 lines
Hello Benoit,
Quoted 6 lines
Quoted 6 lines
$ git stash $ git pull $ git stash apply $ git stash clean ; typo! $ git stash clear ; fatal correction to typo!
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
and lost 20 modified files. Well, not really lost. Just took me a while to
I don't really see how and why you "lost 20 modified files".
I lost modifications to 20 files. "git stash clean" moved these modifications into a stash named "clean", and "git stash clear" killed it.
While we're at it, I wish 'git stash clear' would take an optional argument that says which stash(es) to clear, rather than blindly clearing the entire stash.
Short of that, there's always manually editing .git/logs/refs/stash, to delete the lines to the stashes you no longer need, without killing the ones you want kept.
- --
Don't work too hard, make some time for fun as well!
Eric Blake [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHAjaY84KuGfSFAYARAjqCAJ9qRzVxWpujzTGU9zdDi1UkQiSLggCeMien LJhXdjlNHQYv0BUMCyZQo20=
=xPKQ
-----END PGP SIGNATURE-----
making "git stash" safer to use
Hi,
Through a simple typo I lost modifications to 20 files:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
$ git stash $ git pull $ git stash apply $ git stash clean # typo! $ git stash clear # fatal correction to typo!
It is just too easy to lose your modifications by using "git stash".
Eric Blake further says:
Quoted 3 lines
While we're at it, I wish 'git stash clear' would take an optional argument that says which stash(es) to clear, rather than blindly clearing the entire stash.
It would help if git would store which of the stashes were applied since they were created and which were not. A stash that was not yet applied must be considered "precious", whereas a stash that was applied is redundant, right?
According these lines, how about
1) changing "git stash clear" to remove only the redundant stashes, (or alternatively: let it fail if there is at least one precious stash),
2) adding an option -f, so that "git stash -f clear" clears all stashes, including the precious ones.
The rationale is that humans are bad at remembering the state of something. Therefore instead of having a command that is commonly used in one state and dangerous in the other state, better have two different commands - one for the common case, and one for the dangerous one. Like "rm" and "rm -f".
Bruno
Re: making "git stash" safer to use
Quoted 8 lines · Bruno Haible
Quoted 3 lines
While we're at it, I wish 'git stash clear' would take an optional argument that says which stash(es) to clear, rather than blindly clearing the entire stash.
It would help if git would store which of the stashes were applied since they were created and which were not. A stash that was not yet applied must be considered "precious", whereas a stash that was applied is redundant, right?
Wrong. I would say all stash entries are precious unless you explicitly say "I'm done with it". The problem is that we do not have a way to say it explicitly.
Re: making "git stash" safer to use
In reply to Bruno HaibleQuoted 9 lines
Through a simple typo I lost modifications to 20 files:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
$ git stash $ git pull $ git stash apply $ git stash clean # typo! $ git stash clear # fatal correction to typo!It is just too easy to lose your modifications by using "git stash".
What makes it most dangerous is that there is no differentiation between a name and a command in the same position. I'd argue that either the command should be mandatory:
git stash save mywork
git stash apply mywork
git stash clear mywork
git stash mywork # error
(we can still keep today's shortcuts "git stash" and "git stash apply", but only for the un-named case),
or that the command should be of the option type:
git stash mywork
git stash --apply mywork
git stash --clear mywork
-j.
Re: making "git stash" safer to use
Quoted 9 lines · Joachim B Haga
What makes it most dangerous is that there is no differentiation between a name and a command in the same position. I'd argue that either the command should be mandatory:
git stash save mywork
git stash apply mywork
git stash clear mywork
git stash mywork # error
Quoted 8 lines
(we can still keep today's shortcuts "git stash" and "git stash apply", but only for the un-named case),
or that the command should be of the option type:
git stash mywork
git stash --apply mywork
git stash --clear mywork
Hear, hear! I vote for the latter. The former is still better than the current state, though.
Signature · 1 line
David Kastrup, Kriemhildstr. 15, 44793 Bochum
stash clear, was Re: git: avoiding merges, rebasing
In reply to Eric BlakeHi,
Quoted 16 lines · Eric Blake
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1[adding the git list]
According to Bruno Haible on 10/2/2007 5:50 AM:
Quoted 10 lines
Hello Benoit,
Quoted 8 lines
Quoted 8 lines
$ git stash $ git pull $ git stash apply $ git stash clean ; typo! $ git stash clear ; fatal correction to typo!and lost 20 modified files. Well, not really lost. Just took me a while to
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
I don't really see how and why you "lost 20 modified files".
I lost modifications to 20 files. "git stash clean" moved these modifications into a stash named "clean", and "git stash clear" killed it.
While we're at it, I wish 'git stash clear' would take an optional argument that says which stash(es) to clear, rather than blindly clearing the entire stash.
I'd rather avoid "enhancing" stash clear. IMHO it is a little misdesigned, making it way too easy to hang yourself.
Instead, how about writing a stash pop? "git stash pop [<stash>]". It would literally just call git stash apply && git reflog delete. Should not be too difficult, now that I provided "git reflog delete" ;-)
Maybe even deprecating "git stash clear", or doing away with it altogether.
Ciao,
Dscho
Re: stash clear, was Re: git: avoiding merges, rebasing
Quoted 6 lines · Johannes Schindelin
Instead, how about writing a stash pop? "git stash pop [<stash>]". It would literally just call git stash apply && git reflog delete. Should not be too difficult, now that I provided "git reflog delete" ;-)
Maybe even deprecating "git stash clear", or doing away with it altogether.
That would match my usual usage well.
Actually, I really like the way the tla (arch) "undo" and "redo" commands work: "tla undo" is roughly equivalent to "git stash", but by default chooses a name with an appended integer which is one greater than the greatest existing "stash" (to use git terminology). "tla redo" by default applies the last saved value and deletes it. So basically push and pop. Usually, of course, you only use one level, but on the occasions when you want more, it feels very natural.
I dunno how this would work with stash, but push/pop functionality would be good...
-Miles
Signature · 1 line
Saa, shall we dance? (from a dance-class advertisement)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Benoit SIGOURE
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
Is there some shorthand for this process, such as a "git-recover" command?
you can run git fsck and look for
a dangling commit (which can be inspected with git show <sha1>) where you are most likely to find your stash (unless you run git-gc or this sort of thing).
Quoted 4 lines
Quoted 2 lines
Cool! This information would be worth mentioning in the git-stash manual page or in an FAQ. It can be a real life-saver.
True. Propose a patch :-)
Here's a proposed patch.
Documentation/git-stash.txt renamed from Documentation/git-stash.txt.bak +22 -0
@@ -154,6 +154,28 @@ ... continue hacking ... ---------------------------------------------------------------- +Recovering a lost stash:: + +`git stash clear` clears all stashes without asking for confirmation. +If you did not intend this, you can recover the lost changes by running +`git fsck`, looking for dangling commits, and using `git show <commit>`. ++ +---------------------------------------------------------------- +... hack hack hack ... +$ git stash +... hack no coffee hack ... +$ git stash clear +... panic panic ... +$ git fsck +dangling commit f62c4fa05422fd4fb8610bdb02a7160121657893 +dangling commit 773024d2ffc33ac80baddcf2b673535b627af0da +dangling commit 9e509390a2b26b562f3b008eacc65b6765d48339 +$ git show 773024d2ffc33ac80baddcf2b673535b627af0da +$ git diff 773024d2ffc33ac80baddcf2b673535b627af0da > recovered.diff +$ patch -p0 -R < recovered.diff +... continue hacking ... +---------------------------------------------------------------- + SEE ALSO -------- gitlink:git-checkout[1],
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
[as usual, I forgot the attachment...]
Quoted 7 lines · Benoit SIGOURE
Quoted 5 lines · Bruno Haible
Quoted 4 lines
it should be
possible to create a custom [merge "cl-merge"] in your git config file, which points to a script designed specifically for resolving changelog conflicts
Quoted 6 lines
Quoted 3 lines
I would love such a script, instead of constantly having to do conflict resolution at the top of ChangeLog.
So would I. I've had this in my TODO list for a long time so if no one else is willing to give it a try, I can try, but it won't be before next week because my schedule is quite busy until then.
I finally found some time to hack something and here is my git-merge-changelog Perl script. I tested it quickly and it seems to work fine. It will mess up the ChangeLog entries when a commit actually modifies an existing ChangeLog entry. It needs more testing but I'm just throwing this out in the wild for people that have interest in this to review. I will eventually come up with a solution for the commits modifying existing entries and a testsuite.
I'm CC-ing the Git ML just in case it interests some more people over there.
In order to use it, add the following to your ~/.gitconfig:
[merge "cl-merge"]
name = GNU-style ChangeLog merge driver
driver = /path/to/git-merge-changelog %O %A %B
(you can also add it to a specific working copy by adding it in .git/config instead)
Then, in the directory where the ChangeLog is, add a .gitattributes file with the following content:
ChangeLog merge=cl-merge
For more information, see man gitattributes.
Let me know if something goes wrong.
Cheers,
Signature · 2 lines
Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory
Hello Benoit,
Thanks for working on this. But this merge driver has a few major nits.
1) While my ChangeLog file was locally unmodified but some pulled in commits should modify it, "git pull" stopped and said:
ChangeLog: needs update
fatal: Entry 'ChangeLog' not uptodate. Cannot merge.
[I cannot swear on this, because I did not do a "git status" before the "git pull", but this is in a directory where I usually have no pending diffs.]
The ChangeLog in question is the one from gnulib
(git clone git://git.sv.gnu.org/gnulib).
2) This "merge driver" did much more than sorting in a merge: it sorted the entire file! In doing so,
- It changed the order of ChangeLog entries in a way that does not represent the historical commit order.
- For ChangeLog entries with multiple contributors, it shuffled around these extra contributors to other ChangeLog entries.
- Near the end of the file, it made a change that I cannot explain.
Find attached a context diff of all the bad changes that it did.
In my opinion, a merge driver should not do changes to the file except in the range of lines where the conflict occurred. For a ChangeLog driver, all uncommitted entries should be collected at the top of the file, because
1. ChangeLogs are kept in the order of historical commit in the central repository,
2. other developers always look at the top of the ChangeLog; if a ChangeLog entries is inserted second or third after some already present entries, the danger is too high that the change gets unnoticed.
So "git-merge-changelog OLD CURRENT OTHERS" should IMO do the following:
1) Collect the changes between OLD and HEAD (I don't know if that is CURRENT or OTHERS?), in two categories:
- added entries,
- changed and removed entries.
2) Back out the added entries, keeping only the changed and removed entries as modifications.
3) Do a normal merge between this and the pulled in remote branch (I don't know if that is OTHERS or CURRENT?). If that merge gives a conflict, bail out.
4) Insert the added entries at the top, in the same order as they were originally (no sorting).
Bruno
*** ChangeLog.orig 2007-10-09 13:16:56.000000000 +0200
--- ChangeLog 2007-10-09 13:12:29.000000000 +0200
***************
*** 3560,3569 ****
* doc/functions/lseek.texi: Update. Reported by Gary V. Vaughan <[email protected]>.
- 2007-05-28 Bruno Haible <[email protected]>
-
- * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
-
2007-05-31 Eric Blake <[email protected]>
* m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
--- 3560,3565 ----
***************
*** 3631,3636 ****
--- 3627,3636 ----
* m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on cross compiles.
+ 2007-05-28 Bruno Haible <[email protected]>
+
+ * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
+
2007-05-28 Eric Blake <[email protected]>
* modules/closein-tests (test_closein_LDADD): Support test on
***************
*** 4310,4319 ****
* doc/functions/vsnprintf.texi: Update.
* doc/functions/vsprintf.texi: Update.
- 2007-05-01 Bruno Haible <[email protected]>
-
- * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
-
2007-05-03 Paul Eggert <[email protected]>
* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
--- 4310,4315 ----
***************
*** 4333,4338 ****
--- 4329,4338 ----
2007-05-01 Bruno Haible <[email protected]>
+ * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
+
+ 2007-05-01 Bruno Haible <[email protected]>
+
* doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi. Reported by Eric Blake.
* doc/gnulib.texi (Function Substitutes): Update.
***************
*** 5358,5371 ****
* modules/crypto/rijndael-tests: Moved from ../.
* modules/crypto/sha1: Moved from ../.
- 2007-03-30 James Youngman <[email protected]>
-
- * tests/test-stat-time.c (prepare_test): use chmod() rather than
- rename() to change the ctime of a file (because ctime is unaffected
- by rename on jfs2 on AIX 5.1).
- (main): Start by doing cleanup, in case a previous run failed leaving
- test files behind.
-
2007-03-31 Bruno Haible <[email protected]>
Support old proprietary implementations of iconv.
--- 5358,5363 ----
***************
*** 5442,5447 ****
--- 5434,5447 ----
gnulib is available through git.
* doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
+ 2007-03-30 James Youngman <[email protected]>
+
+ * tests/test-stat-time.c (prepare_test): use chmod() rather than
+ rename() to change the ctime of a file (because ctime is unaffected
+ by rename on jfs2 on AIX 5.1).
+ (main): Start by doing cleanup, in case a previous run failed leaving
+ test files behind.
+
2007-03-30 Bruno Haible <[email protected]>
* lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
***************
*** 6010,6019 ****
* lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
- 2007-03-22 Bruno Haible <[email protected]>
-
- * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
-
2007-03-23 Paul Eggert <[email protected]>
* MODULES.html.sh (File system functions): New module write-any-file.
--- 6010,6015 ----
***************
*** 6032,6037 ****
--- 6028,6037 ----
2007-03-22 Bruno Haible <[email protected]>
+ * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
+
+ 2007-03-22 Bruno Haible <[email protected]>
+
* lib/poll.c (MSG_PEEK): New fallback definition.
2007-03-22 Bruno Haible <[email protected]>
***************
*** 6284,6293 ****
* build-aux/bootstrap (gnulib_name): New variable. (gnulib_tool_options): Use it.
- 2007-03-13 Simon Josefsson <[email protected]> -
- * tests/test-des.c: Use new namespace.
-
2007-03-15 Bruno Haible <[email protected]>
* lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
--- 6284,6289 ----
***************
*** 6364,6369 ****
--- 6360,6369 ----
* tests/test-rbtree_oset.c (main): Update.
* lib/gl_anytreehash_list1.h (add_to_bucket): Update.
+ 2007-03-13 Simon Josefsson <[email protected]> +
+ * tests/test-des.c: Use new namespace.
+
2007-03-13 Bruno Haible <[email protected]>
* tests/test-stdbool.c (i): Update after last patch.
***************
*** 6386,6395 ****
* build-aux/bootstrap: New file.
* build-aux/bootstrap.conf: New file, from coreutils.
- 2007-03-11 Bruno Haible <[email protected]> -
- * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
-
2007-03-12 Simon Josefsson <[email protected]>
* lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
--- 6386,6391 ----
***************
*** 6398,6403 ****
--- 6394,6403 ----
2007-03-11 Bruno Haible <[email protected]>
+ * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
+
+ 2007-03-11 Bruno Haible <[email protected]>
+
* m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
***************
*** 6519,6524 ****
--- 6519,6531 ----
* modules/dirname-tests (test_dirname_SOURCES): Remove redundant variable.
+ 2007-03-10 Bruno Haible <[email protected]>
+
+ * lib/stdio_.h (__attribute__): New macro.
+ (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
+ vsprintf): Specify __attribute__ __format__ for GCC.
+ Suggested by Eric Blake.
+
2007-03-09 Eric Blake <[email protected]>
and Matthew Woehlke <[email protected]> (tiny change)
***************
*** 6527,6539 ****
(GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit types are supported.
- 2007-03-10 Bruno Haible <[email protected]>
-
- * lib/stdio_.h (__attribute__): New macro.
- (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
- vsprintf): Specify __attribute__ __format__ for GCC.
- Suggested by Eric Blake.
-
2007-03-09 Bruno Haible <[email protected]>
* modules/printf-posix-tests: New file.
--- 6534,6539 ----
***************
*** 6661,6703 ****
* m4/printf.m4: Make the shell script snippets copy&pastable.
- 2007-03-02 Bruno Haible <[email protected]>
-
- * lib/netinet_in_.h: New file.
- * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
- is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
- * modules/netinet_in (Files): Add lib/netinet_in_.h.
- (Depends-on): Add absolute-header.
- (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
- into netinet/in.h.
-
- 2007-03-03 Bruno Haible <[email protected]>
-
- * lib/sys_select_.h: New file.
- * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
- is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
- * modules/sys_select (Files): Add lib/sys_select_.h.
- (Depends-on): Add absolute-header.
- (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
- into sys/select.h.
-
- 2007-03-02 Bruno Haible <[email protected]>
-
- * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
- before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
- values.
- * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
- <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
- HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
- * modules/sys_socket (Depends-on): Add absolute-header.
- (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
- HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
- (Include): Remove requirement of inclusion of <sys/types.h>.
-
- 2007-03-02 Bruno Haible <[email protected]>
-
- * lib/byteswap_.h (bswap_32): Fix formula.
-
2007-03-06 Bruno Haible <[email protected]>
* modules/sprintf-posix-tests: New file.
--- 6661,6666 ----
***************
*** 6934,6939 ****
--- 6897,6912 ----
2007-03-03 Bruno Haible <[email protected]>
+ * lib/sys_select_.h: New file.
+ * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
+ is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
+ * modules/sys_select (Files): Add lib/sys_select_.h.
+ (Depends-on): Add absolute-header.
+ (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
+ into sys/select.h.
+
+ 2007-03-03 Bruno Haible <[email protected]>
+
* modules/relocatable-prog (Depends-on): Add back progreloc's
dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
***************
*** 7019,7024 ****
--- 6992,7024 ----
2007-03-02 Bruno Haible <[email protected]>
+ * lib/netinet_in_.h: New file.
+ * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
+ is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
+ * modules/netinet_in (Files): Add lib/netinet_in_.h.
+ (Depends-on): Add absolute-header.
+ (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
+ into netinet/in.h.
+
+ 2007-03-02 Bruno Haible <[email protected]>
+
+ * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
+ before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
+ values.
+ * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
+ <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
+ HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
+ * modules/sys_socket (Depends-on): Add absolute-header.
+ (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
+ HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
+ (Include): Remove requirement of inclusion of <sys/types.h>.
+
+ 2007-03-02 Bruno Haible <[email protected]>
+
+ * lib/byteswap_.h (bswap_32): Fix formula.
+
+ 2007-03-02 Bruno Haible <[email protected]>
+
* modules/gettext (configure.ac): Require gettext infrastructure from version 0.16.1.
***************
*** 7116,7147 ****
* modules/xreadlink (Maintainer): Add my name.
* modules/xreadlink-with-size (Depends-on): Alphabetize.
- 2007-02-26 Ben Pfaff <[email protected]>
- Bruno Haible <[email protected]>
-
- * build-aux/install-reloc: Compile also c-ctype.c.
- * build-aux/relocatable.sh.in: New file.
- * doc/relocatable.texi: New file.
- * doc/relocatable-maint.texi: New file.
- * doc/gnulib.texi: Include relocatable-maint.texi.
- * lib/progreloc.c: Include unistd.h unconditionally.
- * lib/relocwrapper.c: Include unistd.h unconditionally.
- Include c-ctype.h.
- (add_dotbin): Use c_tolower.
- * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
- (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
- (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
- * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
- to m4/relocatable-lib.m4.
- (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
- RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
- (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
- require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
- SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
- * modules/relocatable: New file.
- * modules/relocatable-lib: New file.
- * modules/relocatable-script: New file.
-
2007-02-28 Bruno Haible <[email protected]>
Import --enable-relocatable infrastructure.
--- 7116,7121 ----
***************
*** 7175,7180 ****
--- 7149,7180 ----
xreadlink-with-size.
* lib/canonicalize.c (canonicalize_filename_mode): Update.
+ 2007-02-26 Ben Pfaff <[email protected]>
+ Bruno Haible <[email protected]>
+
+ * build-aux/install-reloc: Compile also c-ctype.c.
+ * build-aux/relocatable.sh.in: New file.
+ * doc/relocatable.texi: New file.
+ * doc/relocatable-maint.texi: New file.
+ * doc/gnulib.texi: Include relocatable-maint.texi.
+ * lib/progreloc.c: Include unistd.h unconditionally.
+ * lib/relocwrapper.c: Include unistd.h unconditionally.
+ Include c-ctype.h.
+ (add_dotbin): Use c_tolower.
+ * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
+ (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
+ (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
+ * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
+ to m4/relocatable-lib.m4.
+ (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
+ RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
+ (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
+ require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
+ SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
+ * modules/relocatable: New file.
+ * modules/relocatable-lib: New file.
+ * modules/relocatable-script: New file.
+
2007-02-25 Jim Meyering <[email protected]>
* build-aux/announce-gen: When complaining about excess arguments,
***************
*** 7277,7282 ****
--- 7277,7289 ----
* modules/stdint-tests: Likewise.
* modules/tls-tests: Likewise.
+ 2007-02-25 Jim Meyering <[email protected]>
+
+ Avoid conflicting types for 'unsetenv' on FreeBSD.
+ * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
+ conflicting with FreeBSD's (5.0 and 6.1) function declaration
+ in stdlib.h.
+
2007-02-24 Bruno Haible <[email protected]>
* lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
***************
*** 7294,7306 ****
* lib/isnanl.c: Remove all code. Just include isnan.c.
* modules/isnanl-nolibm (Files): Add lib/isnan.c.
- 2007-02-25 Jim Meyering <[email protected]>
-
- Avoid conflicting types for 'unsetenv' on FreeBSD.
- * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
- conflicting with FreeBSD's (5.0 and 6.1) function declaration
- in stdlib.h.
-
2007-02-24 Bruno Haible <[email protected]>
* modules/isnanl-nolibm-tests: New file.
--- 7301,7306 ----
***************
*** 8439,8469 ****
* modules/nanosleep (Link): New section.
* modules/readline (Link): New section.
- 2007-01-27 Bruno Haible <[email protected]>
-
- Enforce the use of gnulib modules for unportable <string.h> functions.
- * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
- (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
- (gl_HEADER_STRING_H_BODY): Require it.
- * lib/string_.h: If the gnulib module XYZ is not present, redefine
- the symbol XYZ to one that gives a link error.
- * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
- * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
- * modules/mempcpy (configure.ac): Likewise.
- * modules/memrchr (configure.ac): Likewise.
- * modules/stpcpy (configure.ac): Likewise.
- * modules/stpncpy (configure.ac): Likewise.
- * modules/strcase (configure.ac): Likewise.
- * modules/strcasestr (configure.ac): Likewise.
- * modules/strchrnul (configure.ac): Likewise.
- * modules/strdup (configure.ac): Likewise.
- * modules/strndup (configure.ac): Likewise.
- * modules/strnlen (configure.ac): Likewise.
- * modules/strpbrk (configure.ac): Likewise.
- * modules/strsep (configure.ac): Likewise.
- * modules/strstr (configure.ac): Likewise.
- * modules/strtok_r (configure.ac): Likewise.
-
2007-01-31 Jean-Louis Martineau <[email protected]> (tiny change)
* lib/gai_strerror.c (values): Add EAI_OVERFLOW.
--- 8439,8444 ----
***************
*** 8582,8587 ****
--- 8557,8587 ----
2007-01-27 Bruno Haible <[email protected]>
+ Enforce the use of gnulib modules for unportable <string.h> functions.
+ * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
+ (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
+ (gl_HEADER_STRING_H_BODY): Require it.
+ * lib/string_.h: If the gnulib module XYZ is not present, redefine
+ the symbol XYZ to one that gives a link error.
+ * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
+ * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
+ * modules/mempcpy (configure.ac): Likewise.
+ * modules/memrchr (configure.ac): Likewise.
+ * modules/stpcpy (configure.ac): Likewise.
+ * modules/stpncpy (configure.ac): Likewise.
+ * modules/strcase (configure.ac): Likewise.
+ * modules/strcasestr (configure.ac): Likewise.
+ * modules/strchrnul (configure.ac): Likewise.
+ * modules/strdup (configure.ac): Likewise.
+ * modules/strndup (configure.ac): Likewise.
+ * modules/strnlen (configure.ac): Likewise.
+ * modules/strpbrk (configure.ac): Likewise.
+ * modules/strsep (configure.ac): Likewise.
+ * modules/strstr (configure.ac): Likewise.
+ * modules/strtok_r (configure.ac): Likewise.
+
+ 2007-01-27 Bruno Haible <[email protected]>
+
* modules/unistr/base: Update.
2007-01-27 Bruno Haible <[email protected]>
***************
*** 9257,9264 ****
HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the maximum possible value for tv->tv_usec, rather than the minimum one.
- 2005-10-08 Martin Lambers <[email protected]> - 2005-10-08 Paul Eggert <[email protected]> 2007-01-16 Bruno Haible <[email protected]>
* modules/gettimeofday (Files): Add lib/gettimeofday.h.
--- 9257,9262 ----
***************
*** 9407,9449 ****
* modules/fchdir (Depends-on): Add absolute-header.
* modules/unistd (Depends-on): Likewise.
- 2006-12-30 Bruno Haible <[email protected]>
-
- * modules/fchdir: New file.
- * modules/unistd (Files): Add lib/unistd_.h.
- (Makefile.am): Generate unistd.h from unistd_.h.
- * lib/fchdir.c: New file.
- * lib/dirent_.h: New file.
- * lib/unistd_.h: New file.
- * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
- * m4/fchdir.m4: New file.
- * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
- (gl_HEADER_UNISTD): Invoke it.
- * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
- function.
- * lib/backupfile.c (opendir, closedir): Undefine.
- * lib/chown.c (open, close): Undefine.
- * lib/clean-temp.c (open, close): Undefine.
- * lib/copy-file.c (open, close): Undefine.
- * lib/execute.c (open, close): Undefine.
- * lib/fsusage.c (open, close): Undefine.
- * lib/gc-gnulib.c (open, close): Undefine.
- * lib/getcwd.c (opendir, closedir): Undefine.
- * lib/glob.c (opendir, closedir): Undefine.
- * lib/javacomp.c (open, close): Undefine.
- * lib/mountlist.c (open, close, opendir, closedir): Undefine.
- * lib/openat-proc.c (open, close): Undefine.
- * lib/pagealign_alloc.c (open, close): Undefine.
- * lib/pipe.c (open, close): Undefine.
- * lib/progreloc.c (open, close): Undefine.
- * lib/savedir.c (opendir, closedir): Undefine.
- * lib/utime.c (open, close): Undefine.
- * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
-
- 2007-01-10 Bruno Haible <[email protected]>
-
- * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
-
2007-01-12 Eric Blake <[email protected]>
Provide a robust <wchar.h>. Further simplifications are now
--- 9405,9410 ----
***************
*** 9474,9479 ****
--- 9435,9444 ----
* gnulib-tool (func_all_modules): Exclude all files inside the CVS directory.
+ 2007-01-10 Bruno Haible <[email protected]>
+
+ * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
+
2007-01-10 Paul Eggert <[email protected]>
Use @...@ consistently in lib/wctype_.h.
***************
*** 9842,9859 ****
* lib/fts.c: Likewise.
* modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
- 2006-12-25 Bruno Haible <[email protected]>
-
- * modules/utf8-ucs4-safe: New file.
- * lib/utf8-ucs4-safe.h: New file.
- * lib/unistr/utf8-ucs4-safe.c: New file.
-
- * modules/utf16-ucs4-safe: New file.
- * lib/utf16-ucs4-safe.h: New file.
- * lib/unistr/utf16-ucs4-safe.c: New file.
-
- * MODULES.html.sh (Unicode string functions): Add the new modules.
-
2007-01-08 Bruno Haible <[email protected]>
* modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
--- 9807,9812 ----
***************
*** 9884,9897 ****
(u16_uctomb): Use ucs4_t, uint16_t types.
* lib/unistr/ucs4-utf16.c: New file.
- 2006-12-25 Bruno Haible <[email protected]>
-
- * modules/unitypes: New file.
- * lib/unitypes.h: New file.
- * MODULES.html.sh (func_all_modules): New section "Unicode string
- functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
- this section. Add unitypes.
-
2007-01-08 Bruno Haible <[email protected]>
Avoid variable names that conflict with those from libtool.
--- 9837,9842 ----
***************
*** 10018,10027 ****
to follow. Don't set event bits that were not requested (except POLLERR and POLLHUP).
- 2007-01-01 Bruno Haible <[email protected]>
-
- * modules/lchmod (Include): Require lchmod.h, not lchown.h.
-
2007-01-03 Jim Meyering <[email protected]>
* modules/fts-lgpl (Depends-on): Add i-ring. Reported by Bruno Haible.
--- 9963,9968 ----
***************
*** 10033,10038 ****
--- 9974,9983 ----
2007-01-01 Bruno Haible <[email protected]>
+ * modules/lchmod (Include): Require lchmod.h, not lchown.h.
+
+ 2007-01-01 Bruno Haible <[email protected]>
+
* gnulib-tool (func_emit_copyright_notice): Bump year. (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
***************
*** 10049,10054 ****
--- 9994,10032 ----
* lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
+ 2006-12-30 Bruno Haible <[email protected]>
+
+ * modules/fchdir: New file.
+ * modules/unistd (Files): Add lib/unistd_.h.
+ (Makefile.am): Generate unistd.h from unistd_.h.
+ * lib/fchdir.c: New file.
+ * lib/dirent_.h: New file.
+ * lib/unistd_.h: New file.
+ * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
+ * m4/fchdir.m4: New file.
+ * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
+ (gl_HEADER_UNISTD): Invoke it.
+ * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
+ function.
+ * lib/backupfile.c (opendir, closedir): Undefine.
+ * lib/chown.c (open, close): Undefine.
+ * lib/clean-temp.c (open, close): Undefine.
+ * lib/copy-file.c (open, close): Undefine.
+ * lib/execute.c (open, close): Undefine.
+ * lib/fsusage.c (open, close): Undefine.
+ * lib/gc-gnulib.c (open, close): Undefine.
+ * lib/getcwd.c (opendir, closedir): Undefine.
+ * lib/glob.c (opendir, closedir): Undefine.
+ * lib/javacomp.c (open, close): Undefine.
+ * lib/mountlist.c (open, close, opendir, closedir): Undefine.
+ * lib/openat-proc.c (open, close): Undefine.
+ * lib/pagealign_alloc.c (open, close): Undefine.
+ * lib/pipe.c (open, close): Undefine.
+ * lib/progreloc.c (open, close): Undefine.
+ * lib/savedir.c (opendir, closedir): Undefine.
+ * lib/utime.c (open, close): Undefine.
+ * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
+
2006-12-30 Paul Eggert <[email protected]>
* gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
***************
*** 10121,10126 ****
--- 10099,10124 ----
* MODULES.html.sh (Support for building libraries and executables): Document it.
+ 2006-12-25 Bruno Haible <[email protected]>
+
+ * modules/utf8-ucs4-safe: New file.
+ * lib/utf8-ucs4-safe.h: New file.
+ * lib/unistr/utf8-ucs4-safe.c: New file.
+
+ * modules/utf16-ucs4-safe: New file.
+ * lib/utf16-ucs4-safe.h: New file.
+ * lib/unistr/utf16-ucs4-safe.c: New file.
+
+ * MODULES.html.sh (Unicode string functions): Add the new modules.
+
+ 2006-12-25 Bruno Haible <[email protected]>
+
+ * modules/unitypes: New file.
+ * lib/unitypes.h: New file.
+ * MODULES.html.sh (func_all_modules): New section "Unicode string
+ functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
+ this section. Add unitypes.
+
2006-12-25 Paul Eggert <[email protected]>
* gnulib-tool (SED): Remove, undoing previous change.
***************
*** 10363,10380 ****
* m4/ptrdiff_max.m4: Remove file.
- 2006-11-21 Bruno Haible <[email protected]>
-
- * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
- _AC_COMPUTE_INT.
- (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
- * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
- _AC_COMPUTE_INT.
- (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
- * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
- _AC_COMPUTE_INT.
- (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
-
2006-11-28 Jim Meyering <[email protected]>
* lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
--- 10361,10366 ----
***************
*** 10389,10400 ****
2006-11-27 Bruno Haible <[email protected]>
Paul Eggert <[email protected]>
! * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
!
! 2006-11-26 Bruno Haible <[email protected]>
!
! * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
! noinst_LTLIBRARIES.
2006-11-27 Paul Eggert <[email protected]>
Bruno Haible <[email protected]>
--- 10375,10381 ----
2006-11-27 Bruno Haible <[email protected]>
Paul Eggert <[email protected]>
! * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2006-11-27 Paul Eggert <[email protected]>
Bruno Haible <[email protected]>
***************
*** 10402,10407 ****
--- 10383,10393 ----
* lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0 if compiling with "gcc -ansi".
+ 2006-11-26 Bruno Haible <[email protected]>
+
+ * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
+ noinst_LTLIBRARIES.
+
2006-11-26 Paul Eggert <[email protected]>
Fix some incompatibilities with gcc -ansi -pedantic.
***************
*** 10420,10433 ****
Don't close an fd more than once. Identical atimes indicate success, not failure.
- 2006-11-22 Robinson Mittmann <[email protected]> (tiny change) -
- * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
-
2006-11-23 Jim Meyering <[email protected]>
* build-aux/announce-gen: New file. From coreutils.
2006-11-22 Jim Meyering <[email protected]>
Work around a compile-time error from the HP-UX 11.00 /bin/cc.
--- 10406,10419 ----
Don't close an fd more than once. Identical atimes indicate success, not failure.
2006-11-23 Jim Meyering <[email protected]>
* build-aux/announce-gen: New file. From coreutils.
+ 2006-11-22 Robinson Mittmann <[email protected]> (tiny change) +
+ * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
+
2006-11-22 Jim Meyering <[email protected]>
Work around a compile-time error from the HP-UX 11.00 /bin/cc.
***************
*** 10438,10448 ****
* m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
* m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
! 2006-11-20 Bruno Haible <[email protected]>
! * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
! changequote instead of pairs of brackets.
! Reported by Andreas Schwab <[email protected]>.
2006-11-21 Jim Meyering <[email protected]>
--- 10424,10440 ----
* m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
* m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
! 2006-11-21 Bruno Haible <[email protected]>
! * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
! _AC_COMPUTE_INT.
! (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
! * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
! _AC_COMPUTE_INT.
! (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
! * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
! _AC_COMPUTE_INT.
! (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2006-11-21 Jim Meyering <[email protected]>
***************
*** 10450,10455 ****
--- 10442,10453 ----
so as to remain compatible with older compilers. Patch from Michael Deutschmann.
+ 2006-11-20 Bruno Haible <[email protected]>
+
+ * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
+ changequote instead of pairs of brackets.
+ Reported by Andreas Schwab <[email protected]>.
+
2006-11-20 Paul Eggert <[email protected]>
* MODULES.html.sh (File system functions): Add openat.
***************
*** 10507,10519 ****
* modules/i-ring (Depends-on): Add verify. (License): Change to LGPL.
- 2006-11-16 Paul Eggert <[email protected]>
-
- * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
- * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
- and inttostr.h. Use snprintf rather than uinttostr, so that
- LGPLed code doesn't depend on GPLed.
-
2006-11-17 Paul Eggert <[email protected]>
* modules/inline (License): Change from GPL to LGPL.
--- 10505,10510 ----
***************
*** 10522,10527 ****
--- 10513,10525 ----
* modules/d-type (License): Switch to LGPL.
+ 2006-11-16 Paul Eggert <[email protected]>
+
+ * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
+ * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
+ and inttostr.h. Use snprintf rather than uinttostr, so that
+ LGPLed code doesn't depend on GPLed.
+
2006-11-15 Bruno Haible <[email protected]>
* m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
***************
*** 10573,10591 ****
* modules/c-ctype (License): Change to LGPL.
- 2006-11-12 Bruno Haible <[email protected]>
-
- * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
- AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
- for GNOME libraries, for which the include files are installed in
- subdirectories of $prefix/include.
-
- 2006-11-12 Bruno Haible <[email protected]>
-
- * m4/lib-link.m4: Require at least autoconf-2.54.
- (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
- name to underscores for the --with option.
-
2006-11-13 Bruno Haible <[email protected]>
* gnulib-tool (func_create_testdir): Set gl_source_base correctly in
--- 10571,10576 ----
***************
*** 10606,10611 ****
--- 10591,10609 ----
2006-11-12 Bruno Haible <[email protected]>
+ * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
+ AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
+ for GNOME libraries, for which the include files are installed in
+ subdirectories of $prefix/include.
+
+ 2006-11-12 Bruno Haible <[email protected]>
+
+ * m4/lib-link.m4: Require at least autoconf-2.54.
+ (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
+ name to underscores for the --with option.
+
+ 2006-11-12 Bruno Haible <[email protected]>
+
* gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of '$(top_srcdir)/build-aux/', taking into account the real auxdir.
***************
*** 10681,10696 ****
* lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
- 2006-11-09 Paul Eggert <[email protected]>
-
- * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
- (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
- (bind_textdomain_codeset) [! ENABLE_NLS]:
- Evaluate all the arguments. That way, callers get compatible behavior
- if the arguments have side effects. Also, it avoids some GCC
- diagnostics in some cases; Joel E. Denny reported problems when Bison
- was configured with --enable-gcc-warnigs.
-
2006-11-10 Jim Meyering <[email protected]>
* m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
--- 10679,10684 ----
***************
*** 10707,10712 ****
--- 10695,10710 ----
2006-11-09 Paul Eggert <[email protected]>
+ * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
+ (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
+ (bind_textdomain_codeset) [! ENABLE_NLS]:
+ Evaluate all the arguments. That way, callers get compatible behavior
+ if the arguments have side effects. Also, it avoids some GCC
+ diagnostics in some cases; Joel E. Denny reported problems when Bison
+ was configured with --enable-gcc-warnigs.
+
+ 2006-11-09 Paul Eggert <[email protected]>
+
* lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t. Problem reported by Matthew Woehlke.
***************
*** 10949,10959 ****
* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
- 2006-10-29 Bruno Haible <[email protected]>
-
- Make it compile in C++ mode.
- * lib/full-write.c (full_rw): Add a cast.
-
2006-11-01 Bruno Haible <[email protected]>
* gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
--- 10947,10952 ----
***************
*** 10989,10994 ****
--- 10982,10992 ----
2006-10-29 Bruno Haible <[email protected]>
Make it compile in C++ mode.
+ * lib/full-write.c (full_rw): Add a cast.
+
+ 2006-10-29 Bruno Haible <[email protected]>
+
+ Make it compile in C++ mode.
* lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
* lib/strnlen1.c (strnlen1): Cast memchr result.
* lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
***************
*** 11000,11013 ****
* lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
* lib/wait-process.c (register_slave_subprocess): Likewise.
- 2006-10-22 Bruno Haible <[email protected]>
-
- * modules/tsearch: New file.
- * lib/tsearch.h: New file.
- * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
- * m4/tsearch.m4: New file.
- * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
-
2006-10-29 Eric Blake <[email protected]>
* lib/arcfour.c: Assume config.h.
--- 10998,11003 ----
***************
*** 11190,11203 ****
* MODULES.html.sh: Remove uinttostr. It's not a module. Reported by Karl Berry.
- 2006-10-23 Bruno Haible <[email protected]>
-
- * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
-
2006-10-24 Bruno Haible <[email protected]>
* lib/gl_list.h: Use C comment style, not C++ comment style.
2006-10-23 Eric Blake <[email protected]>
* lib/getaddrinfo.c (includes): Add missing include.
--- 11180,11193 ----
* MODULES.html.sh: Remove uinttostr. It's not a module. Reported by Karl Berry.
2006-10-24 Bruno Haible <[email protected]>
* lib/gl_list.h: Use C comment style, not C++ comment style.
+ 2006-10-23 Bruno Haible <[email protected]>
+
+ * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
+
2006-10-23 Eric Blake <[email protected]>
* lib/getaddrinfo.c (includes): Add missing include.
***************
*** 11218,11223 ****
--- 11208,11234 ----
__argc, __argv from the declaration. (They are defined as macros on mingw.)
+ 2006-10-23 Jim Meyering <[email protected]>
+
+ * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
+ in place of snprintf.
+
+ * modules/inttostr (Files): Add lib/uinttostr.c.
+ * lib/uinttostr.c (inttostr): New file/function.
+ * lib/inttostr.h (uinttostr): Declare.
+ * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
+ * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
+ Add uinttostr.
+ * modules/getaddrinfo (Depends-on): Remove snprintf. Add inttostr.
+
+ 2006-10-22 Bruno Haible <[email protected]>
+
+ * modules/tsearch: New file.
+ * lib/tsearch.h: New file.
+ * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
+ * m4/tsearch.m4: New file.
+ * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
+
2006-10-22 Bruno Haible <[email protected]>
* doc/gnulib-intro.texi: New file.
***************
*** 11234,11252 ****
Change mostlyclean-local rule to avoid sh syntax error from bash versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
- 2006-10-23 Jim Meyering <[email protected]>
-
- * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
- in place of snprintf.
-
- * modules/inttostr (Files): Add lib/uinttostr.c.
- * lib/uinttostr.c (inttostr): New file/function.
- * lib/inttostr.h (uinttostr): Declare.
- * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
- * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
- Add uinttostr.
- * modules/getaddrinfo (Depends-on): Remove snprintf. Add inttostr.
-
2006-10-21 Paul Eggert <[email protected]>
* lib/canonicalize.c (ELOOP): Define if not already defined.
--- 11245,11250 ----
***************
*** 11290,11298 ****
* gnulib-tool (func_create_testdir): Don't include ftruncate and mountlist by default.
! 2006-10-16 Bruno Haible <[email protected]>
! * lib/c-strstr.c: Include c-strstr.h.
2006-10-18 Charles Wilson <[email protected]>
--- 11288,11306 ----
* gnulib-tool (func_create_testdir): Don't include ftruncate and mountlist by default.
! 2006-10-19 Paul Eggert <[email protected]>
! * lib/xstrtol.h: Include gettext.h.
! (_STRTOL_ERROR): Wrap English-language formats inside gettext.
! Problem reported by Eric Blake.
! * modules/xstrtol (Depends-on): Add gettext-h.
!
! 2006-10-19 Paul Eggert <[email protected]> (tiny change) !
! * lib/strftime.c (advance): New macro.
! (add): Use it to avoid adding 0 to a FILE *. FILE can be an
! incomplete type, so you can't add 0 to it. Problem and patch
! reported by Eelco Dolstra for dietlibc.
2006-10-18 Charles Wilson <[email protected]>
***************
*** 11312,11331 ****
* lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
- 2006-10-19 Paul Eggert <[email protected]>
-
- * lib/xstrtol.h: Include gettext.h.
- (_STRTOL_ERROR): Wrap English-language formats inside gettext.
- Problem reported by Eric Blake.
- * modules/xstrtol (Depends-on): Add gettext-h.
-
- 2006-10-19 Paul Eggert <[email protected]> (tiny change) -
- * lib/strftime.c (advance): New macro.
- (add): Use it to avoid adding 0 to a FILE *. FILE can be an
- incomplete type, so you can't add 0 to it. Problem and patch
- reported by Eelco Dolstra for dietlibc.
-
2006-10-18 Jim Meyering <[email protected]>
* lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
--- 11320,11325 ----
***************
*** 11357,11362 ****
--- 11351,11365 ----
* lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define differently if DEFAULT_TEXT_DOMAIN is set.
+ 2006-10-17 Eric Blake <[email protected]>
+
+ * lib/xvasprintf.c (includes): Assume config.h.
+ * lib/xasprintf.c (includes): Likewise.
+
+ 2006-10-16 Bruno Haible <[email protected]>
+
+ * lib/c-strstr.c: Include c-strstr.h.
+
2006-10-16 Bruno Haible <[email protected]>
* lib/clean-temp.c: Include fwriteerror.h.
***************
*** 11371,11381 ****
* lib/sigprocmask.h: Include <sys/types.h>. (sigset_t): Use the system's definition if present.
- 2006-10-17 Eric Blake <[email protected]>
-
- * lib/xvasprintf.c (includes): Assume config.h.
- * lib/xasprintf.c (includes): Likewise.
-
2006-10-16 Paul Eggert <[email protected]>
* lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
--- 11374,11379 ----
***************
*** 11870,11902 ****
(_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle MSVC and mingw explicitly.
- 2006-10-11 Simon Josefsson <[email protected]>
- Bruno Haible <[email protected]>
-
- Add support for multiple gnulib-tool invocations in the scope of a
- single configure.ac file.
- * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
- use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
- with the same contents as the _LIBADD variable.
- (func_emit_initmacro_start, func_emit_initmacro_end,
- func_emit_initmacro_done): New functions.
- (func_import, func_create_testdir): Invoke them. Allow the identifiers
- gl_LIBOBJS and gl_LTLIBOBJS.
-
- 2006-10-11 Bruno Haible <[email protected]>
-
- * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
- (func_create_testdir): Don't create po/Makefile.am, don't invoke
- autoreconf. Instead, invoke autopoint explicitly but move back the
- *.m4 files from gnulib.
-
- 2006-10-11 Bruno Haible <[email protected]>
-
- * gnulib-tool (func_usage): Make module names after --create-testdir
- optional.
- (func_create_testdir): If no module was specified, use nearly all
- modules.
-
2006-10-12 Jim Meyering <[email protected]>
Big performance improvement for fts-based tools that use FTS_NOSTAT.
--- 11868,11873 ----
***************
*** 11935,11940 ****
--- 11906,11938 ----
* m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
Fix misspelling in diagnostic.
+ 2006-10-11 Simon Josefsson <[email protected]>
+ Bruno Haible <[email protected]>
+
+ Add support for multiple gnulib-tool invocations in the scope of a
+ single configure.ac file.
+ * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
+ use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
+ with the same contents as the _LIBADD variable.
+ (func_emit_initmacro_start, func_emit_initmacro_end,
+ func_emit_initmacro_done): New functions.
+ (func_import, func_create_testdir): Invoke them. Allow the identifiers
+ gl_LIBOBJS and gl_LTLIBOBJS.
+
+ 2006-10-11 Bruno Haible <[email protected]>
+
+ * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
+ (func_create_testdir): Don't create po/Makefile.am, don't invoke
+ autoreconf. Instead, invoke autopoint explicitly but move back the
+ *.m4 files from gnulib.
+
+ 2006-10-11 Bruno Haible <[email protected]>
+
+ * gnulib-tool (func_usage): Make module names after --create-testdir
+ optional.
+ (func_create_testdir): If no module was specified, use nearly all
+ modules.
+
2006-10-11 Paul Eggert <[email protected]>
* lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
***************
*** 13593,13598 ****
--- 13591,13601 ----
* MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix HTML structure.
+ 2006-08-24 Bruno Haible <[email protected]>
+
+ * MODULES.html.sh (Compatibility checks for POSIX:2001 functions): Fix
+ HTML structure.
+
2006-08-23 Paul Eggert <[email protected]>
* modules/openat (Depends-on): Add lchown.
***************
*** 18765,18770 ****
--- 18768,18775 ----
* modules/strchrnul (License): Likewise.
* modules/sysexits (License): Likewise.
+ 2005-10-08 Martin Lambers <[email protected]> + 2005-10-08 Paul Eggert <[email protected]> 2005-10-08 Simon Josefsson <[email protected]>
* config/srclist.txt: Bug 1423 is closed, but 1439 remains.
***************
*** 34640,34646 ****
* m4/uintmax_t.m4: New file.
* m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved.
--- 34645,34651 ----
* m4/uintmax_t.m4: New file.
* m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
! Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
GNU-style ChangeLog merge driver for Git (was: Re: git: avoiding merges, rebasing)
Quoted 5 lines · Bruno Haible
Hello Benoit,
Thanks for working on this. But this merge driver has a few major nits.
Quoted 8 lines
1) While my ChangeLog file was locally unmodified but some pulled in commits should modify it, "git pull" stopped and said:
ChangeLog: needs update
fatal: Entry 'ChangeLog' not uptodate. Cannot merge.[I cannot swear on this, because I did not do a "git status" before the "git pull", but this is in a directory where I usually have no pending diffs.]
I'll check but I'm afraid that Git bails out before actually trying the merge driver.
Quoted 15 lines
The ChangeLog in question is the one from gnulib
(git clonegit://git.sv.gnu.org/gnulib).2) This "merge driver" did much more than sorting in a merge: it sorted the entire file! In doing so,
- It changed the order of ChangeLog entries in a way that does
not represent
the historical commit order.
- For ChangeLog entries with multiple contributors, it shuffled
around these
extra contributors to other ChangeLog entries.
- Near the end of the file, it made a change that I cannot explain.
Quoted 2 lines
Find attached a context diff of all the bad changes that it did.
Yes, it's pretty stupid, I hacked this in a hurry. I'll try to improve it so that it doesn't have these undesired side-effects.
Quoted 25 lines
In my opinion, a merge driver should not do changes to the file except in the range of lines where the conflict occurred. For a ChangeLog driver, all uncommitted entries should be collected at the top of the file, because
1. ChangeLogs are kept in the order of historical commit in the central repository,
2. other developers always look at the top of the ChangeLog; if a ChangeLog entries is inserted second or third after some already present
entries,
the danger is too high that the change gets unnoticed.So "git-merge-changelog OLD CURRENT OTHERS" should IMO do the following:
1) Collect the changes between OLD and HEAD (I don't know if that is CURRENT or OTHERS?), in two categories:
- added entries,
- changed and removed entries.
2) Back out the added entries, keeping only the changed and removed entries as modifications.
3) Do a normal merge between this and the pulled in remote branch (I don't know if that is OTHERS or CURRENT?). If that merge gives a
conflict,
bail out.
4) Insert the added entries at the top, in the same order as they were originally (no sorting).
Quoted 2 lines
Bruno
<git-merge-changelog-blunder>
OK I'll try to rework the driver so that it implements this. It will take some time though, I'm quite busy these days. Akim Demaille would also like it to squash the commits added by the merge (the new commits in OTHERS):
YYYY-MM-DD Author <[email protected]>
Merge whatever:
YYYY-MM-DD Someone Else <[email protected]>
Some change.
* FileChanged.c: Whatever.
YYYY-MM-DD Who Cares <[email protected]>
Some other change.
* OtherFile.c: Do it.
I thought this was mandated by the GNU Coding Standards but I checked, it doesn't say anything about merges. Would this sort of strategy be useful to you? Should it be default (or enabled by some --squash option)?
Cheers,
Signature · 2 lines
Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory
Re: GNU-style ChangeLog merge driver for Git
Hello Benoit,
Quoted 11 lines
Akim Demaille would also like it to squash the commits added by the merge (the new commits in OTHERS):
YYYY-MM-DD Author <[email protected]>
Merge whatever:
YYYY-MM-DD Someone Else <[email protected]>
Some change.
*FileChanged.c: Whatever.
Quoted 8 lines
YYYY-MM-DD Who Cares <[email protected]>
Some other change.
*OtherFile.c: Do it.I thought this was mandated by the GNU Coding Standards but I checked, it doesn't say anything about merges. Would this sort of strategy be useful to you? Should it be default (or enabled by some --squash option)?
This merge is occurring in a different situation:
The situation where we need ChangeLog merging most often is when a developer has made changes on his own and pulls in the changes from the remote repository (via "git stash; git pull; git stash apply").
The situation that Akim is describing is that he pulls changes from the repository of Someone Else and Who Cares, and then pushes them into the central repository, under his responsibility.
For the first situation, the non-remote ChangeLog entries should be moved to the top, without modification or indentation.
For the second situation, three different styles are in use at GNU (because they don't use "Signed-off" lines):
1) unmodified copying of the ChangeLog entries:
YYYY-MM-DD Someone Else <[email protected]>
Some change.
* FileChanged.c: Whatever.
YYYY-MM-DD Who Cares <[email protected]>
Some other change.
* OtherFile.c: Do it.
2) copying with lieutenant's email address, like Akim described it:
YYYY-MM-DD Lieu Tenant <[email protected]>
YYYY-MM-DD Someone Else <[email protected]>
Some change.
* FileChanged.c: Whatever.
YYYY-MM-DD Who Cares <[email protected]>
Some other change.
* OtherFile.c: Do it.
3) similar, but with indentation of the entire copied-in ChangeLog entries:
YYYY-MM-DD Lieu Tenant <[email protected]>
YYYY-MM-DD Someone Else <[email protected]>
Some change.
* FileChanged.c: Whatever.
YYYY-MM-DD Who Cares <[email protected]>
Some other change.
* OtherFile.c: Do it.
First of all, your merge driver could try to guess whether we're in the first or second situation (maybe by testing whether the names in the ChangeLog entry match the [user]name from the git config).
Then, for the second situation, there can be some flag in the driver or in the git config that describes which of the 3 styles to apply.
Bruno
Hi,
Quoted 1 line · Benoit SIGOURE
[as usual, I forgot the attachment...]
Two comments:
- by not inlining you made it hard to review your script. Therefore I will not do it.
- Try to avoid naming the script git-merge-*; these scripts/programs are merge _strategies_, not merge _drivers_ (and yes, we already have two programs violating this rule -- merge-base and merge-file -- but that does not mean that you are free to add to the pile).
Ciao,
Dscho
Quoted 10 lines · Johannes Schindelin
Hi,
Quoted 1 line · Benoit SIGOURE
[as usual, I forgot the attachment...]
Two comments:
- by not inlining you made it hard to review your script. Therefore I will not do it.
:|
Quoted 8 lines
- Try to avoid naming the script git-merge-*; these
scripts/programs are
merge _strategies_, not merge _drivers_ (and yes, we already have
two
programs violating this rule -- merge-base and merge-file -- but
that
does not mean that you are free to add to the pile).
I'm open to better suggestions.
Cheers,
Signature · 2 lines
Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory
Quoted 7 lines · Benoit SIGOURE
Quoted 5 lines · Bruno Haible
Quoted 4 lines
it should be
possible to create a custom [merge "cl-merge"] in your git config file, which points to a script designed specifically for resolving changelog conflicts
Quoted 6 lines
Quoted 3 lines
I would love such a script, instead of constantly having to do conflict resolution at the top of ChangeLog.
So would I. I've had this in my TODO list for a long time so if no one else is willing to give it a try, I can try, but it won't be before next week because my schedule is quite busy until then.
I finally found some time to hack something and here is my git-merge-changelog Perl script. I tested it quickly and it seems to work fine. It will mess up the ChangeLog entries when a commit actually modifies an existing ChangeLog entry. It needs more testing but I'm just throwing this out in the wild for people that have interest in this to review. I will eventually come up with a solution for the commits modifying existing entries and a testsuite.
I'm CC-ing the Git ML just in case it interests some more people over there.
In order to use it, add the following to your ~/.gitconfig:
[merge "cl-merge"]
name = GNU-style ChangeLog merge driver
driver = /path/to/git-merge-changelog %O %A %B
(you can also add it to a specific working copy by adding it in .git/config instead)
Then, in the directory where the ChangeLog is, add a .gitattributes file with the following content:
ChangeLog merge=cl-merge
For more information, see man gitattributes.
Let me know if something goes wrong.
Cheers,
Signature · 2 lines
Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory