author | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 23 Jan 2007 08:18:37 +0000 (03:18 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Tue, 23 Jan 2007 08:18:37 +0000 (03:18 -0500) | ||
commit | d3596fd9486b602252d5b2c3e14ac55a07a2bdb9 | |
tree | 634d0fed415eec1c25c75cdd87a555b229ace5e5 | tree | snapshot |
parent | 19b41e455932d56a578becdfd91095a9a041f21c | commit | diff |
git-gui: When possible show the type of an untracked file.
Users may want to know what a file is before they add it to the
repository, especially if its a binary file. So when possible
invoke 'file' on the path and try to get its output. Since
this is strictly advice to the user we won't bother to report
any failures from our attempt to run `file`.
Since some file commands also output the path name they were
given we look for that case and strip it off the front of the
returned output before placing it into the diff viewer.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Users may want to know what a file is before they add it to the
repository, especially if its a binary file. So when possible
invoke 'file' on the path and try to get its output. Since
this is strictly advice to the user we won't bother to report
any failures from our attempt to run `file`.
Since some file commands also output the path name they were
given we look for that case and strip it off the front of the
returned output before placing it into the diff viewer.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | diff | blob | history |