Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Wed, 2 Jun 2010 17:17:26 +0000 (10:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Jun 2010 17:17:26 +0000 (10:17 -0700)
* maint:
git-compat-util.h: use apparently more common __sgi macro to detect SGI IRIX
Documentation: A...B shortcut for checkout and rebase
Documentation/pretty-{formats,options}: better reference for "format:<string>"

1  2 
Documentation/git-checkout.txt
Documentation/pretty-formats.txt
git-compat-util.h
index 4505eb6d84990944009d0b5e560de4bd4d2022e8,a3a87fa7fd29973e15afb93382646ae6f89d0f61..afda5c36b5ac0061d94d706cd7a07ef8197b6b31
@@@ -9,7 -9,7 +9,7 @@@ SYNOPSI
  --------
  [verse]
  'git checkout' [-q] [-f] [-m] [<branch>]
 -'git checkout' [-q] [-f] [-m] [-b <new_branch>] [<start_point>]
 +'git checkout' [-q] [-f] [-m] [[-b|--orphan] <new_branch>] [<start_point>]
  'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
  'git checkout' --patch [<tree-ish>] [--] [<paths>...]
  
@@@ -90,24 -90,6 +90,24 @@@ explicitly give a name with '-b' in suc
        Create the new branch's reflog; see linkgit:git-branch[1] for
        details.
  
 +--orphan::
 +      Create a new branch named <new_branch>, unparented to any other
 +      branch.  The new branch you switch to does not have any commit
 +      and after the first one it will become the root of a new history
 +      completely unconnected from all the other branches.
 ++
 +When you use "--orphan", the index and the working tree are kept intact.
 +This allows you to start a new history that records set of paths similar
 +to that of the start-point commit, which is useful when you want to keep
 +different branches for different audiences you are working to like when
 +you have an open source and commercial versions of a software, for example.
 ++
 +If you want to start a disconnected history that records set of paths
 +totally different from the original branch, you may want to first clear
 +the index and the working tree, by running "git rm -rf ." from the
 +top-level of the working tree, before preparing your files (by copying
 +from elsewhere, extracting a tarball, etc.) in the working tree.
 +
  -m::
  --merge::
        When switching branches,
@@@ -154,6 -136,10 +154,10 @@@ edits from your current working tree
  As a special case, the `"@\{-N\}"` syntax for the N-th last branch
  checks out the branch (instead of detaching).  You may also specify
  `-` which is synonymous with `"@\{-1\}"`.
+ +
+ As a further special case, you may use `"A...B"` as a shortcut for the
+ merge base of `A` and `B` if there is exactly one merge base. You can
+ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
  
  <new_branch>::
        Name for the new branch.
index bd760d3bd107d2f1101efbc75693e3ac5e81139b,c85a52c0cc27a187abbdea17cd25cec51b808064..b055a673d83bcf4c106f3f703ca7f4db4ca1d60f
@@@ -76,9 -76,9 +76,9 @@@ displayed in full, regardless of whethe
  true parent commits, without taking grafts nor history
  simplification into account.
  
- * 'format:'
+ * 'format:<string>'
  +
- The 'format:' format allows you to specify which information
+ The 'format:<string>' format allows you to specify which information
  you want to show. It works a little bit like printf format,
  with the notable exception that you get a newline with '%n'
  instead of '\n'.
@@@ -123,7 -123,6 +123,7 @@@ The placeholders are
  - '%s': subject
  - '%f': sanitized subject line, suitable for a filename
  - '%b': body
 +- '%B': raw body (unwrapped subject and body)
  - '%N': commit notes
  - '%gD': reflog selector, e.g., `refs/stash@\{1\}`
  - '%gd': shortened reflog selector, e.g., `stash@\{1\}`
diff --combined git-compat-util.h
index edf352dee2271bcc1e328c43330ca9a8248c01b3,b96912b5d36e971212e219f038b62bfcb7bdbd14..c0198dde4c2c6a61718228ca2ade463c22e0bec3
@@@ -56,7 -56,7 +56,7 @@@
  # define _XOPEN_SOURCE 500
  # endif
  #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \
-       !defined(_M_UNIX) && !defined(sgi) && !defined(__DragonFly__)
+       !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__)
  #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
  #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
  #endif
@@@ -164,13 -164,6 +164,13 @@@ extern char *gitbasename(char *)
  #define PATH_SEP ':'
  #endif
  
 +#ifdef HAVE_PATHS_H
 +#include <paths.h>
 +#endif
 +#ifndef _PATH_DEFPATH
 +#define _PATH_DEFPATH "/usr/local/bin:/usr/bin:/bin"
 +#endif
 +
  #ifndef STRIP_EXTENSION
  #define STRIP_EXTENSION ""
  #endif
@@@ -363,8 -356,6 +363,8 @@@ static inline void *gitmempcpy(void *de
  
  extern void release_pack_memory(size_t, int);
  
 +extern void set_try_to_free_routine(void (*routine)(size_t));
 +
  extern char *xstrdup(const char *str);
  extern void *xmalloc(size_t size);
  extern void *xmallocz(size_t size);
@@@ -488,14 -479,5 +488,14 @@@ void git_qsort(void *base, size_t nmemb
   * Always returns the return value of unlink(2).
   */
  int unlink_or_warn(const char *path);
 +/*
 + * Likewise for rmdir(2).
 + */
 +int rmdir_or_warn(const char *path);
 +/*
 + * Calls the correct function out of {unlink,rmdir}_or_warn based on
 + * the supplied file mode.
 + */
 +int remove_or_warn(unsigned int mode, const char *path);
  
  #endif