path: root/builtin-commit-tree.c
AgeCommit message (Collapse)Author
2006-12-30commit-tree: cope with different ways "utf-8" can be spelled.Junio C Hamano
People can spell config.commitencoding differently from what we internally have ("utf-8") to mean UTF-8. Try to accept them and treat them equally. Signed-off-by: Junio C Hamano <>
2006-12-28UTF-8: introduce i18n.logoutputencoding.Junio C Hamano
It is plausible for somebody to want to view the commit log in a different encoding from i18n.commitencoding -- the project's policy may be UTF-8 and the user may be using a commit message hook to run iconv to conform to that policy (and either not have i18n.commitencoding to default to UTF-8 or have it explicitly set to UTF-8). Even then, Latin-1 may be more convenient for the usual pager and the terminal the user uses. The new variable i18n.logoutputencoding is used in preference to i18n.commitencoding to decide what encoding to recode the log output in when git-log and friends formats the commit log message. Signed-off-by: Junio C Hamano <>
2006-12-26i18n.logToUTF8: convert commit log message to UTF-8Junio C Hamano
When i18n.commitencoding is set to a non UTF-8 encoding, commit-tree records the encoding in an extra header after author/committer headers in the commit object. An earlier version used trailer but Johannes points out that there is little risk breaking existing Porcelains with a new header. Signed-off-by: Junio C Hamano <>
2006-12-24commit-tree: encourage UTF-8 commit messages.Johannes Schindelin
Introduce is_utf() to check if a text looks like it is encoded in UTF-8, utf8_width() to count display width, and implements print_wrapped_text() using them. git-commit-tree warns if the commit message does not minimally conform to the UTF-8 encoding when i18n.commitencoding is either unset, or set to "utf-8". Signed-off-by: Junio C Hamano <>
2006-12-22commit-tree: do not overflow MAXPARENTJunio C Hamano
We have a static allocation of MAXPARENT, but that limit was not enforced, other than by a lucky invocation of the program segfaulting. Signed-off-by: Junio C Hamano <>
2006-12-16make commit message a little more consistent and confortingNicolas Pitre
It is nicer to let the user know when a commit succeeded all the time, not only the first time. Also the commit sha1 is much more useful than the tree sha1 in this case. This patch also introduces a -q switch to supress this message as well as the summary of created/deleted files. Signed-off-by: Nicolas Pitre <> Signed-off-by: Junio C Hamano <>
2006-08-17Do not use memcmp(sha1_1, sha1_2, 20) with hardcoded length.David Rientjes
Introduces global inline: hashcmp(const unsigned char *sha1, const unsigned char *sha2) Uses memcmp for comparison and returns the result based on the length of the hash name (a future runtime decision). Acked-by: Alex Riesen <> Signed-off-by: David Rientjes <> Signed-off-by: Junio C Hamano <>
2006-07-29Call setup_git_directory() much earlierLinus Torvalds
This changes the calling convention of built-in commands and passes the "prefix" (i.e. pathname of $PWD relative to the project root level) down to them. Signed-off-by: Linus Torvalds <> Signed-off-by: Junio C Hamano <>
2006-05-23Builtin git-commit-tree.Peter Eriksen
Signed-off-by: Peter Eriksen <> Signed-off-by: Junio C Hamano <>